esimcardsdk 0.0.2
esimcardsdk: ^0.0.2 copied to clipboard
A Flutter implementation of esimcard sdk.
A package to use esimcard functionality
Platform Support #
| Android | iOS |
Getting started #
Before you start, create an account with the providers and receive the token.
Usage #
To start using this plugin, add esimcardsdk as a dependency in your pubspec.yaml file:
dependencies:
pay: ^0.0.1
Example #
import 'package:esimcardsdk/esimcardsdk.dart'; import 'package:esimcardsdk/src/extra/api_result_class.dart'; import 'package:esimcardsdk/src/extra/sdk_error.dart'; import 'package:esimcardsdk/src/models/purchase_bundles/countries_model.dart';
Future
// first you cave to call config, to set the sdk ApiResult<String, SdkError> configRes = await esimCardSDK.config(token);
// if the config isSuccess is true, you can now call other functions if (configRes.isSuccess) { ApiResult<CountriesResponseModel, SdkError> result = await esimCardSDK.fetchCountries(token: token); if (result.isSuccess) { for (var i = 0; i < result.data!.data!.length; i++) { print(result.data!.data![i].name); } } } }