start method
void
start({
- required String verificationToken,
- required VerificationSchemeType verificationScheme,
- required String languageCode,
- required Function partnerEndCallback,
- bool? showPartnerLogo,
- bool? showCloseSDKButton,
- String? colorBackgroundTertiary,
- String? colorBackgroundSecondary,
- String? colorBackgroundPrimary,
- String? colorTextSecondary,
- String? colorTextPrimary,
- String? colorBorders,
- String? colorActionButtons,
- String? colorIcons,
override
Implementation
@override
void start(
{required String verificationToken,
required VerificationSchemeType verificationScheme,
required String languageCode,
required Function partnerEndCallback,
bool? showPartnerLogo,
bool? showCloseSDKButton,
String? colorBackgroundTertiary,
String? colorBackgroundSecondary,
String? colorBackgroundPrimary,
String? colorTextSecondary,
String? colorTextPrimary,
String? colorBorders,
String? colorActionButtons,
String? colorIcons}) async {
methodChannel.setMethodCallHandler((methodCall) async {
debugPrint("Caught method call with Dart handler: ${methodCall.method}");
switch (methodCall.method) {
case "onFinish":
Future.delayed(const Duration(milliseconds: 500), () {
_finishAction!();
});
return;
default:
throw MissingPluginException('Not Implemented');
}
});
_finishAction = partnerEndCallback;
methodChannel.invokeMethod<void>('start', <String, dynamic>{
'verifToken': verificationToken,
'verifScheme': verificationScheme.name.toLowerCase(),
'languageCode': languageCode,
'showPartnerLogo': showPartnerLogo,
'showCloseSDKButton': showCloseSDKButton,
'colorBackgroundTertiary': colorBackgroundTertiary,
'colorBackgroundSecondary': colorBackgroundSecondary,
'colorBackgroundPrimary': colorBackgroundPrimary,
'colorTextSecondary': colorTextSecondary,
'colorTextPrimary': colorTextPrimary,
'colorBorders': colorBorders,
'colorActionButtons': colorActionButtons,
'colorIcons': colorIcons
});
}