Future<dynamic> writeData(List<int> bytes) { Map<String, Object> args = Map(); args['bytes'] = bytes; args['length'] = bytes.length; _channel.invokeMethod('writeData', args); return Future.value(true); }