start method
Future<Map<Object?, Object?> ?>
start(
- String documentId,
- String identifier,
- String tokenId,
- HashMap<
String, String> ? additionalData, - DigioConfig digioConfig,
- GatewayEventListenerImpl callback,
override
Implementation
@override
Future<Map<Object?, Object?>?> start(
String documentId,
String identifier,
String tokenId,
HashMap<String, String>? additionalData,
DigioConfig digioConfig,
GatewayEventListenerImpl callback) async {
methodChannel.setMethodCallHandler((call) async {
if (call.method == "gatewayEvent") {
if (call.arguments != null) {
callback(call.arguments);
}
}
});
final result =
await methodChannel.invokeMethod<Map<Object?, Object?>>('start', {
"documentId": documentId,
"identifier": identifier,
"tokenId": tokenId,
"additionalData": additionalData,
"environment": digioConfig.environment == Environment.SANDBOX
? "sandbox"
: "production",
"primaryColor": digioConfig.theme.primaryColor,
"secondaryColor": digioConfig.theme.secondaryColor,
"logo": digioConfig.logo,
});
return result;
}