Controller
Initialisation
final mapController = MapController();
@override
Widget build(BuildContext context) =>
FlutterMap(
mapController: mapController,
...
);Usage In initState()
initState()Recommended Usage
@override
void initState(){
super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) {
// Use `MapController` as needed
});
}Alternative Usage
Available Methods
Last updated
Was this helpful?