Steps to reproduce:
- show a map
- leave the app (e.g. switch to another app or lock the screen)
- come back to the app
Problem:
The map stays black and is not redrawn. (Interacting with it triggers a redraw and it is shown again.)
Workaround:
Call triggerRepaint() in the onResume callback of AppLivecycleListener:
@override
void initState() {
super.initState();
_lifecycleListener = AppLifecycleListener(
onResume: () => WidgetsBinding.instance.addPostFrameCallback(
(_) => _mapController?.triggerRepaint(),
),
);
}
Versions:
- Flutter:
3.44.8
- mapbox_maps_flutter:
2.27.0
- Android:
17
Steps to reproduce:
Problem:
The map stays black and is not redrawn. (Interacting with it triggers a redraw and it is shown again.)
Workaround:
Call
triggerRepaint()in theonResumecallback ofAppLivecycleListener:Versions:
3.44.82.27.017