DownloadableRegion.internal constructor

  1. @internal
DownloadableRegion.internal({
  1. required List<LatLng> points,
  2. required int minZoom,
  3. required int maxZoom,
  4. required TileLayerOptions options,
  5. required RegionType type,
  6. required BaseRegion originalRegion,
  7. required int parallelThreads,
  8. required bool preventRedownload,
  9. required bool seaTileRemoval,
  10. required int start,
  11. required int? end,
  12. required Crs crs,
  13. required dynamic errorHandler(
    1. Object?
    )?,
})

Avoid construction using this method. Use BaseRegion.toDownloadable to generate DownloadableRegions from other regions.

Implementation

@internal
DownloadableRegion.internal({
  required this.points,
  required this.minZoom,
  required this.maxZoom,
  required this.options,
  required this.type,
  required this.originalRegion,
  required this.parallelThreads,
  required this.preventRedownload,
  required this.seaTileRemoval,
  required this.start,
  required this.end,
  required this.crs,
  required this.errorHandler,
}) {
  if (minZoom > maxZoom) {
    throw ArgumentError(
      '`minZoom` should be less than or equal to `maxZoom`',
    );
  }
  if (parallelThreads < 1) {
    throw ArgumentError(
      '`parallelThreads` should be more than or equal to 1. Set to 1 to disable multithreading',
    );
  }
}