搜尋套件、儲存庫與 APP 分類

GitHub 儲存庫FadyFouad/sim_card_info

sim_card_info

FadyFouad/sim_card_info open-source repository details.

sim_card_info 專案封面
星標
1
分支
5
最近推送(UTC)
2026年3月6日
專案狀態
未封存

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

sim_card_info

A Flutter plugin to get SIM card information.

Features

  • Fetches SIM card information from the device.
  • Handles exceptions and returns appropriate messages.

Getting Started

Installation

Add sim_card_info to your pubspec.yaml file:

dependencies:
  sim_card_info: ^1.0.0

then run flutter pub get in your terminal.

Usage

Import
import 'package:sim_card_info/sim_card_info.dart';
Get SIM card information
final _simCardInfoPlugin = SimCardInfo();
List<SimInfo>? _simInfo;

// Retrieve SIM card information
simCardInfo = await _simCardInfoPlugin.getSimInfo() ?? [];
Handling Exceptions

In cases where retrieving information fails, especially on certain devices like iOS, utilize a try/catch block with a PlatformException:

  Future<void> initSimInfoState() async {
  List<SimInfo>? simCardInfo;
  // Platform messages may fail, so we use a try/catch PlatformException.
  // We also handle the message potentially returning null.
  try {
    simCardInfo = await _simCardInfoPlugin.getSimInfo() ?? [];
  } on PlatformException {
    simCardInfo = [];
    setState(() {
      isSupported = false;
    });
  }

  // If the widget was removed from the tree while the asynchronous platform
  // message was in flight, we want to discard the reply rather than calling
  // setState to update our non-existent appearance.
  if (!mounted) return;
  setState(() {
    _simInfo = simCardInfo;
  });
}

Permissions

refer to example directory for a complete sample app usingsim_card_info plugin.

Issues and feedback

For any issue or feedback please create an issue.

License

This project is licensed under the MIT License - see the LICENSE file for details.

FadyFouad GitHub avatar
GitHub 作者

FadyFouad ↗

My goal is to build amazing Android Apps! (DRY)

Cairo
語言C++CMakeDartKotlinSwiftCHTMLRubyObjective-C

此儲存庫發佈的套件

使用的依賴

依賴清單 5 項

  • flutter{"sdk":"flutter"}
  • flutter_web_plugins{"sdk":"flutter"}
  • plugin_platform_interface^2.1.8
  • flutter_test開發依賴{"sdk":"flutter"}
  • flutter_lints開發依賴^3.0.2

如何選擇適合專案的儲存庫?

先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。

  1. 透過儲存庫名稱、作者或描述搜尋,再依技術分類縮小範圍。
  2. 綜合星標、分支與最近推送比較專案;星標反映社群關注,不保證品質。
  3. 使用前在 GitHub 確認 README、授權條款與 Issues。

來源與維護

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗