Pakete, Repositories und App-Kategorien suchen

GitHub-RepositoryFadyFouad/sim_card_info

sim_card_info

FadyFouad/sim_card_info open-source repository details.

Projektcover von sim_card_info
Sterne
1
Forks
5
Letzter Push (UTC)
06.03.2026
Projektstatus
Aktiv

Original-README

Englischer Projektschnappschuss. Aktuelle Inhalte auf 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-Autor

FadyFouad ↗

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

Cairo
SprachenC++CMakeDartKotlinSwiftCHTMLRubyObjective-C

Von diesem Repository veröffentlichte Pakete

Verwendete Abhängigkeiten

Abhängigkeiten 5 Einträge

  • flutter{"sdk":"flutter"}
  • flutter_web_plugins{"sdk":"flutter"}
  • plugin_platform_interface^2.1.8
  • flutter_testEntwicklung{"sdk":"flutter"}
  • flutter_lintsEntwicklung^3.0.2

Wie wähle ich ein passendes Repository?

Nach Anwendungsfall filtern, Aktivität vergleichen und vor der Nutzung das Originalprojekt prüfen.

  1. Nach Name, Autor oder Beschreibung suchen und nach Thema eingrenzen.
  2. Sterne, Forks und letzte Pushes vergleichen. Sterne zeigen Interesse, garantieren aber keine Qualität.
  3. Vor der Nutzung README, Lizenz und Issues auf GitHub prüfen.

Quellen und Pflege

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

GitHub Docs — About repositories ↗