of static method
The controller for the closest FlutterMap ancestor. If this is called from a context with no FlutterMap ancestor a StateError will be thrown.
Implementation
static MapController of(BuildContext context) =>
maybeOf(context) ??
(throw StateError(
'`MapController.of()` should not be called outside a `FlutterMap` and its children'));