onNativeCall static method

Future<void> onNativeCall(
  1. String method,
  2. dynamic arguments
)

Implementation

static Future<void> onNativeCall(String method, dynamic arguments) async {
  switch (method) {
    case 'onDataReceived':
      List<int> result = arguments;
      _dataStreamController.add(result);
      // print("_handleMethodCall " + hex.encode(result)+" ");
      break;
    default:
      throw PlatformException(code: 'Unimplemented', details: "Method not implemented");
  }
}