Migrating To v5
This update brings support for Dart 3 and Flutter 3.10.
We've updated some dependencies, including 'latlong2' (to 0.9.0) and 'http' (1.0.0)!
LatLngobjects now have
constconstructors to improve performance. To automatically insert the
constkeyword where necessary, run
There are a few minor breaking changes for some users, but most changes are internal and need no work to take advantage of.
Please refer to the sections below for information on how to migrate your project. This will contain the changes that most users may need to make, but not all changes. It also excludes some deprecations where the message is self-descriptive.
NetworkNoRetryTileProviderhas been removed &
NetworkTileProvidernow retries failed requests by default
NetworkNoRetryTileProviderdid not automatically retry requests, unlike
NetworkTileProvider. The differentiation was required because of restrictions of its HTTP client and ability to change its headers.
This appears to be fixed, so this workaround is no longer required.
NetworkTileProvidernow uses a
NetworkNoRetryTileProviderhas been removed.
If you were leaving the
TileProviderat its default (
NetworkNoRetryTileProvider), no migration is necessary. Most users should not see a difference with the new retry strategy, as it is preferable anyway.
If non-retriable requests are a necessity, specify
NetworkTileProvider, and manually set its
httpClientproperty to a standard
FileTileProviderredirected automatically on web to a
NetworkImageinternally, as the web platform does not have access to IO.
To migrate, detect the web platform yourself (if you run on it), and switch automatically to
Whether canvas layers need to be saved is now decided automatically internally. If the polyline(s) within have translucency (<1 opacity), the canvas layers will be saved, to improve the render quality. Otherwise, they will not be unnecessarily saved, in order to improve performance.
To migrate, remove the argument without replacement.
numas their generic type, which lead to type casting within FM and plugins, as some code only allowed
Many of these have been updated to reflect their true usage.
To migrate, look for any methods which now take a different generic typed
CustomPointthan was previously required. These should then be either casted at this location, or the source of the number should more accurately represent what the number will be.