Skip to content

asapJ/flutter_mono

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 {
       await MonoFlutter.launchMono(
               context,
               key: 'Your Public Key', // from https://app.withmono.com/apps
               reference: "some_random_string"
               configJson: '''{
                  "selectedInstitution": {
                    "id": "5f2d08c060b92e2888287706", 
                    "auth_method": "internet_banking" 
                  }
               }''' /// must be a valid JSON string
               showLogs: true,
               onClose: () {
                  print('onClose');
               },
               onLoad: () {
                  print('onLoad');
               },
               onEvent: (eventName, eventData) {
                  switch (eventName) {
                     case 'mono.connect.institution_selected':
                     /// do something
                     break;
                  },
                  onSuccess: (data) {
                     print('Success: ${data.toJson()}');
                  },
               );
  }
  • Use MonoView widget
import 'package:flutter_mono/flutter_mono.dart';

     ...

   MonoView(
      apiKey: 'Your Public Key', // from https://app.withmono.com/apps
      reference: "some_random_string"
      configJson: '''{
          "selectedInstitution": {
            "id": "5f2d08c060b92e2888287706", 
            "auth_method": "internet_banking" 
           }
      }''' /// must be a valid JSON string
      showLogs: true,
      onClose: () {
         print('onClose');
      },
      onLoad: () {
         print('onLoad');
      },
      onEvent: (eventName, eventData) {
         switch (eventName) {
            case 'mono.connect.institution_selected':
            /// do something
            break;
         }
      },
      onSuccess: (data) {
         print('Success: ${data.toJson()}');
      },
   )

      ...

✨ Contribution

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published