setMetadata method
- Uint8List arg_metadata
Sets arbitrary binary region metadata for the region.
Note that this setter is asynchronous and the given metadata is applied only after the resulting callback is invoked with no error.
@param metadata The metadata associated with the region. @param callback Called once the request is complete or an error occurred.
Implementation
Future<void> setMetadata(Uint8List arg_metadata) async {
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
'dev.flutter.pigeon.mapbox_maps_flutter.OfflineRegion.setMetadata',
codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList =
await channel.send(<Object?>[arg_metadata]) as List<Object?>?;
if (replyList == null) {
throw PlatformException(
code: 'channel-error',
message: 'Unable to establish connection on channel.',
);
} else if (replyList.length > 1) {
throw PlatformException(
code: replyList[0]! as String,
message: replyList[1] as String?,
details: replyList[2],
);
} else {
return;
}
}