TileProvider constructor
Construct the base tile provider and initialise the headers
property
This is not a constant constructor, and does not use an initialising
formal, intentionally. To enable TileLayer to efficiently (without
headers
being non-final or unstable late
) inject the appropriate
'User-Agent' (based on what is specified by the user), the headers
Map
must not be constant.
Extenders should add super.headers
to their constructors if they support
custom HTTP headers. However, they should not provide a constant default
value.
Implementation
TileProvider({Map<String, String>? headers}) : headers = headers ?? {};