of static method

MapCamera of(
  1. BuildContext context
)

Find the MapCamera of the closest MapLibreMap in the widget tree. Throws an StateError if called outside of the MapLibreMap.children.

Implementation

static MapCamera of(BuildContext context) =>
    maybeOf(context) ??
    (throw StateError('Unable to find an instance of MapCamera'));