Git Product home page Git Product logo

flutter-dojah-financial's Introduction

Features [KYC AND FINANCIAL WIDGET]

KYC WIDGET

Installation

First, add flutter_dojah_kyc as a dependency in your pubspec.yaml file.

iOS

Add the following keys to your Info.plist file, located in <project root>/ios/Runner/Info.plist:

  • NSCameraUsageDescription - describe why your app needs access to the camera. This is called Privacy - Camera Usage Description in the visual editor.

  • NSMicrophoneUsageDescription - describe why your app needs access to the microphone, if you intend to record videos. This is called Privacy - Microphone Usage Description in the visual editor.

  • NSLocationWhenInUseUsageDescription - describe why your app needs access to the location, if you intend to verify address/location. This is called Privacy - Location Usage Description in the visual editor.

Podfile

Kindly include this in Podfile set up.

dart: PermissionGroup.camera PERMISSION_CAMERA=1,

dart: PermissionGroup.microphone PERMISSION_MICROPHONE=1,

dart: PermissionGroup.location PERMISSION_LOCATION=1,

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
      config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
        '$(inherited)',

        ## dart: PermissionGroup.camera
        'PERMISSION_CAMERA=1',

        ## dart: PermissionGroup.microphone
        'PERMISSION_MICROPHONE=1',

        ## dart: PermissionGroup.location
        'PERMISSION_LOCATION=1',
      ]
    end
  end
end

Android

// Add the camera permission: 
<uses-permission android:name="android.permission.CAMERA" />
// Add the modify audio settings permission:
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
// Add the Internet settings permission:
<uses-permission android:name="android.permission.INTERNET"/>
// Add the Location settings permission :
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />

Usage

TODO: Include short and useful examples for package users. Add longer examples to /example folder.

final Map<String,dynamic> config = {
  debug: true,
  otp: true, //for verification type
  selfie: true //for verification type
};


  final userData = {
          "first_name": "John",
          "last_name": "Doe",
          "dob": "1990-04-16",
          "residence_country": "Nigeria",
          "email": "[email protected]"
        };


     final configObj = {
      "widget_id": "Your Widget ID"
      };




    final metaData = {
       "user_id": "81828289191919193882",
    };



 final DojahKYC _dojahKYC = DojahKYC(
    appId: appId,
    publicKey: publicKey,
    type: "custom",
    userData: userData, //Optional 
    metaData: metaData, //Optional 
    config: configObj, 
    govData: govData, //Optional 
    referenceId: referenceId //Optional  
                );


  _dojahKYC.open(context, onSuccess: (result) {
    print('$result');
  }, 
  onClose: (close) => print('Widget Closed'),
  onError: (err) {
    print('error: $err');
  });

Deployment

REMEMBER TO CHANGE THE APP ID and PUBLIC KEY WHEN DEPLOYING TO A LIVE (PRODUCTION) ENVIRONMENT

Contributing

  • Fork it!
  • Create your feature branch: git checkout -b feature/feature-name
  • Commit your changes: git commit -am 'Some commit message'
  • Push to the branch: git push origin feature/feature-name
  • Submit a pull request ๐Ÿ˜‰๐Ÿ˜‰

Additional information

Contact Dojah for more options for the config object.

flutter-dojah-financial's People

Contributors

techwithsam avatar

Forkers

ninobass

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.