moveStyleImport method

Future<void> moveStyleImport(
  1. String importId,
  2. ImportPosition? importPosition
)

Moves import to position before another import, specified with beforeId. Order of imported styles corresponds to order of their layers.

@param importId Identifier of import to move. @param importPosition The import will be positioned according to the ImportPosition parameters. If not specified, then the import is moved to the top of the import stack.

Implementation

Future<void> moveStyleImport(
    String importId, ImportPosition? importPosition) async {
  final String pigeonVar_channelName =
      'dev.flutter.pigeon.mapbox_maps_flutter.StyleManager.moveStyleImport$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, importPosition]);
  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;
  }
}