onMethodCall method

Future onMethodCall(
  1. MethodCall call
)

Implementation

Future<dynamic> onMethodCall(MethodCall call) async {
  final splits = call.method.split('.');
  if (splits.length != 2) {
    throw "invalid method";
  }
  final module = splits[0];
  final method = splits[1];
  switch (module) {
    case SpeechEvaluatorImpl.module:
      return speechEvaluator.onMethodCall(MethodCall(method, call.arguments));
    default:
      throw "unknown module";
  }
}