fawry_sdk 0.0.1 copy "fawry_sdk: ^0.0.1" to clipboard
fawry_sdk: ^0.0.1 copied to clipboard

outdated

Fawry Plugin

Fawry SDK #

fawry_sdk is a crossplatform plugin that helps your app to integrate with Fawry native Android/IOS SDKs.

Getting Started #

Getting Started #

Add this to your package's pubspec.yaml file:

dependencies:
  fawry_sdk: ^0.0.1

Android #

You have to edit AndroidManifest.xml file with following.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools" />
    <application
        tools:replace="android:theme,android:label,android:name">
    </appliaction>
</manifest>

And download this file, and put it in app/libs directory, in android module.

Usage #

You just have to import the package with

import 'package:fawry_sdk/sdk/fawry_sdk.dart';

Then, you need to initialize the SDK.

await FawrySdk.instance.init(
launchModel: FawryLaunchModel(),
baseURL: "Redirect_url",
lang: FawrySdk.LANGUAGE_ENGLISH or FawrySdk.LANGUAGE_ARABIC);

And when you are ready for production you have to set the environment to LIVE.

Now, you can stream the result data that from SDK.

 FawrySdk.instance.callbackResultStream().listen((event) {
String data = event;
debugPrint('data : $data');
});