start method

  1. @override
void start({
  1. required String verificationToken,
  2. required VerificationSchemeType verificationScheme,
  3. required String languageCode,
  4. required Function partnerEndCallback,
  5. bool? showCloseSDKButton,
  6. String? colorBackgroundTertiary,
  7. String? colorBackgroundSecondary,
  8. String? colorBackgroundPrimary,
  9. String? colorTextSecondary,
  10. String? colorTextPrimary,
  11. String? colorBorders,
  12. String? colorActionButtons,
  13. 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
  });
}