updateStyleImportWithURI method
Updates an existing import in the style. The function replaces the content of the import, with the content loaded from the provided URI. The configuration values of the import are merged with the configuration provided in the update.
@param importId Identifier of import to update. @param uri URI of the import. @param config A map containing the configuration options of the import.
Implementation
Future<void> updateStyleImportWithURI(
String importId,
String uri, {
Map<String, Object>? config,
}) async {
final String pigeonVar_channelName =
'dev.flutter.pigeon.mapbox_maps_flutter.StyleManager.updateStyleImportWithURI$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel =
BasicMessageChannel<Object?>(
pigeonVar_channelName,
pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger,
);
final Future<Object?> pigeonVar_sendFuture =
pigeonVar_channel.send(<Object?>[importId, uri, config]);
final List<Object?>? pigeonVar_replyList =
await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName);
} else if (pigeonVar_replyList.length > 1) {
throw PlatformException(
code: pigeonVar_replyList[0]! as String,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
);
} else {
return;
}
}