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

outdated

Fawry Plugin

Fawry SDK #

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

Getting Started #

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

dependencies:
  fawry_sdk: ^0.0.2

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);

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

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