MyCover AI
Search
K
Comment on page

Flutter SDK

Just Plug and Play it with our Flutter SDK

Installation

  • Add package mca_flutter_sdk to your pubspec.yaml file
  • Run flutter pub get
  • Add required permission for the image pickers and camera
  • Add the required permission for the geolocation

Usage

1
import 'package:mca_flutter_sdk/mca_official_flutter_sdk.dart';
2
3
PurchaseStage typeOfTransaction = PurchaseStage.purchase;
4
String reference = 'BUY-BWBJMPABGFWKB';
5
6
final myCover = MyCoverAI(
7
context: context,
8
publicKey: '2aa4f6ec-0111-42f4-88f9-466c7ef41727',
9
email: '[email protected]';,
10
productId: [productId],
11
form: {
12
'email': '[email protected]',
13
'name': 'Damilare Peter',
14
'phone': '08108257228'
15
},
16
paymentOption: PaymentOption.gateway,
17
reference: 'BUY-SMRCECMNYKMHV',
18
transactionType: TransactionType.purchase
19
);

Additional Information

Add the required permission for image picker on Android and iOS android manifest and info.plist respectively. The SDK depends on image picker. pub.dev