of static method

MapOptions of(
  1. BuildContext context
)

The options of the closest FlutterMap ancestor. If this is called from a context with no FlutterMap ancestor a StateError will be thrown.

Implementation

static MapOptions of(BuildContext context) =>
    maybeOf(context) ??
    (throw StateError(
        '`MapOptions.of()` should not be called outside a `FlutterMap` and its descendants'));