Skip to content

Commit

Permalink
Ensure timestamp is not null (#1377)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvanbeusekom authored Nov 14, 2023
1 parent 5b07c28 commit b311084
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
8 changes: 8 additions & 0 deletions geolocator/example/windows/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ list(APPEND FLUTTER_PLUGIN_LIST
url_launcher_windows
)

list(APPEND FLUTTER_FFI_PLUGIN_LIST
)

set(PLUGIN_BUNDLED_LIBRARIES)

foreach(plugin ${FLUTTER_PLUGIN_LIST})
Expand All @@ -15,3 +18,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST})
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
endforeach(plugin)

foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
endforeach(ffi_plugin)
4 changes: 4 additions & 0 deletions geolocator_linux/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.2.0+1

- Ensures the `Position` instance always contains a timestamp.

## 0.2.0

- Bumps `geolocator_platform_interface` dependency to `^4.1.0`.
Expand Down
2 changes: 1 addition & 1 deletion geolocator_linux/lib/src/geoclue_x.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ extension GeoCluePosition on GeoClueLocation {
headingAccuracy: 0,
latitude: latitude,
longitude: longitude,
timestamp: timestamp,
timestamp: timestamp ?? DateTime.now(),
speed: speed ?? 0,
speedAccuracy: 0,
);
Expand Down
2 changes: 1 addition & 1 deletion geolocator_linux/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Geolocation Linux plugin for Flutter. This plugin provides the
Linux implementation for the geolocator.
repository: https://github.com/baseflow/flutter-geolocator/tree/main/geolocator_linux
issue_tracker: https://github.com/baseflow/flutter-geolocator/issues?q=is%3Aissue+is%3Aopen
version: 0.2.0
version: 0.2.0+1

environment:
sdk: '>=2.15.0 <4.0.0'
Expand Down

0 comments on commit b311084

Please sign in to comment.