flutter_map Docs
Project Links💝 Support Us
v3
v3
  • flutter_map
  • Getting Started
    • Installation
    • Additional Setup
    • Examples
    • How Does It Work?
      • Raster vs Vector Tiles
  • Usage
    • Base Widget
    • Options
      • Recommended Options
      • Other Options
    • Layers
      • Tile Layer
        • Recommended Options
        • Tile Providers
        • Other Options
      • Marker Layer
      • Polygon Layer
      • Polyline Layer
      • Circle Layer
      • Attribution Layer
      • WMS Usage
    • Controller
    • Full API Reference
  • Plugins
    • Plugins List
    • Making A Plugin
      • Creating New Tile Providers
      • Creating New Layers
  • Tile Servers
    • Using Mapbox
    • Using Stadia Maps
    • Using Thunderforest
    • Offline Mapping
    • Other Options
  • FAQs
    • Frequently Asked Questions
    • Map Controller Issues
  • Migration
    • To v3.0.0
    • To v2.0.0
    • Older Versions
      • To v1.1.0
      • To v1.0.0
      • To v0.15.0
  • Contributing
  • Credits
Powered by GitBook

© flutter_map Authors & Maintainers

On this page

Was this helpful?

Export as PDF
  1. FAQs

Map Controller Issues

PreviousFrequently Asked QuestionsNextTo v3.0.0

Last updated 2 years ago

Was this helpful?

These issues appear significantly less after v2.1.0, due to the reworking of the MapController lifecycle.

If you are experiencing these errors, please consider updating to this version or later.

This class of errors is usually caused by mis-configuring MapControllers (see Controller), or using them in complex layouts.

If you're having these issues - which can manifest as LateInitializationErrors and/or BadState errors - there are a few things you can try to help out:

  • Fully read the Controller page, and choose the right implementation/usage for your situation.

  • In complex layouts, such as with PageViews or ListViews, use the property.

  • If sharing the map controller, for example through Provider, make sure that the shared controller is initialised and destroyed/uninitialised at the same time as the FlutterMap.

Keep Alive (keepAlive)