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

Abyan is an onboarding and KYC solution that helps businesses to verify their customers' identities and documents. This plugin allows you to integrate Abyan SDKs into your Flutter app.

example/lib/main.dart

import 'dart:async';

import 'package:abyan_plugin/abyan_plugin.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
  final abyanFlutter = AbyanPlugin();
  abyanFlutter.listenForJourneyId();
  abyanFlutter.listenForErrors();
  abyanFlutter.listenForProducts();
  abyanFlutter.listenForFormData();
  abyanFlutter.listenForEmptyFormInfo();
  abyanFlutter.listenCardImages();
  abyanFlutter.listenToCardData();
  abyanFlutter.listenToKYCData();
  abyanFlutter.listenToCloseJourney();
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final _abyanFlutterPlugin = AbyanPlugin();

  @override
  void initState() {
    super.initState();
    initPlatformState();
  }

  Future<void> initPlatformState() async {
    // Initialize any platform-specific state if needed
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              FilledButton(
                onPressed: () {
                  _abyanFlutterPlugin.createJourney("7196137434652977");
                },
                child: Text("Start Journey"),
              ),
              FilledButton(
                onPressed: () {
                  _abyanFlutterPlugin.fetchProducts();
                },
                child: Text("Get Products"),
              ),
              FilledButton(
                onPressed: () {
                  _abyanFlutterPlugin.sendFormDataRequestToiOS(485);
                },
                child: Text("Get Form Data"),
              ),
              FilledButton(
                onPressed: () {
                  _abyanFlutterPlugin.callScanCardID(1);
                },
                child: Text("Scan ID Card"),
              ),
              FilledButton(
                onPressed: () {
                  _abyanFlutterPlugin.updateKYC('kycData');
                },
                child: Text("Update KYC"),
              ),
              FilledButton(
                onPressed: () {
                  _abyanFlutterPlugin.scanYourFaceID();
                },
                child: Text("Scan Face ID"),
              ),
              FilledButton(
                onPressed: () {
                  _abyanFlutterPlugin.closeJourney("test");
                },
                child: Text("Close Journey"),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
0
likes
130
points
14
downloads

Publisher

unverified uploader

Weekly Downloads

Abyan is an onboarding and KYC solution that helps businesses to verify their customers' identities and documents. This plugin allows you to integrate Abyan SDKs into your Flutter app.

Homepage

Documentation

API reference

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on abyan_plugin

Packages that implement abyan_plugin