checkTileCachedAsync method

Future<bool> checkTileCachedAsync({
  1. required Coords<num> coords,
  2. required TileLayer options,
  3. String? customURL,
})

Check whether a specified tile is cached in the current store asynchronously

Implementation

Future<bool> checkTileCachedAsync({
  required Coords<num> coords,
  required TileLayer options,
  String? customURL,
}) async =>
    (storeDirectory.access.tiles >>>
            filesystemSanitiseValidate(
              inputString: customURL ?? getTileUrl(coords, options),
              throwIfInvalid: false,
            ))
        .exists();