tileProvider property

TileProvider tileProvider
final

Provider to load the tiles. The default is CachedNetworkTileProvider, which loads tile images from network and caches them offline.

If you don't want to cache the tiles, use NetworkTileProvider instead.

In order to use images from the asset folder set this option to AssetTileProvider() Note that it requires the urlTemplate to target assets, for example:

urlTemplate: "assets/map/anholt_osmbright/{z}/{x}/{y}.png",

In order to use images from the filesystem set this option to FileTileProvider() Note that it requires the urlTemplate to target the file system, for example:

urlTemplate: "/storage/emulated/0/tiles/some_place/{z}/{x}/{y}.png",

Furthermore you create your custom implementation by subclassing TileProvider

Implementation

final TileProvider tileProvider;