Giter Site home page Giter Site logo

zfinix / flutter_mono Goto Github PK

View Code? Open in Web Editor NEW
15.0 3.0 12.0 2.89 MB

๐Ÿ™Œ๐Ÿพ This package makes it easy to use the Mono connect widget in a flutter project

License: MIT License

Kotlin 0.39% Ruby 4.50% Swift 1.34% Objective-C 0.13% Dart 82.19% HTML 11.45%

flutter_mono's Introduction

Flutter Mono

** This is an unofficial SDK for flutter

This package makes it easy to use the Mono connect widget in a flutter project.

๐Ÿ“ธ Screen Shots

๐Ÿš€ How to Use plugin

  • Launch MonoFlutter with launchMono method
import 'package:flutter_mono/flutter_mono.dart';

 void launch() async {
    FlutterMono(
      apiKey: 'Your Public Key', // from https://app.withmono.com/apps
      reference: "some_random_string",
      showLogs: true,
      customer: const MonoCustomer(
        newCustomer: MonoNewCustomerModel(
          name: "Samuel Olamide", // REQUIRED
          email: "[email protected]", // REQUIRED
          identity: MonoNewCustomerIdentity(
            type: "bvn",
            number: "2323233239",
          ),
        ),
        existingCustomer: MonoExistingCustomerModel(
          id: "1234-RTFG-ABCD", // REQUIRED
        ),
      ),
      configJson: const {
        "selectedInstitution": {
          "id": "5f2d08be60b92e2888287702",
          "auth_method": "mobile_banking"
        }
      },
      onClose: (it) =>log('Success: $it'),
      onLoad: () => log('widget_loaded'),
      onEvent: (eventName, eventData) {
        switch (eventName) {
          case 'mono.connect.institution_selected':
            /// do something
            break;
        }
      },
    ).launchMono(context);
 }
  • Use MonoView widget
import 'package:flutter_mono/flutter_mono.dart';

   ...

   FlutterMono(
      apiKey: 'Your Public Key', // from https://app.withmono.com/apps
      reference: "some_random_string",
      showLogs: true,
      customer: const MonoCustomer(
        newCustomer: MonoNewCustomerModel(
          name: "Samuel Olamide", // REQUIRED
          email: "[email protected]", // REQUIRED
          identity: MonoNewCustomerIdentity(
            type: "bvn",
            number: "2323233239",
          ),
        ),
        existingCustomer: MonoExistingCustomerModel(
          id: "1234-RTFG-ABCD", // REQUIRED
        ),
      ),
      configJson: const {
        "selectedInstitution": {
          "id": "5f2d08be60b92e2888287702",
          "auth_method": "mobile_banking"
        }
      },
      onClose: (it) =>log('Success: $it'),
      onLoad: () => log('widget_loaded'),
      onEvent: (eventName, eventData) {
        switch (eventName) {
          case 'mono.connect.institution_selected':
            /// do something
            break;
        }
      },
    )

   ...

โœจ Contribution

Lots of PR's would be needed to improve this plugin. So lots of suggestions and PRs are welcome.

flutter_mono's People

Contributors

zfinix avatar

Stargazers

Odun Adeboye avatar Adewale Sanusi avatar  avatar Cornelius Mutisya avatar Yusuff Ogundeji avatar  avatar Emmanuel Joshua avatar Muhammad Akorede Qaasim avatar Chibueze  felix avatar Temitope Akinmegha  avatar Ademola Kolawole  avatar Enikuomehin Adejuwon avatar Oluwatobi Shokunbi  avatar Miracle Anyanwu avatar Obinna Odirionye avatar

Watchers

James Cloos avatar  avatar Marvellous Yeezor avatar

flutter_mono's Issues

Flutter Webview needed

Please add to the documentation or readme, that flutter_webview dependency is needed for this package to work, I had issue with the sdk, until I added webview package.

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.