check method

Future<int> check(
  1. DownloadableRegion<List<Object>> region
)

Check approximately how many downloadable tiles are within a specified DownloadableRegion

This does not take into account sea tile removal or redownload prevention, as these are handled in the download area of the code.

Returns an int which is the number of tiles.

Implementation

Future<int> check(DownloadableRegion region) => compute(
      region.type == RegionType.rectangle
          ? TilesCounter.rectangleTiles
          : region.type == RegionType.circle
              ? TilesCounter.circleTiles
              : TilesCounter.lineTiles,
      region,
    );