setStyleSourceProperty method
Sets a value to a style source property.
Note: When setting the data property of a geojson source, this method never returns an error.
In case of success, a map-loaded event will be propagated. In case of errors, a map-loading-error event will be propagated instead.
@param sourceId A style source identifier. @param property The style source property name. @param value The style source property value.
@return A string describing an error if the operation was not successful, empty otherwise.
Implementation
@override
Future<void> setStyleSourceProperty(
String sourceId,
String property,
Object value,
) async {
final String pigeonVar_channelName =
'dev.flutter.pigeon.mapbox_maps_flutter.StyleManager.setStyleSourceProperty$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel =
BasicMessageChannel<Object?>(
pigeonVar_channelName,
pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger,
);
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(
<Object?>[sourceId, property, value],
);
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;
}
}