Start by adding some Layers to children, then configure the map in Options. Additionally, if required, add a MapController: .
The map widget will expand to fill its constraints. To avoid errors about infinite/unspecified sizes, ensure the map is contained within a constrained widget.
Keep Alive
If the map is displayed lazily in something like a PageView, changing the page and unloading the map will cause it to reset to its initial positioning.
To prevent this, set MapOptions.keepAlivetrue, which will activate an internal AutomaticKeepAliveClientMixin. This will retain the internal state container in memory, even when it would otherwise be disposed.