8000 GitHub - iwacu/sim_data · GitHub
[go: up one dir, main page]

Skip to content
iwacuPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Sim plugin for Flutter

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

Installation

Add sim_data 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_da
562C
ta/sim_data.dart';

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

void main() => printSimCardsData();

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

0