handleMethodCall method

Future handleMethodCall(
  1. MethodCall call
)

Implementation

Future<dynamic> handleMethodCall(MethodCall call) async {
  switch (call.method) {
    case 'saveFile':
      String args = call.arguments;

      return downloadFile(FileModel.fromJson(args));
    default:
      throw PlatformException(
        code: 'Unimplemented',
        details: 'file_saver for web doesn\'t implement \'${call.method}\'',
      );
  }
}