-
-
Notifications
You must be signed in to change notification settings - Fork 662
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds WebSettings to allow controlling maximumAge of location update (#…
…1526) * adds WebSettings to allow controlling maximumAge of location update * Update CHANGELOG.md * Update pubspec.yaml * Update CHANGELOG.md * Update pubspec.yaml * Update CHANGELOG.md * Update pubspec.yaml --------- Co-authored-by: Maurits van Beusekom <[email protected]>
- Loading branch information
1 parent
b741647
commit 881786e
Showing
14 changed files
with
161 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import 'package:geolocator_platform_interface/geolocator_platform_interface.dart'; | ||
|
||
/// Represents different Web specific settings with which you can set a value | ||
/// other then the default value of the setting. | ||
class WebSettings extends LocationSettings { | ||
/// Initializes a new [WebSpecificSettings] instance with default values. | ||
WebSettings({ | ||
super.accuracy, | ||
super.distanceFilter, | ||
this.maximumAge = Duration.zero, | ||
super.timeLimit, | ||
}); | ||
|
||
/// A value indicating the maximum age of a possible cached position that is acceptable to return. | ||
/// If set to 0, it means that the device cannot use a cached position and must attempt to retrieve the real current position. | ||
/// Default: 0 | ||
final Duration maximumAge; | ||
|
||
@override | ||
Map<String, dynamic> toJson() { | ||
return super.toJson() | ||
..addAll({ | ||
'maximumAge': maximumAge, | ||
}); | ||
} | ||
} |
Oops, something went wrong.