maybeOf static method
Implementation
static MapState? maybeOf(BuildContext context, {bool nullOk = false}) {
final widget =
context.dependOnInheritedWidgetOfExactType<MapStateInheritedWidget>();
if (nullOk || widget != null) {
return widget?.mapState;
}
throw FlutterError(
'MapState.of() called with a context that does not contain a FlutterMap.');
}