flutter-geolocator
flutter-geolocator copied to clipboard
[Feature] Throw LocationSignalLostException when GPS signal is lost
When the GPS signal is lost while listening for position updates we inform the listener using an exception called LocationSignalLostException. This allows listeners to be aware of position availability changes. The listener can catch and ignore this exception if it is not important to them. The listener knows the GPS signal is restored when they receive a new Position via the stream.
Fixes https://github.com/Baseflow/flutter-geolocator/issues/1355.
Pre-launch Checklist
- [X] I made sure the project builds.
- [X] I read the Contributor Guide and followed the process outlined there for submitting PRs.
- [X] I updated
pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is does not need version changes. - [X] I updated
CHANGELOG.mdto add a description of the change. - [X] I updated/added relevant documentation (doc comments with
///). - [X] I rebased onto
main. - [X] I added new tests to check the change I am making, or this PR does not need tests.
- [X] I made sure all existing and new tests are passing.
- [X] I ran
dart format .and committed any changes. - [X] I ran
flutter analyzeand fixed any errors.