mca_flutter_sdk 0.0.4 copy "mca_flutter_sdk: ^0.0.4" to clipboard
mca_flutter_sdk: ^0.0.4 copied to clipboard

The Official Flutter MyCover.ai SDK for insurance purchase and payment. Completely supports Android and iOS.

The Official MyCover.ai SDK #

A Flutter plugin for buying insurance, supports both iOS and Android platforms .

Features #

Get your insurance and make payment

Getting started #

  1. Add package mca_flutter_sdk to your pubspec.yaml file
  2. Run flutter pub get
  3. Add required permission for the image pickers

Usage #

Initialise the sdk in two ways

  1. Input the client ID and also the specific product ID to initialise the SDK, This is to initiate a fresh transaction

such as initialiseSdk(context, productId:'18kjbsj939923',userId:'[email protected]'});

This will initialise the SDK and fetch the selected product with the product ID and continue your purchase.

  1. Input the client ID to fetch all products

such as initialiseSdk(context,userId:'[email protected]'});

This will initialise the SDK and fetch all products available and you can select a desired product and continue your purchase.

  1. Input the Client ID, productID and the typeOfTransaction and reference, This can be done when a transaction has already been initiated, payment is made and you have the reference number from the payment done.

such as initialiseSdk(context, productId:'18kjbsj939923',userId:'[email protected]',typeOfTransaction: PurchaseStage.purchase,reference:'BUY-BWBJMPABGFWKB});

import 'package:mca_flutter_sdk/mca_flutter_sdk.dart';

PurchaseStage typeOfTransaction = PurchaseStage.purchase;String reference = 'BUY-BWBJMPABGFWKB';


initialiseSDK({String? userId, String? productId }) async {
  final myCover = MyCoverAI(context: context, userId: userId, productId: productId,typeOfTransaction: typeOfTransaction,reference: reference);
  var response = await myCover.initialise();
  if (response != null) {
    showLoading('$response');
  }
  else {
    print("No Response!");
  }
} 

Additional information #

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

4
likes
90
pub points
0%
popularity

Publisher

unverified uploader

The Official Flutter MyCover.ai SDK for insurance purchase and payment. Completely supports Android and iOS.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, fluttertoast, http, image_picker, mockito

More

Packages that depend on mca_flutter_sdk