Last updated:
0 purchases
mobile pos
BankBox Mobile POS Flutter Plugin #
A Flutter Plugin that enables you connect to BankBox Mobile POS
Prerequisites #
Credentials #
First you need to obtain your app credentials from here
Android Setup #
Set minSdkVersion target #
This library targets android devices >= SDK 21. Make sure you're targeting at-least the same by modifying your android/app/build.gradle file
minSdkVersion = 21
IOS Setup #
Update Info.plist to add necessary permissions #
<key>NSBluetoothAlwaysUsageDescription</key>
<string>allow app use bluetooth</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>allow app use bluetooth</string>
<key>NSCameraUsageDescription</key>
<string>Can I use the camera please?</string>
copied to clipboard
Note #
Debugging IOS would now require physical devices after depending on this plugin as build may fail on simulator.
Usage #
Import #
import 'package:mobile_pos/mobile_pos_sdk.dart';
copied to clipboard
Launch SDK #
await RavenBankBoxPlugin.launch(
context,
config: BankBoxConfig(
logo: Container(
height: 32,
width: 32,
decoration: const BoxDecoration(
shape: BoxShape.circle, color: Color(0xffEA872D)),
child: Padding(
padding: const EdgeInsets.all(12),
child: Image.asset('assets/logo.png'),
),
),
onClose: () {
//user taps close button
Navigator.pop(context);
},
showTerminals: true,
enableBalanceCheck: false,
enableSuccessSound: true,
showLabel: true,
theme: const MobilePOSTheme(
darkModeFG: Color(0xff141414),
lightModeFG: Colors.white,
bankBoxThemeMode: BankBoxThemeMode.dark,
headerTextColor: Color(0xFF755AE2),
primaryColor: Color(0xFF755AE2),
onPrimary: Colors.white,
secondaryColor: Color(0xFFEA872D)),
environment: BankBoxEnvironment.production,
appInfo: AppInfo(
category: Category.partner,
appName: '<YOUR APP NAME>',
appId: '<YOUR APP ID>',
appEmail: 'YOUR APP EMAIL'),
customerInfo: CustomerInfo(
lastName: '<USER LAST NAME>',
firstName: '<USER FIRST NAME>',
bvn: '<USER BVN>',
email: '<USER EMAIL>',
phone: '<USER PHONE>',
),
onSuccess: (data) {
//TODO: handle success cases
},
onError: (error) {
//TODO: handle error cases
},
),
);
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.