handleMethodCall method

Future handleMethodCall(
  1. MethodCall call
)

Handle Method Callbacks from MethodChannel.

Implementation

Future<dynamic> handleMethodCall(MethodCall call) async {
  switch (call.method) {
    case 'showToast':
      showToast(call.arguments);
      return true;
    default:
      throw PlatformException(
          code: 'Unimplemented',
          details: "The fluttertoast plugin for web doesn't implement "
              "the method '${call.method}'");
  }
}