removeStyleModel method

  1. @override
Future<void> removeStyleModel(
  1. String modelId
)

Removes a model from the style.

@param modelId The identifier of the model to remove.

@return A string describing an error if the operation was not successful, empty otherwise.

Implementation

@override
Future<void> removeStyleModel(String modelId) async {
  final String pigeonVar_channelName =
      'dev.flutter.pigeon.mapbox_maps_flutter.StyleManager.removeStyleModel$pigeonVar_messageChannelSuffix';
  final BasicMessageChannel<Object?> pigeonVar_channel =
      BasicMessageChannel<Object?>(
        pigeonVar_channelName,
        pigeonChannelCodec,
        binaryMessenger: pigeonVar_binaryMessenger,
      );
  final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(
    <Object?>[modelId],
  );
  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;
  }
}