handler static method

Future<Result?> handler(
  1. MethodCall call
)

Implementation

static Future<Result?> handler(MethodCall call) async {
  switch (call.method) {
    case "cancelled":
        resultCompleter.complete(ResultCancelled());
        return null;
    case "success":
        String text = call.arguments;
        List<String> result = text.split(' ');
        String verificationId = result[0];
        String identityId = result[1];
        resultCompleter.complete(ResultSuccess(verificationId, identityId));
        return null;
    default:
      throw MissingPluginException('notImplemented');
  }
}