watch method
Stream<LocationResult>
watch({
- LocationProfile? profile,
- bool withAddress = false,
- bool handlePermission = true,
- bool handleServices = true,
- LocationAccuracy? accuracy,
- Locale? locale,
- BuildContext? context,
- BackgroundLocation? background,
override
Runs the same setup as get once, then streams results. A setup failure is emitted as one failed result, and the stream closes.
With withAddress, the address is looked up again only after moving
GeocodingConfig.watchRegeocodeMeters or after
watchRegeocodeTtl; a result is emitted again when it arrives.
background keeps it running in the background; see
BackgroundLocation.
Implementation
@override
Stream<LocationResult> watch({
LocationProfile? profile,
bool withAddress = false,
bool handlePermission = true,
bool handleServices = true,
LocationAccuracy? accuracy,
Locale? locale,
BuildContext? context,
BackgroundLocation? background,
}) => _record(
'watch',
{
'profile': profile,
'withAddress': withAddress,
'handlePermission': handlePermission,
'handleServices': handleServices,
'accuracy': accuracy,
'locale': locale,
'background': background,
},
() => _impl.watch(
profile: profile,
withAddress: withAddress,
handlePermission: handlePermission,
handleServices: handleServices,
accuracy: accuracy,
locale: locale,
context: context,
background: background,
),
);