invalidate method

Future<void> invalidate()

Invalidate all the tiles for the region forcing to revalidate the tiles with the server before using. This is more efficient than deleting the offline region and downloading it again because if the data on the cache matches the server, no new data gets transmitted.

@param callback Called once the request is complete or an error occurred.

Implementation

Future<void> invalidate() async {
  const String __pigeon_channelName =
      'dev.flutter.pigeon.mapbox_maps_flutter.OfflineRegion.invalidate';
  final BasicMessageChannel<Object?> __pigeon_channel =
      BasicMessageChannel<Object?>(
    __pigeon_channelName,
    pigeonChannelCodec,
    binaryMessenger: __pigeon_binaryMessenger,
  );
  final List<Object?>? __pigeon_replyList =
      await __pigeon_channel.send(null) as List<Object?>?;
  if (__pigeon_replyList == null) {
    throw _createConnectionError(__pigeon_channelName);
  } else if (__pigeon_replyList.length > 1) {
    throw PlatformException(
      code: __pigeon_replyList[0]! as String,
      message: __pigeon_replyList[1] as String?,
      details: __pigeon_replyList[2],
    );
  } else {
    return;
  }
}