sim_data_plus 0.1.2 copy "sim_data_plus: ^0.1.2" to clipboard
sim_data_plus: ^0.1.2 copied to clipboard

A Flutter plugin to retrieve Sim cards data - dual sim support - only Android for now.

Sim plugin for Flutter #

This is forked and modified version of original sim_data plugin to add support for android 11,12 and above A Flutter plugin to retrieve Sim cards data - dual sim support - only Android for now.

Installation #

Add sim_data_plus as a dependency in your pubspec.yaml.

Make sure that your AndroidManifext.xml file includes the following permission:

<uses-permission android:name="android.permission.READ_PHONE_STATE" />

Usage #

Before you use this plugin, you must make sure that the user has authorized access to his phone, for example with the permission_handler plugin.

You may then use the plugin:

import 'package:sim_data_plus/sim_data.dart';

void printSimCardsData() async {
  try {
    SimData simData = await SimDataPlugin.getSimData();
    for (var s in simData.cards) {
      print('Serial number: ${s.serialNumber}');
    }
  } on PlatformException catch (e) {
    debugPrint("error! code: ${e.code} - message: ${e.message}");
  }
}

void main() => printSimCardsData();
13
likes
0
pub points
75%
popularity

Publisher

verified publishershrijeet.codes

A Flutter plugin to retrieve Sim cards data - dual sim support - only Android for now.

Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on sim_data_plus