of static method
Get the current geolocation status.
Implementation
static GeolocationStatus of(BuildContext context, {bool listen = true}) {
final inherited = (listen
? context.dependOnInheritedWidgetOfExactType<_InheritedGeolocation>()
: context
.getElementForInheritedWidgetOfExactType<_InheritedGeolocation>()
?.widget) as _InheritedGeolocation?;
if (inherited == null) {
throw Exception('No Geolocation found in widget tree');
}
return inherited.status;
}