handleMethodCall method

Future handleMethodCall(
  1. MethodCall call
)

Handles method calls over the MethodChannel of this plugin. Note: Check the "federated" architecture for a new way of doing this: https://flutter.dev/go/federated-plugins

Implementation

Future<dynamic> handleMethodCall(MethodCall call) async {
  var args = call.arguments as Map<Object, Object>?;
  switch (call.method) {
    case 'getPlatformVersion':
      return getPlatformVersion();
    case 'preVerify':
      if (args != null) {
        startGeeVerify(args["gt"].toString(), args["challenge"].toString(), args["success"] as int);
      }
      break;
    default:
      throw PlatformException(
        code: 'Unimplemented',
        details: 'flutter_geetest_plugin for web doesn\'t implement \'${call.method}\'',
      );
  }
}