mca_flutter_sdk 0.0.2 mca_flutter_sdk: ^0.0.2 copied to clipboard
The Official MyCover.ai SDK
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 #
- Add package mca_flutter_sdk to your pubspec.yaml file
- run flutter pub get
- Add required permission for the image pickers
Usage #
Initialise the sdk by
- passing the client ID to fetch all products
initialiseSdk(context, {userId})
var userId = "[email protected]";
- passing the client ID and also the specific product ID to initialise the SDK initialiseSdk(context, {productId,userId})
import 'package:mca_flutter_sdk/mca_flutter_sdk.dart';
initialiseSDK({String? userId, String? productId }) async {
final myCover = MyCoverAI(context: context, userId: userId, productId: productId);
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