From d5b254e3b27c2bf5b521cbe3679334a7a3744e1d Mon Sep 17 00:00:00 2001 From: Lzyct Date: Sun, 26 Feb 2023 07:28:22 +0800 Subject: [PATCH 01/14] feat: add searchHint to localizationItem --- lib/entities/localization_item.dart | 3 ++- lib/widgets/place_picker.dart | 7 ++++--- lib/widgets/search_input.dart | 11 ++++++++--- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/lib/entities/localization_item.dart b/lib/entities/localization_item.dart index 985416f..224308a 100644 --- a/lib/entities/localization_item.dart +++ b/lib/entities/localization_item.dart @@ -5,7 +5,7 @@ class LocalizationItem { String noResultsFound; String unnamedLocation; String tapToSelectLocation; - + String searchHint; LocalizationItem({ this.languageCode = 'en_us', @@ -14,5 +14,6 @@ class LocalizationItem { this.noResultsFound = 'No results found', this.unnamedLocation = 'Unnamed location', this.tapToSelectLocation = 'Tap to select this location', + this.searchHint = 'Search place', }); } diff --git a/lib/widgets/place_picker.dart b/lib/widgets/place_picker.dart index dc2aec1..2f19010 100644 --- a/lib/widgets/place_picker.dart +++ b/lib/widgets/place_picker.dart @@ -137,14 +137,14 @@ class PlacePickerState extends State { locationResult = null; _delayedPop(); return Future.value(false); - } else { + } else { return Future.value(true); } }, child: Scaffold( appBar: AppBar( key: this.appBarKey, - title: SearchInput(searchPlace), + title: SearchInput(searchPlace, widget.localizationItem!), centerTitle: true, automaticallyImplyLeading: false, ), @@ -193,7 +193,8 @@ class PlacePickerState extends State { Padding( child: Text(widget.localizationItem!.nearBy, style: TextStyle(fontSize: 16)), - padding: EdgeInsets.symmetric(horizontal: 24, vertical: 8), + padding: + EdgeInsets.symmetric(horizontal: 24, vertical: 8), ), Expanded( child: ListView( diff --git a/lib/widgets/search_input.dart b/lib/widgets/search_input.dart index 299c917..a1af085 100644 --- a/lib/widgets/search_input.dart +++ b/lib/widgets/search_input.dart @@ -1,12 +1,14 @@ import 'dart:async'; import 'package:flutter/material.dart'; +import 'package:place_picker/entities/localization_item.dart'; /// Custom Search input field, showing the search and clear icons. class SearchInput extends StatefulWidget { final ValueChanged onSearchInput; + final LocalizationItem localizationItem; - SearchInput(this.onSearchInput); + SearchInput(this.onSearchInput, this.localizationItem); @override State createState() => SearchInputState(); @@ -57,11 +59,14 @@ class SearchInputState extends State { padding: EdgeInsets.symmetric(horizontal: 8), child: Row( children: [ - Icon(Icons.search, color: Theme.of(context).textTheme.bodyText1?.color), + Icon(Icons.search, + color: Theme.of(context).textTheme.bodyText1?.color), SizedBox(width: 8), Expanded( child: TextField( - decoration: InputDecoration(hintText: "Search place", border: InputBorder.none), + decoration: InputDecoration( + hintText: widget.localizationItem.searchHint, + border: InputBorder.none), controller: this.editController, onChanged: (value) { setState(() { From 00b2bd37553a237d66acac4257bf28fadba131c7 Mon Sep 17 00:00:00 2001 From: Lzyct Date: Sun, 26 Feb 2023 07:47:53 +0800 Subject: [PATCH 02/14] feat: add library version, add option to show / hide back button --- lib/widgets/place_picker.dart | 8 ++++++-- pubspec.yaml | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/widgets/place_picker.dart b/lib/widgets/place_picker.dart index 2f19010..36fa5e4 100644 --- a/lib/widgets/place_picker.dart +++ b/lib/widgets/place_picker.dart @@ -23,6 +23,7 @@ class PlacePicker extends StatefulWidget { /// API key generated from Google Cloud Console. You can get an API key /// [here](https://cloud.google.com/maps-platform/) final String apiKey; + final bool showBackButton; /// Location to be displayed when screen is showed. If this is set or not null, the /// map does not pan to the user's current location. @@ -31,7 +32,10 @@ class PlacePicker extends StatefulWidget { LatLng defaultLocation = LatLng(10.5381264, 73.8827201); PlacePicker(this.apiKey, - {this.displayLocation, this.localizationItem, LatLng? defaultLocation}) { + {this.displayLocation, + this.localizationItem, + LatLng? defaultLocation, + this.showBackButton = false}) { if (this.localizationItem == null) { this.localizationItem = new LocalizationItem(); } @@ -146,7 +150,7 @@ class PlacePickerState extends State { key: this.appBarKey, title: SearchInput(searchPlace, widget.localizationItem!), centerTitle: true, - automaticallyImplyLeading: false, + automaticallyImplyLeading: widget.showBackButton, ), body: Column( children: [ diff --git a/pubspec.yaml b/pubspec.yaml index 75d6448..fc8e3f6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -10,9 +10,9 @@ dependencies: flutter: sdk: flutter http: ^0.13.5 - google_maps_flutter: ^2.2.0 + google_maps_flutter: ^2.2.4 # location: ^4.4.0 - geolocator: ^9.0.1 + geolocator: ^9.0.2 dev_dependencies: flutter_test: From fd6161ef22833ea04823e5c5608b54744ca20bf3 Mon Sep 17 00:00:00 2001 From: Lzyct Date: Sun, 26 Feb 2023 08:01:02 +0800 Subject: [PATCH 03/14] feat: add appBarOptions --- lib/entities/app_bar_options.dart | 8 ++++++++ lib/entities/entities.dart | 1 + lib/widgets/place_picker.dart | 8 +++++--- 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 lib/entities/app_bar_options.dart diff --git a/lib/entities/app_bar_options.dart b/lib/entities/app_bar_options.dart new file mode 100644 index 0000000..c076e2c --- /dev/null +++ b/lib/entities/app_bar_options.dart @@ -0,0 +1,8 @@ +import 'package:flutter/material.dart'; + +class AppBarOptions { + final bool showBackButton; + final Widget? leading; + + AppBarOptions({this.showBackButton = false, this.leading}); +} diff --git a/lib/entities/entities.dart b/lib/entities/entities.dart index c37278c..e7406d8 100644 --- a/lib/entities/entities.dart +++ b/lib/entities/entities.dart @@ -1,4 +1,5 @@ export 'address_component.dart'; +export 'app_bar_options.dart'; export 'auto_complete_item.dart'; export 'location_result.dart'; export 'near_by_place.dart'; diff --git a/lib/widgets/place_picker.dart b/lib/widgets/place_picker.dart index 36fa5e4..34222d9 100644 --- a/lib/widgets/place_picker.dart +++ b/lib/widgets/place_picker.dart @@ -23,7 +23,7 @@ class PlacePicker extends StatefulWidget { /// API key generated from Google Cloud Console. You can get an API key /// [here](https://cloud.google.com/maps-platform/) final String apiKey; - final bool showBackButton; + final AppBarOptions? appBarOptions; /// Location to be displayed when screen is showed. If this is set or not null, the /// map does not pan to the user's current location. @@ -35,7 +35,7 @@ class PlacePicker extends StatefulWidget { {this.displayLocation, this.localizationItem, LatLng? defaultLocation, - this.showBackButton = false}) { + this.appBarOptions}) { if (this.localizationItem == null) { this.localizationItem = new LocalizationItem(); } @@ -150,7 +150,9 @@ class PlacePickerState extends State { key: this.appBarKey, title: SearchInput(searchPlace, widget.localizationItem!), centerTitle: true, - automaticallyImplyLeading: widget.showBackButton, + leading: widget.appBarOptions?.leading, + automaticallyImplyLeading: + widget.appBarOptions?.showBackButton ?? false, ), body: Column( children: [ From 568133f6452081d1af6d7bf6b3d908855ab9edb5 Mon Sep 17 00:00:00 2001 From: Lzyct Date: Sat, 17 Jun 2023 21:53:18 +0800 Subject: [PATCH 04/14] chore: update library version --- pubspec.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index fc8e3f6..8d48b19 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -9,8 +9,8 @@ environment: dependencies: flutter: sdk: flutter - http: ^0.13.5 - google_maps_flutter: ^2.2.4 + http: ^1.0.0 + google_maps_flutter: ^2.3.1 # location: ^4.4.0 geolocator: ^9.0.2 From f258f1ca8b288f9403ca9bda5525aa17684c0b59 Mon Sep 17 00:00:00 2001 From: Lzyct Date: Sun, 20 Aug 2023 14:05:36 +0800 Subject: [PATCH 05/14] chore: update library version and support dart 3 --- pubspec.lock | 243 +++++++++++++++++++++++++++++++++++---------------- pubspec.yaml | 8 +- 2 files changed, 171 insertions(+), 80 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 56e97de..76bbc4a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,51 +5,66 @@ packages: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" source: hosted - version: "2.8.2" + version: "2.11.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.0" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + url: "https://pub.dev" + source: hosted + version: "1.17.1" + crypto: + dependency: transitive + description: + name: crypto + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "3.0.3" + csslib: + dependency: transitive + description: + name: csslib + sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb" + url: "https://pub.dev" + source: hosted + version: "1.0.0" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.3.1" flutter: dependency: "direct main" description: flutter @@ -59,9 +74,10 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - url: "https://pub.dartlang.org" + sha256: "950e77c2bbe1692bc0874fc7fb491b96a4dc340457f4ea1641443d0a6c1ea360" + url: "https://pub.dev" source: hosted - version: "2.0.5" + version: "2.0.15" flutter_test: dependency: "direct dev" description: flutter @@ -76,128 +92,186 @@ packages: dependency: "direct main" description: name: geolocator - url: "https://pub.dartlang.org" + sha256: "5c23f3613f50586c0bbb2b8f970240ae66b3bd992088cf60dd5ee2e6f7dde3a8" + url: "https://pub.dev" source: hosted - version: "9.0.1" + version: "9.0.2" geolocator_android: dependency: transitive description: name: geolocator_android - url: "https://pub.dartlang.org" + sha256: "835ff5b4888a2f8eba128996494faf9c5d422785322a81dc0565b99e0f6c379d" + url: "https://pub.dev" source: hosted - version: "4.1.0" + version: "4.2.2" geolocator_apple: dependency: transitive description: name: geolocator_apple - url: "https://pub.dartlang.org" + sha256: "36527c555f4c425f7d8fa8c7c07d67b78e3ff7590d40448051959e1860c1cfb4" + url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.2.7" geolocator_platform_interface: dependency: transitive description: name: geolocator_platform_interface - url: "https://pub.dartlang.org" + sha256: af4d69231452f9620718588f41acc4cb58312368716bfff2e92e770b46ce6386 + url: "https://pub.dev" source: hosted - version: "4.0.6" + version: "4.0.7" geolocator_web: dependency: transitive description: name: geolocator_web - url: "https://pub.dartlang.org" + sha256: f68a122da48fcfff68bbc9846bb0b74ef651afe84a1b1f6ec20939de4d6860e1 + url: "https://pub.dev" source: hosted version: "2.1.6" geolocator_windows: dependency: transitive description: name: geolocator_windows - url: "https://pub.dartlang.org" + sha256: "4f4218f122a6978d0ad655fa3541eea74c67417440b09f0657238810d5af6bdc" + url: "https://pub.dev" source: hosted - version: "0.1.1" + version: "0.1.3" + google_maps: + dependency: transitive + description: + name: google_maps + sha256: "555d5d736339b0478e821167ac521c810d7b51c3b2734e6802a9f046b64ea37a" + url: "https://pub.dev" + source: hosted + version: "6.3.0" google_maps_flutter: dependency: "direct main" description: name: google_maps_flutter - url: "https://pub.dartlang.org" + sha256: c290921cd1750b5ede99c82dcaa84740da86278e6ed0f83ad29752b29a8552c6 + url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.4.0" google_maps_flutter_android: dependency: transitive description: name: google_maps_flutter_android - url: "https://pub.dartlang.org" + sha256: fb3e52f94d0736f6ee8bcdef290f8eab9325376d676f61303347c10ccf15379c + url: "https://pub.dev" source: hosted - version: "2.1.10" + version: "2.4.16" google_maps_flutter_ios: dependency: transitive description: name: google_maps_flutter_ios - url: "https://pub.dartlang.org" + sha256: a9462a433bf3ebe60aadcf4906d2d6341a270d69d3e0fcaa8eb2b64699fcfb4f + url: "https://pub.dev" source: hosted - version: "2.1.11" + version: "2.2.3" google_maps_flutter_platform_interface: dependency: transitive description: name: google_maps_flutter_platform_interface - url: "https://pub.dartlang.org" + sha256: b363e9a1ef7d063fb21ec8eef5a450db4b0500cc39712c9410b5cc64013d6fc6 + url: "https://pub.dev" + source: hosted + version: "2.4.0" + google_maps_flutter_web: + dependency: transitive + description: + name: google_maps_flutter_web + sha256: "229391997f216d37c76bfc10d9b5837a1dfeb98c4b4063c605016382e5bcd910" + url: "https://pub.dev" source: hosted - version: "2.2.2" + version: "0.5.3" + html: + dependency: transitive + description: + name: html + sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" + url: "https://pub.dev" + source: hosted + version: "0.15.4" http: dependency: "direct main" description: name: http - url: "https://pub.dartlang.org" + sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525" + url: "https://pub.dev" source: hosted - version: "0.13.5" + version: "1.1.0" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.0.2" js: dependency: transitive description: name: js - url: "https://pub.dartlang.org" + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" source: hosted - version: "0.6.4" + version: "0.6.7" + js_wrapping: + dependency: transitive + description: + name: js_wrapping + sha256: e385980f7c76a8c1c9a560dfb623b890975841542471eade630b2871d243851c + url: "https://pub.dev" + source: hosted + version: "0.7.4" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" + url: "https://pub.dev" source: hosted - version: "0.12.11" + version: "0.12.15" material_color_utilities: dependency: transitive description: name: material_color_utilities - url: "https://pub.dartlang.org" + sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + url: "https://pub.dev" source: hosted - version: "0.1.4" + version: "0.2.0" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + url: "https://pub.dev" source: hosted - version: "1.7.0" + version: "1.9.1" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + url: "https://pub.dev" source: hosted - version: "1.8.1" + version: "1.8.3" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + sha256: "43798d895c929056255600343db8f049921cbec94d31ec87f1dc5c16c01935dd" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.5" + sanitize_html: + dependency: transitive + description: + name: sanitize_html + sha256: "0a445f19bbaa196f5a4f93461aa066b94e6e025622eb1e9bc77872a5e25233a5" + url: "https://pub.dev" + source: hosted + version: "2.0.0" sky_engine: dependency: transitive description: flutter @@ -207,65 +281,82 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.9.1" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" stream_transform: dependency: transitive description: name: stream_transform - url: "https://pub.dartlang.org" + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb + url: "https://pub.dev" source: hosted - version: "0.4.9" + version: "0.5.1" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.3.2" + uuid: + dependency: transitive + description: + name: uuid + sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + url: "https://pub.dev" + source: hosted + version: "3.0.7" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" sdks: - dart: ">=2.17.0-0 <3.0.0" - flutter: ">=2.10.0" + dart: ">=3.0.0 <4.0.0" + flutter: ">=3.10.0" diff --git a/pubspec.yaml b/pubspec.yaml index 8d48b19..b1b4461 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,15 +4,15 @@ version: 0.10.0 homepage: https://github.com/blackmann/locationpicker environment: - sdk: ">=2.14.0 <3.0.0" + sdk: ^3.0.0 dependencies: flutter: sdk: flutter - http: ^1.0.0 - google_maps_flutter: ^2.3.1 + http: ^1.1.0 + google_maps_flutter: ^2.4.0 # location: ^4.4.0 - geolocator: ^9.0.2 + geolocator: ^10.0.0 dev_dependencies: flutter_test: From 60afbf75323918e89d8079352a4ee2b24ef7c95f Mon Sep 17 00:00:00 2001 From: Lzyct Date: Tue, 20 Feb 2024 22:33:42 +0800 Subject: [PATCH 06/14] chore: update library version --- pubspec.lock | 140 +++++++++++++++++++++++++++++++++++---------------- pubspec.yaml | 6 +-- 2 files changed, 101 insertions(+), 45 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 76bbc4a..022bf9d 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -37,10 +37,10 @@ packages: dependency: transitive description: name: collection - sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.17.1" + version: "1.18.0" crypto: dependency: transitive description: @@ -65,6 +65,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" + source: hosted + version: "1.1.0" flutter: dependency: "direct main" description: flutter @@ -92,50 +100,50 @@ packages: dependency: "direct main" description: name: geolocator - sha256: "5c23f3613f50586c0bbb2b8f970240ae66b3bd992088cf60dd5ee2e6f7dde3a8" + sha256: "694ec58afe97787b5b72b8a0ab78c1a9244811c3c10e72c4362ef3c0ceb005cd" url: "https://pub.dev" source: hosted - version: "9.0.2" + version: "11.0.0" geolocator_android: dependency: transitive description: name: geolocator_android - sha256: "835ff5b4888a2f8eba128996494faf9c5d422785322a81dc0565b99e0f6c379d" + sha256: "136f1c97e1903366393bda514c5d9e98843418baea52899aa45edae9af8a5cd6" url: "https://pub.dev" source: hosted - version: "4.2.2" + version: "4.5.2" geolocator_apple: dependency: transitive description: name: geolocator_apple - sha256: "36527c555f4c425f7d8fa8c7c07d67b78e3ff7590d40448051959e1860c1cfb4" + sha256: "2f2d4ee16c4df269e93c0e382be075cc01d5db6703c3196e4af20a634fe49ef4" url: "https://pub.dev" source: hosted - version: "2.2.7" + version: "2.3.6" geolocator_platform_interface: dependency: transitive description: name: geolocator_platform_interface - sha256: af4d69231452f9620718588f41acc4cb58312368716bfff2e92e770b46ce6386 + sha256: b8cc1d3be0ca039a3f2174b0b026feab8af3610e220b8532e42cff8ec6658535 url: "https://pub.dev" source: hosted - version: "4.0.7" + version: "4.1.0" geolocator_web: dependency: transitive description: name: geolocator_web - sha256: f68a122da48fcfff68bbc9846bb0b74ef651afe84a1b1f6ec20939de4d6860e1 + sha256: "49d8f846ebeb5e2b6641fe477a7e97e5dd73f03cbfef3fd5c42177b7300fb0ed" url: "https://pub.dev" source: hosted - version: "2.1.6" + version: "3.0.0" geolocator_windows: dependency: transitive description: name: geolocator_windows - sha256: "4f4218f122a6978d0ad655fa3541eea74c67417440b09f0657238810d5af6bdc" + sha256: a92fae29779d5c6dc60e8411302f5221ade464968fe80a36d330e80a71f087af url: "https://pub.dev" source: hosted - version: "0.1.3" + version: "0.2.2" google_maps: dependency: transitive description: @@ -148,26 +156,26 @@ packages: dependency: "direct main" description: name: google_maps_flutter - sha256: c290921cd1750b5ede99c82dcaa84740da86278e6ed0f83ad29752b29a8552c6 + sha256: ae66fef3e71261d7df2eff29b2a119e190b2884325ecaa55321b1e17b5504066 url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.5.3" google_maps_flutter_android: dependency: transitive description: name: google_maps_flutter_android - sha256: fb3e52f94d0736f6ee8bcdef290f8eab9325376d676f61303347c10ccf15379c + sha256: "714530f865f13bb3b9505c58821c3baed5d247a871724acf5d2ea5808fbed02c" url: "https://pub.dev" source: hosted - version: "2.4.16" + version: "2.6.2" google_maps_flutter_ios: dependency: transitive description: name: google_maps_flutter_ios - sha256: a9462a433bf3ebe60aadcf4906d2d6341a270d69d3e0fcaa8eb2b64699fcfb4f + sha256: "29503b5159da2308a66212c3827963998bfb943ba073e2114fb2d486b47fd2c8" url: "https://pub.dev" source: hosted - version: "2.2.3" + version: "2.4.2" google_maps_flutter_platform_interface: dependency: transitive description: @@ -196,10 +204,10 @@ packages: dependency: "direct main" description: name: http - sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525" + sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.1" http_parser: dependency: transitive description: @@ -224,38 +232,62 @@ packages: url: "https://pub.dev" source: hosted version: "0.7.4" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.dev" + source: hosted + version: "10.0.0" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.dev" + source: hosted + version: "2.0.1" matcher: dependency: transitive description: name: matcher - sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.15" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.11.0" path: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" plugin_platform_interface: dependency: transitive description: @@ -281,26 +313,34 @@ packages: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" stack_trace: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" stream_transform: dependency: transitive description: @@ -329,10 +369,10 @@ packages: dependency: transitive description: name: test_api - sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "0.6.1" typed_data: dependency: transitive description: @@ -345,10 +385,10 @@ packages: dependency: transitive description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8 url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.3.3" vector_math: dependency: transitive description: @@ -357,6 +397,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + url: "https://pub.dev" + source: hosted + version: "13.0.0" + web: + dependency: transitive + description: + name: web + sha256: "1d9158c616048c38f712a6646e317a3426da10e884447626167240d45209cbad" + url: "https://pub.dev" + source: hosted + version: "0.5.0" sdks: - dart: ">=3.0.0 <4.0.0" - flutter: ">=3.10.0" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.16.6" diff --git a/pubspec.yaml b/pubspec.yaml index b1b4461..4b44194 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -9,10 +9,10 @@ environment: dependencies: flutter: sdk: flutter - http: ^1.1.0 - google_maps_flutter: ^2.4.0 + http: ^1.2.1 + google_maps_flutter: ^2.5.3 # location: ^4.4.0 - geolocator: ^10.0.0 + geolocator: ^11.0.0 dev_dependencies: flutter_test: From 0005ab90da43fbc63630d883c414207977ea71ba Mon Sep 17 00:00:00 2001 From: Lzyct Date: Mon, 20 May 2024 19:01:38 +0800 Subject: [PATCH 07/14] chore: update library version --- pubspec.lock | 46 +++++++++++++++++++++++----------------------- pubspec.yaml | 4 ++-- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 022bf9d..d9e569b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -100,10 +100,10 @@ packages: dependency: "direct main" description: name: geolocator - sha256: "694ec58afe97787b5b72b8a0ab78c1a9244811c3c10e72c4362ef3c0ceb005cd" + sha256: "149876cc5207a0f5daf4fdd3bfcf0a0f27258b3fe95108fa084f527ad0568f1b" url: "https://pub.dev" source: hosted - version: "11.0.0" + version: "12.0.0" geolocator_android: dependency: transitive description: @@ -124,18 +124,18 @@ packages: dependency: transitive description: name: geolocator_platform_interface - sha256: b8cc1d3be0ca039a3f2174b0b026feab8af3610e220b8532e42cff8ec6658535 + sha256: c6005787efe9e27cb0f6b50230c217e6f0ef8e1e7a8b854efb4f46489e502603 url: "https://pub.dev" source: hosted - version: "4.1.0" + version: "4.2.3" geolocator_web: dependency: transitive description: name: geolocator_web - sha256: "49d8f846ebeb5e2b6641fe477a7e97e5dd73f03cbfef3fd5c42177b7300fb0ed" + sha256: "7a22f400d831f924a89d931ba126a10e6b8b437f31e6b9311320435f3e1571bd" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "4.0.0" geolocator_windows: dependency: transitive description: @@ -148,50 +148,50 @@ packages: dependency: transitive description: name: google_maps - sha256: "555d5d736339b0478e821167ac521c810d7b51c3b2734e6802a9f046b64ea37a" + sha256: "47eef3836b49bb030d5cb3afc60b8451408bf34cf753e571b645d6529eb4251a" url: "https://pub.dev" source: hosted - version: "6.3.0" + version: "7.1.0" google_maps_flutter: dependency: "direct main" description: name: google_maps_flutter - sha256: ae66fef3e71261d7df2eff29b2a119e190b2884325ecaa55321b1e17b5504066 + sha256: c1972cbad779bc5346c49045f26ae45550a0958b1cbca5b524dd3c8954995d28 url: "https://pub.dev" source: hosted - version: "2.5.3" + version: "2.6.1" google_maps_flutter_android: dependency: transitive description: name: google_maps_flutter_android - sha256: "714530f865f13bb3b9505c58821c3baed5d247a871724acf5d2ea5808fbed02c" + sha256: "0bcadb80eba39afda77dede89a6caafd3b68f2786b90491eceea4a01c3db181c" url: "https://pub.dev" source: hosted - version: "2.6.2" + version: "2.8.0" google_maps_flutter_ios: dependency: transitive description: name: google_maps_flutter_ios - sha256: "29503b5159da2308a66212c3827963998bfb943ba073e2114fb2d486b47fd2c8" + sha256: e5132d17f051600d90d79d9f574b177c24231da702453a036db2490f9ced4646 url: "https://pub.dev" source: hosted - version: "2.4.2" + version: "2.6.0" google_maps_flutter_platform_interface: dependency: transitive description: name: google_maps_flutter_platform_interface - sha256: b363e9a1ef7d063fb21ec8eef5a450db4b0500cc39712c9410b5cc64013d6fc6 + sha256: "167af879da4d004cd58771f1469b91dcc3b9b0a2c5334cc6bf71fd41d4b35403" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.6.0" google_maps_flutter_web: dependency: transitive description: name: google_maps_flutter_web - sha256: "229391997f216d37c76bfc10d9b5837a1dfeb98c4b4063c605016382e5bcd910" + sha256: "0c0d5c723d94b295cf86dd1c45ff91d2ac1fff7c05ddca4f01bef9fa0a014690" url: "https://pub.dev" source: hosted - version: "0.5.3" + version: "0.5.7" html: dependency: transitive description: @@ -292,10 +292,10 @@ packages: dependency: transitive description: name: plugin_platform_interface - sha256: "43798d895c929056255600343db8f049921cbec94d31ec87f1dc5c16c01935dd" + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" url: "https://pub.dev" source: hosted - version: "2.1.5" + version: "2.1.8" sanitize_html: dependency: transitive description: @@ -409,10 +409,10 @@ packages: dependency: transitive description: name: web - sha256: "1d9158c616048c38f712a6646e317a3426da10e884447626167240d45209cbad" + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.5.1" sdks: dart: ">=3.3.0 <4.0.0" - flutter: ">=3.16.6" + flutter: ">=3.19.0" diff --git a/pubspec.yaml b/pubspec.yaml index 4b44194..d117657 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -10,9 +10,9 @@ dependencies: flutter: sdk: flutter http: ^1.2.1 - google_maps_flutter: ^2.5.3 + google_maps_flutter: ^2.6.1 # location: ^4.4.0 - geolocator: ^11.0.0 + geolocator: ^12.0.0 dev_dependencies: flutter_test: From 29f3e6a2991ed1b00485af6113eaec375058a4b5 Mon Sep 17 00:00:00 2001 From: Lzyct Date: Mon, 20 May 2024 20:00:40 +0800 Subject: [PATCH 08/14] fix: resolve issue after upgrade to Flutter 3.22.0 --- example/example.dart | 2 +- lib/widgets/rich_suggestion.dart | 15 ++++++++++----- lib/widgets/search_input.dart | 2 +- pubspec.lock | 24 ++++++++++++------------ 4 files changed, 24 insertions(+), 19 deletions(-) diff --git a/example/example.dart b/example/example.dart index 768db3f..71fda75 100644 --- a/example/example.dart +++ b/example/example.dart @@ -12,7 +12,7 @@ class PickerDemoState extends State { return Scaffold( appBar: AppBar(title: const Text('Picker Example')), body: Center( - child: FlatButton( + child: TextButton( child: Text("Pick Delivery location"), onPressed: () { showPlacePicker(); diff --git a/lib/widgets/rich_suggestion.dart b/lib/widgets/rich_suggestion.dart index 7c3a5b1..7abd206 100644 --- a/lib/widgets/rich_suggestion.dart +++ b/lib/widgets/rich_suggestion.dart @@ -24,18 +24,23 @@ class RichSuggestion extends StatelessWidget { final List result = []; final style = TextStyle(color: Colors.grey, fontSize: 15); - final startText = autoCompleteItem.text?.substring(0, autoCompleteItem.offset); + final startText = + autoCompleteItem.text?.substring(0, autoCompleteItem.offset); if (startText?.isNotEmpty == true) { result.add(TextSpan(text: startText, style: style)); } - final boldText = - autoCompleteItem.text?.substring(autoCompleteItem.offset!, autoCompleteItem.offset! + autoCompleteItem.length!); + final boldText = autoCompleteItem.text?.substring(autoCompleteItem.offset!, + autoCompleteItem.offset! + autoCompleteItem.length!); result.add( - TextSpan(text: boldText, style: style.copyWith(color: Theme.of(context).textTheme.bodyText1?.color)), + TextSpan( + text: boldText, + style: style.copyWith( + color: Theme.of(context).textTheme.bodyMedium?.color)), ); - final remainingText = autoCompleteItem.text?.substring(autoCompleteItem.offset! + autoCompleteItem.length!); + final remainingText = autoCompleteItem.text + ?.substring(autoCompleteItem.offset! + autoCompleteItem.length!); result.add(TextSpan(text: remainingText, style: style)); return result; diff --git a/lib/widgets/search_input.dart b/lib/widgets/search_input.dart index a1af085..38e4ffa 100644 --- a/lib/widgets/search_input.dart +++ b/lib/widgets/search_input.dart @@ -60,7 +60,7 @@ class SearchInputState extends State { child: Row( children: [ Icon(Icons.search, - color: Theme.of(context).textTheme.bodyText1?.color), + color: Theme.of(context).textTheme.bodyMedium?.color), SizedBox(width: 8), Expanded( child: TextField( diff --git a/pubspec.lock b/pubspec.lock index d9e569b..53c73a0 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -236,26 +236,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.4" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.3" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" matcher: dependency: transitive description: @@ -276,10 +276,10 @@ packages: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.12.0" path: dependency: transitive description: @@ -369,10 +369,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" typed_data: dependency: transitive description: @@ -401,10 +401,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" web: dependency: transitive description: From 04d98a3eb87222cf82b1836e2d7b82cf3d9827e9 Mon Sep 17 00:00:00 2001 From: Lzyct Date: Mon, 26 Aug 2024 22:00:27 +0800 Subject: [PATCH 09/14] chore: update library version --- pubspec.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index d117657..ed0583e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -9,10 +9,10 @@ environment: dependencies: flutter: sdk: flutter - http: ^1.2.1 - google_maps_flutter: ^2.6.1 + http: ^1.2.2 + google_maps_flutter: ^2.9.0 # location: ^4.4.0 - geolocator: ^12.0.0 + geolocator: ^13.0.1 dev_dependencies: flutter_test: From 9c8c64e3839c5f005a228ec9833225be45599e41 Mon Sep 17 00:00:00 2001 From: Lzyct Date: Wed, 23 Oct 2024 20:31:02 +0800 Subject: [PATCH 10/14] chore: dart pub upgrade --- pubspec.lock | 124 ++++++++++++++++++++++----------------------------- 1 file changed, 54 insertions(+), 70 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 53c73a0..c8789af 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -45,10 +45,10 @@ packages: dependency: transitive description: name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.6" csslib: dependency: transitive description: @@ -69,10 +69,10 @@ packages: dependency: transitive description: name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" flutter: dependency: "direct main" description: flutter @@ -82,10 +82,10 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "950e77c2bbe1692bc0874fc7fb491b96a4dc340457f4ea1641443d0a6c1ea360" + sha256: "9b78450b89f059e96c9ebb355fa6b3df1d6b330436e0b885fb49594c41721398" url: "https://pub.dev" source: hosted - version: "2.0.15" + version: "2.0.23" flutter_test: dependency: "direct dev" description: flutter @@ -100,98 +100,98 @@ packages: dependency: "direct main" description: name: geolocator - sha256: "149876cc5207a0f5daf4fdd3bfcf0a0f27258b3fe95108fa084f527ad0568f1b" + sha256: "0ec58b731776bc43097fcf751f79681b6a8f6d3bc737c94779fe9f1ad73c1a81" url: "https://pub.dev" source: hosted - version: "12.0.0" + version: "13.0.1" geolocator_android: dependency: transitive description: name: geolocator_android - sha256: "136f1c97e1903366393bda514c5d9e98843418baea52899aa45edae9af8a5cd6" + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" url: "https://pub.dev" source: hosted - version: "4.5.2" + version: "4.6.1" geolocator_apple: dependency: transitive description: name: geolocator_apple - sha256: "2f2d4ee16c4df269e93c0e382be075cc01d5db6703c3196e4af20a634fe49ef4" + sha256: bc2aca02423ad429cb0556121f56e60360a2b7d694c8570301d06ea0c00732fd url: "https://pub.dev" source: hosted - version: "2.3.6" + version: "2.3.7" geolocator_platform_interface: dependency: transitive description: name: geolocator_platform_interface - sha256: c6005787efe9e27cb0f6b50230c217e6f0ef8e1e7a8b854efb4f46489e502603 + sha256: "386ce3d9cce47838355000070b1d0b13efb5bc430f8ecda7e9238c8409ace012" url: "https://pub.dev" source: hosted - version: "4.2.3" + version: "4.2.4" geolocator_web: dependency: transitive description: name: geolocator_web - sha256: "7a22f400d831f924a89d931ba126a10e6b8b437f31e6b9311320435f3e1571bd" + sha256: "2ed69328e05cd94e7eb48bb0535f5fc0c0c44d1c4fa1e9737267484d05c29b5e" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.1.1" geolocator_windows: dependency: transitive description: name: geolocator_windows - sha256: a92fae29779d5c6dc60e8411302f5221ade464968fe80a36d330e80a71f087af + sha256: "53da08937d07c24b0d9952eb57a3b474e29aae2abf9dd717f7e1230995f13f0e" url: "https://pub.dev" source: hosted - version: "0.2.2" + version: "0.2.3" google_maps: dependency: transitive description: name: google_maps - sha256: "47eef3836b49bb030d5cb3afc60b8451408bf34cf753e571b645d6529eb4251a" + sha256: "4d6e199c561ca06792c964fa24b2bac7197bf4b401c2e1d23e345e5f9939f531" url: "https://pub.dev" source: hosted - version: "7.1.0" + version: "8.1.1" google_maps_flutter: dependency: "direct main" description: name: google_maps_flutter - sha256: c1972cbad779bc5346c49045f26ae45550a0958b1cbca5b524dd3c8954995d28 + sha256: "2e302fa3aaf4e2a297f0342d83ebc5e8e9f826e9a716aef473fe7f404ec630a7" url: "https://pub.dev" source: hosted - version: "2.6.1" + version: "2.9.0" google_maps_flutter_android: dependency: transitive description: name: google_maps_flutter_android - sha256: "0bcadb80eba39afda77dede89a6caafd3b68f2786b90491eceea4a01c3db181c" + sha256: "6caec25edb8014ec7d503babc597794de2d4c1baf3e3d20b57c41bd3e439b916" url: "https://pub.dev" source: hosted - version: "2.8.0" + version: "2.14.10" google_maps_flutter_ios: dependency: transitive description: name: google_maps_flutter_ios - sha256: e5132d17f051600d90d79d9f574b177c24231da702453a036db2490f9ced4646 + sha256: "753ebf6a2bc24c5eba8e714c901345d858abd9694b1f878c43614fd3f06b8060" url: "https://pub.dev" source: hosted - version: "2.6.0" + version: "2.13.1" google_maps_flutter_platform_interface: dependency: transitive description: name: google_maps_flutter_platform_interface - sha256: "167af879da4d004cd58771f1469b91dcc3b9b0a2c5334cc6bf71fd41d4b35403" + sha256: a951981c22d790848efb9f114f81794945bc5c06bc566238a419a92f110af6cb url: "https://pub.dev" source: hosted - version: "2.6.0" + version: "2.9.5" google_maps_flutter_web: dependency: transitive description: name: google_maps_flutter_web - sha256: "0c0d5c723d94b295cf86dd1c45ff91d2ac1fff7c05ddca4f01bef9fa0a014690" + sha256: ff39211bd25d7fad125d19f757eba85bd154460907cd4d135e07e3d0f98a4130 url: "https://pub.dev" source: hosted - version: "0.5.7" + version: "0.5.10" html: dependency: transitive description: @@ -204,10 +204,10 @@ packages: dependency: "direct main" description: name: http - sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.2" http_parser: dependency: transitive description: @@ -216,38 +216,22 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.2" - js: - dependency: transitive - description: - name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 - url: "https://pub.dev" - source: hosted - version: "0.6.7" - js_wrapping: - dependency: transitive - description: - name: js_wrapping - sha256: e385980f7c76a8c1c9a560dfb623b890975841542471eade630b2871d243851c - url: "https://pub.dev" - source: hosted - version: "0.7.4" leak_tracker: dependency: transitive description: name: leak_tracker - sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.4" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: @@ -268,18 +252,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.15.0" path: dependency: transitive description: @@ -300,10 +284,10 @@ packages: dependency: transitive description: name: sanitize_html - sha256: "0a445f19bbaa196f5a4f93461aa066b94e6e025622eb1e9bc77872a5e25233a5" + sha256: "12669c4a913688a26555323fb9cec373d8f9fbe091f2d01c40c723b33caa8989" url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.1.0" sky_engine: dependency: transitive description: flutter @@ -369,26 +353,26 @@ packages: dependency: transitive description: name: test_api - sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.7.2" typed_data: dependency: transitive description: name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.4.0" uuid: dependency: transitive description: name: uuid - sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8 + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff url: "https://pub.dev" source: hosted - version: "4.3.3" + version: "4.5.1" vector_math: dependency: transitive description: @@ -401,18 +385,18 @@ packages: dependency: transitive description: name: vm_service - sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "14.2.1" + version: "14.2.5" web: dependency: transitive description: name: web - sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "1.1.0" sdks: - dart: ">=3.3.0 <4.0.0" - flutter: ">=3.19.0" + dart: ">=3.5.0 <4.0.0" + flutter: ">=3.24.0" From 00365bb9b3af6195a53fda1e44188d515cc7f18a Mon Sep 17 00:00:00 2001 From: Lzyct Date: Sat, 3 May 2025 17:26:54 +0800 Subject: [PATCH 11/14] chore: update dependencies in pubspec.yaml and pubspec.lock --- pubspec.lock | 150 +++++++++++++++++++++++++-------------------------- pubspec.yaml | 6 +-- 2 files changed, 78 insertions(+), 78 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index c8789af..142fdcd 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,42 +5,42 @@ packages: dependency: transitive description: name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 url: "https://pub.dev" source: hosted - version: "2.11.0" + version: "2.12.0" boolean_selector: dependency: transitive description: name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" characters: dependency: transitive description: name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.4.0" clock: dependency: transitive description: name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" collection: dependency: transitive description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.1" crypto: dependency: transitive description: @@ -53,18 +53,18 @@ packages: dependency: transitive description: name: csslib - sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb" + sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.2" fake_async: dependency: transitive description: name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.2" fixnum: dependency: transitive description: @@ -82,10 +82,10 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "9b78450b89f059e96c9ebb355fa6b3df1d6b330436e0b885fb49594c41721398" + sha256: f948e346c12f8d5480d2825e03de228d0eb8c3a737e4cdaa122267b89c022b5e url: "https://pub.dev" source: hosted - version: "2.0.23" + version: "2.0.28" flutter_test: dependency: "direct dev" description: flutter @@ -100,50 +100,50 @@ packages: dependency: "direct main" description: name: geolocator - sha256: "0ec58b731776bc43097fcf751f79681b6a8f6d3bc737c94779fe9f1ad73c1a81" + sha256: e7ebfa04ce451daf39b5499108c973189a71a919aa53c1204effda1c5b93b822 url: "https://pub.dev" source: hosted - version: "13.0.1" + version: "14.0.0" geolocator_android: dependency: transitive description: name: geolocator_android - sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" + sha256: "114072db5d1dce0ec0b36af2697f55c133bc89a2c8dd513e137c0afe59696ed4" url: "https://pub.dev" source: hosted - version: "4.6.1" + version: "5.0.1+1" geolocator_apple: dependency: transitive description: name: geolocator_apple - sha256: bc2aca02423ad429cb0556121f56e60360a2b7d694c8570301d06ea0c00732fd + sha256: dbdd8789d5aaf14cf69f74d4925ad1336b4433a6efdf2fce91e8955dc921bf22 url: "https://pub.dev" source: hosted - version: "2.3.7" + version: "2.3.13" geolocator_platform_interface: dependency: transitive description: name: geolocator_platform_interface - sha256: "386ce3d9cce47838355000070b1d0b13efb5bc430f8ecda7e9238c8409ace012" + sha256: "30cb64f0b9adcc0fb36f628b4ebf4f731a2961a0ebd849f4b56200205056fe67" url: "https://pub.dev" source: hosted - version: "4.2.4" + version: "4.2.6" geolocator_web: dependency: transitive description: name: geolocator_web - sha256: "2ed69328e05cd94e7eb48bb0535f5fc0c0c44d1c4fa1e9737267484d05c29b5e" + sha256: b1ae9bdfd90f861fde8fd4f209c37b953d65e92823cb73c7dee1fa021b06f172 url: "https://pub.dev" source: hosted - version: "4.1.1" + version: "4.1.3" geolocator_windows: dependency: transitive description: name: geolocator_windows - sha256: "53da08937d07c24b0d9952eb57a3b474e29aae2abf9dd717f7e1230995f13f0e" + sha256: "175435404d20278ffd220de83c2ca293b73db95eafbdc8131fe8609be1421eb6" url: "https://pub.dev" source: hosted - version: "0.2.3" + version: "0.2.5" google_maps: dependency: transitive description: @@ -156,82 +156,82 @@ packages: dependency: "direct main" description: name: google_maps_flutter - sha256: "2e302fa3aaf4e2a297f0342d83ebc5e8e9f826e9a716aef473fe7f404ec630a7" + sha256: "830d8f7b51b4a950bf0d7daa675324fed6c9beb57a7ecca2a59018270c96b4e0" url: "https://pub.dev" source: hosted - version: "2.9.0" + version: "2.12.1" google_maps_flutter_android: dependency: transitive description: name: google_maps_flutter_android - sha256: "6caec25edb8014ec7d503babc597794de2d4c1baf3e3d20b57c41bd3e439b916" + sha256: ab83128296fbeaa52e8f2b3bf53bcd895e64778edddcdc07bc8f33f4ea78076c url: "https://pub.dev" source: hosted - version: "2.14.10" + version: "2.16.1" google_maps_flutter_ios: dependency: transitive description: name: google_maps_flutter_ios - sha256: "753ebf6a2bc24c5eba8e714c901345d858abd9694b1f878c43614fd3f06b8060" + sha256: c7433645c4c9b61c587938cb06072f3dad601239e596b090c0f8f206c1f2ade7 url: "https://pub.dev" source: hosted - version: "2.13.1" + version: "2.15.2" google_maps_flutter_platform_interface: dependency: transitive description: name: google_maps_flutter_platform_interface - sha256: a951981c22d790848efb9f114f81794945bc5c06bc566238a419a92f110af6cb + sha256: "970c8f766c02909c7be282dea923c971f83a88adaf07f8871d0aacebc3b07bb2" url: "https://pub.dev" source: hosted - version: "2.9.5" + version: "2.11.1" google_maps_flutter_web: dependency: transitive description: name: google_maps_flutter_web - sha256: ff39211bd25d7fad125d19f757eba85bd154460907cd4d135e07e3d0f98a4130 + sha256: a45786ea6691cc7cdbe2cf3ce2c2daf4f82a885745666b4a36baada3a4e12897 url: "https://pub.dev" source: hosted - version: "0.5.10" + version: "0.5.12" html: dependency: transitive description: name: html - sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" + sha256: "6d1264f2dffa1b1101c25a91dff0dc2daee4c18e87cd8538729773c073dbf602" url: "https://pub.dev" source: hosted - version: "0.15.4" + version: "0.15.6" http: dependency: "direct main" description: name: http - sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 + sha256: fe7ab022b76f3034adc518fb6ea04a82387620e19977665ea18d30a1cf43442f url: "https://pub.dev" source: hosted - version: "1.2.2" + version: "1.3.0" http_parser: dependency: transitive description: name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" url: "https://pub.dev" source: hosted - version: "4.0.2" + version: "4.1.2" leak_tracker: dependency: transitive description: name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec url: "https://pub.dev" source: hosted - version: "10.0.5" + version: "10.0.8" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.9" leak_tracker_testing: dependency: transitive description: @@ -244,10 +244,10 @@ packages: dependency: transitive description: name: matcher - sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 url: "https://pub.dev" source: hosted - version: "0.12.16+1" + version: "0.12.17" material_color_utilities: dependency: transitive description: @@ -260,18 +260,18 @@ packages: dependency: transitive description: name: meta - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.16.0" path: dependency: transitive description: name: path - sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" plugin_platform_interface: dependency: transitive description: @@ -292,15 +292,15 @@ packages: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_span: dependency: transitive description: name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.10.1" sprintf: dependency: transitive description: @@ -313,50 +313,50 @@ packages: dependency: transitive description: name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "1.12.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" stream_transform: dependency: transitive description: name: stream_transform - sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871 url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" string_scanner: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.4.1" term_glyph: dependency: transitive description: name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.2" test_api: dependency: transitive description: name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.7.4" typed_data: dependency: transitive description: @@ -385,18 +385,18 @@ packages: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "14.3.1" web: dependency: transitive description: name: web - sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" sdks: - dart: ">=3.5.0 <4.0.0" - flutter: ">=3.24.0" + dart: ">=3.7.0-0 <4.0.0" + flutter: ">=3.27.0" diff --git a/pubspec.yaml b/pubspec.yaml index ed0583e..f902164 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -9,10 +9,10 @@ environment: dependencies: flutter: sdk: flutter - http: ^1.2.2 - google_maps_flutter: ^2.9.0 + http: ^1.3.0 + google_maps_flutter: ^2.12.1 # location: ^4.4.0 - geolocator: ^13.0.1 + geolocator: ^14.0.0 dev_dependencies: flutter_test: From badde3e98ea32ac8eda9fffc85bb162619b6b26d Mon Sep 17 00:00:00 2001 From: Lzyct Date: Sat, 3 May 2025 17:27:07 +0800 Subject: [PATCH 12/14] chore: add .flutter-plugins-dependencies file for plugin management --- .flutter-plugins-dependencies | 1 + 1 file changed, 1 insertion(+) create mode 100644 .flutter-plugins-dependencies diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies new file mode 100644 index 0000000..2571d72 --- /dev/null +++ b/.flutter-plugins-dependencies @@ -0,0 +1 @@ +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"geolocator_apple","path":"/Users/lzyct/.pub-cache/hosted/pub.dev/geolocator_apple-2.3.13/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_maps_flutter_ios","path":"/Users/lzyct/.pub-cache/hosted/pub.dev/google_maps_flutter_ios-2.15.2/","native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"flutter_plugin_android_lifecycle","path":"/Users/lzyct/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.28/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"geolocator_android","path":"/Users/lzyct/.pub-cache/hosted/pub.dev/geolocator_android-5.0.1+1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_maps_flutter_android","path":"/Users/lzyct/.pub-cache/hosted/pub.dev/google_maps_flutter_android-2.16.1/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"],"dev_dependency":false}],"macos":[{"name":"geolocator_apple","path":"/Users/lzyct/.pub-cache/hosted/pub.dev/geolocator_apple-2.3.13/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[],"windows":[{"name":"geolocator_windows","path":"/Users/lzyct/.pub-cache/hosted/pub.dev/geolocator_windows-0.2.5/","native_build":true,"dependencies":[],"dev_dependency":false}],"web":[{"name":"geolocator_web","path":"/Users/lzyct/.pub-cache/hosted/pub.dev/geolocator_web-4.1.3/","dependencies":[],"dev_dependency":false},{"name":"google_maps_flutter_web","path":"/Users/lzyct/.pub-cache/hosted/pub.dev/google_maps_flutter_web-0.5.12/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"geolocator","dependencies":["geolocator_android","geolocator_apple","geolocator_web","geolocator_windows"]},{"name":"geolocator_android","dependencies":[]},{"name":"geolocator_apple","dependencies":[]},{"name":"geolocator_web","dependencies":[]},{"name":"geolocator_windows","dependencies":[]},{"name":"google_maps_flutter","dependencies":["google_maps_flutter_android","google_maps_flutter_ios","google_maps_flutter_web"]},{"name":"google_maps_flutter_android","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"google_maps_flutter_ios","dependencies":[]},{"name":"google_maps_flutter_web","dependencies":[]}],"date_created":"2025-05-03 17:26:41.464963","version":"3.29.3","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file From 9f12e549363fb0023db4bc5891a4969d601cddd2 Mon Sep 17 00:00:00 2001 From: Lzyct Date: Sat, 19 Jul 2025 19:16:42 +0800 Subject: [PATCH 13/14] chore: update dependencies in pubspec.yaml and pubspec.lock --- pubspec.lock | 144 ++++++++++++++++++++++++++++++++++++++++++++------- pubspec.yaml | 7 +-- 2 files changed, 128 insertions(+), 23 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 142fdcd..d280222 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,14 +1,22 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + args: + dependency: transitive + description: + name: args + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 + url: "https://pub.dev" + source: hosted + version: "2.7.0" async: dependency: transitive description: name: async - sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 + sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" url: "https://pub.dev" source: hosted - version: "2.12.0" + version: "2.13.0" boolean_selector: dependency: transitive description: @@ -57,14 +65,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.2" + dbus: + dependency: transitive + description: + name: dbus + sha256: "79e0c23480ff85dc68de79e2cd6334add97e48f7f4865d17686dd6ea81a47e8c" + url: "https://pub.dev" + source: hosted + version: "0.7.11" fake_async: dependency: transitive description: name: fake_async - sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" + sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.3.3" + ffi: + dependency: transitive + description: + name: ffi + sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418" + url: "https://pub.dev" + source: hosted + version: "2.1.4" fixnum: dependency: transitive description: @@ -96,14 +120,22 @@ packages: description: flutter source: sdk version: "0.0.0" + geoclue: + dependency: transitive + description: + name: geoclue + sha256: c2a998c77474fc57aa00c6baa2928e58f4b267649057a1c76738656e9dbd2a7f + url: "https://pub.dev" + source: hosted + version: "0.1.1" geolocator: dependency: "direct main" description: name: geolocator - sha256: e7ebfa04ce451daf39b5499108c973189a71a919aa53c1204effda1c5b93b822 + sha256: "79939537046c9025be47ec645f35c8090ecadb6fe98eba146a0d25e8c1357516" url: "https://pub.dev" source: hosted - version: "14.0.0" + version: "14.0.2" geolocator_android: dependency: transitive description: @@ -120,6 +152,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.13" + geolocator_linux: + dependency: transitive + description: + name: geolocator_linux + sha256: c4e966f0a7a87e70049eac7a2617f9e16fd4c585a26e4330bdfc3a71e6a721f3 + url: "https://pub.dev" + source: hosted + version: "0.2.3" geolocator_platform_interface: dependency: transitive description: @@ -144,6 +184,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.2.5" + google_api_headers: + dependency: "direct main" + description: + name: google_api_headers + sha256: "20e81b724b885f29c9784be8c52946f800fe33837fce33756d00a2939f274d84" + url: "https://pub.dev" + source: hosted + version: "4.5.5" google_maps: dependency: transitive description: @@ -156,10 +204,10 @@ packages: dependency: "direct main" description: name: google_maps_flutter - sha256: "830d8f7b51b4a950bf0d7daa675324fed6c9beb57a7ecca2a59018270c96b4e0" + sha256: e1805e5a5885bd14a1c407c59229f478af169bf4d04388586b19f53145a5db3a url: "https://pub.dev" source: hosted - version: "2.12.1" + version: "2.12.3" google_maps_flutter_android: dependency: transitive description: @@ -172,18 +220,18 @@ packages: dependency: transitive description: name: google_maps_flutter_ios - sha256: c7433645c4c9b61c587938cb06072f3dad601239e596b090c0f8f206c1f2ade7 + sha256: d03678415da9de8ce7208c674b264fc75946f326e696b4b7f84c80920fc58df6 url: "https://pub.dev" source: hosted - version: "2.15.2" + version: "2.15.4" google_maps_flutter_platform_interface: dependency: transitive description: name: google_maps_flutter_platform_interface - sha256: "970c8f766c02909c7be282dea923c971f83a88adaf07f8871d0aacebc3b07bb2" + sha256: f8293f072ed8b068b092920a72da6693aa8b3d62dc6b5c5f0bc44c969a8a776c url: "https://pub.dev" source: hosted - version: "2.11.1" + version: "2.12.1" google_maps_flutter_web: dependency: transitive description: @@ -192,6 +240,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.5.12" + gsettings: + dependency: transitive + description: + name: gsettings + sha256: "1b0ce661f5436d2db1e51f3c4295a49849f03d304003a7ba177d01e3a858249c" + url: "https://pub.dev" + source: hosted + version: "0.2.8" html: dependency: transitive description: @@ -204,10 +260,10 @@ packages: dependency: "direct main" description: name: http - sha256: fe7ab022b76f3034adc518fb6ea04a82387620e19977665ea18d30a1cf43442f + sha256: "2c11f3f94c687ee9bad77c171151672986360b2b001d109814ee7140b2cf261b" url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.4.0" http_parser: dependency: transitive description: @@ -220,10 +276,10 @@ packages: dependency: transitive description: name: leak_tracker - sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec + sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" url: "https://pub.dev" source: hosted - version: "10.0.8" + version: "10.0.9" leak_tracker_flutter_testing: dependency: transitive description: @@ -264,6 +320,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.16.0" + package_info_plus: + dependency: transitive + description: + name: package_info_plus + sha256: "7976bfe4c583170d6cdc7077e3237560b364149fcd268b5f53d95a991963b191" + url: "https://pub.dev" + source: hosted + version: "8.3.0" + package_info_plus_platform_interface: + dependency: transitive + description: + name: package_info_plus_platform_interface + sha256: "6c935fb612dff8e3cc9632c2b301720c77450a126114126ffaafe28d2e87956c" + url: "https://pub.dev" + source: hosted + version: "3.2.0" path: dependency: transitive description: @@ -272,6 +344,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.9.1" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: "07c8f0b1913bcde1ff0d26e57ace2f3012ccbf2b204e070290dad3bb22797646" + url: "https://pub.dev" + source: hosted + version: "6.1.0" plugin_platform_interface: dependency: transitive description: @@ -385,10 +465,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" + sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02 url: "https://pub.dev" source: hosted - version: "14.3.1" + version: "15.0.0" web: dependency: transitive description: @@ -397,6 +477,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.1" + win32: + dependency: transitive + description: + name: win32 + sha256: "66814138c3562338d05613a6e368ed8cfb237ad6d64a9e9334be3f309acfca03" + url: "https://pub.dev" + source: hosted + version: "5.14.0" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + xml: + dependency: transitive + description: + name: xml + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 + url: "https://pub.dev" + source: hosted + version: "6.5.0" sdks: - dart: ">=3.7.0-0 <4.0.0" - flutter: ">=3.27.0" + dart: ">=3.8.1 <4.0.0" + flutter: ">=3.32.6" diff --git a/pubspec.yaml b/pubspec.yaml index f902164..f3d3ccc 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -9,10 +9,11 @@ environment: dependencies: flutter: sdk: flutter - http: ^1.3.0 - google_maps_flutter: ^2.12.1 + http: ^1.4.0 + google_maps_flutter: ^2.12.3 # location: ^4.4.0 - geolocator: ^14.0.0 + geolocator: ^14.0.2 + google_api_headers: ^4.5.5 dev_dependencies: flutter_test: From 410994c43bdff0e5edcdec53cdad958f00155480 Mon Sep 17 00:00:00 2001 From: Lzyct Date: Sat, 19 Jul 2025 19:17:33 +0800 Subject: [PATCH 14/14] fix: resolve issue regarding api restrict --- lib/widgets/place_picker.dart | 66 +++++++++++++++++------------------ 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/lib/widgets/place_picker.dart b/lib/widgets/place_picker.dart index 34222d9..06c47ab 100644 --- a/lib/widgets/place_picker.dart +++ b/lib/widgets/place_picker.dart @@ -5,6 +5,7 @@ import 'dart:io'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:geolocator/geolocator.dart'; +import 'package:google_api_headers/google_api_headers.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:http/http.dart' as http; import 'package:place_picker/entities/entities.dart'; @@ -94,14 +95,9 @@ class PlacePickerState extends State { super.initState(); if (widget.displayLocation == null) { _getCurrentLocation().then((value) { - if (value != null) { - setState(() { - _currentLocation = value; - }); - } else { - //Navigator.of(context).pop(null); - print("getting current location null"); - } + setState(() { + _currentLocation = value; + }); setState(() { _loadMap = true; }); @@ -135,14 +131,16 @@ class PlacePickerState extends State { @override Widget build(BuildContext context) { - return WillPopScope( - onWillPop: () { - if (Platform.isAndroid) { - locationResult = null; - _delayedPop(); - return Future.value(false); - } else { - return Future.value(true); + return PopScope( + canPop: false, + onPopInvokedWithResult: (didPop, result) { + if (!didPop) { + if (Platform.isAndroid) { + locationResult = null; + _delayedPop(); + } else { + Navigator.of(context).pop(result); + } } }, child: Scaffold( @@ -243,10 +241,6 @@ class PlacePickerState extends State { previousSearchTerm = place; - if (context == null) { - return; - } - clearOverlay(); setState(() { @@ -288,7 +282,7 @@ class PlacePickerState extends State { ), ); - Overlay.of(context)?.insert(this.overlayEntry!); + Overlay.of(context).insert(this.overlayEntry!); autoCompleteSearch(place); } @@ -298,6 +292,7 @@ class PlacePickerState extends State { try { place = place.replaceAll(" ", "+"); + final headers = await const GoogleApiHeaders().getHeaders(); var endpoint = "https://maps.googleapis.com/maps/api/place/autocomplete/json?" "key=${widget.apiKey}&" @@ -309,7 +304,7 @@ class PlacePickerState extends State { "${this.locationResult!.latLng?.longitude}"; } - final response = await http.get(Uri.parse(endpoint)); + final response = await http.get(Uri.parse(endpoint), headers: headers); if (response.statusCode != 200) { throw Error(); @@ -360,12 +355,13 @@ class PlacePickerState extends State { clearOverlay(); try { + final headers = await const GoogleApiHeaders().getHeaders(); final url = Uri.parse( "https://maps.googleapis.com/maps/api/place/details/json?key=${widget.apiKey}&" + "language=${widget.localizationItem!.languageCode}&" + "placeid=$placeId"); - final response = await http.get(url); + final response = await http.get(url, headers: headers); if (response.statusCode != 200) { throw Error(); @@ -404,7 +400,7 @@ class PlacePickerState extends State { ), ); - Overlay.of(context)?.insert(this.overlayEntry!); + Overlay.of(context).insert(this.overlayEntry!); } /// Utility function to get clean readable name of a location. First checks @@ -441,12 +437,13 @@ class PlacePickerState extends State { /// Fetches and updates the nearby places to the provided lat,lng void getNearbyPlaces(LatLng latLng) async { try { + final headers = await const GoogleApiHeaders().getHeaders(); final url = Uri.parse( "https://maps.googleapis.com/maps/api/place/nearbysearch/json?" "key=${widget.apiKey}&location=${latLng.latitude},${latLng.longitude}" "&radius=150&language=${widget.localizationItem!.languageCode}"); - final response = await http.get(url); + final response = await http.get(url, headers: headers); if (response.statusCode != 200) { throw Error(); @@ -484,12 +481,13 @@ class PlacePickerState extends State { /// to be the road name and the locality. void reverseGeocodeLatLng(LatLng latLng) async { try { + final headers = await const GoogleApiHeaders().getHeaders(); final url = Uri.parse("https://maps.googleapis.com/maps/api/geocode/json?" "latlng=${latLng.latitude},${latLng.longitude}&" "language=${widget.localizationItem!.languageCode}&" "key=${widget.apiKey}"); - final response = await http.get(url); + final response = await http.get(url, headers: headers); if (response.statusCode != 200) { throw Error(); @@ -521,9 +519,6 @@ class PlacePickerState extends State { var tmp = result['address_components'][i]; var types = tmp["types"] as List; var shortName = tmp['short_name']; - if (types == null) { - continue; - } if (i == 0) { // [street_number] name = shortName; @@ -646,13 +641,16 @@ class PlacePickerState extends State { 'Location permissions are permanently denied, we cannot request permissions.'); } try { - final locationData = - await Geolocator.getCurrentPosition(timeLimit: Duration(seconds: 30)); + final locationData = await Geolocator.getCurrentPosition( + locationSettings: LocationSettings( + timeLimit: Duration(seconds: 30), + ), + ); LatLng target = LatLng(locationData.latitude, locationData.longitude); //moveToLocation(target); print('target:$target'); return target; - } on TimeoutException catch (e) { + } on TimeoutException catch (_) { final locationData = await Geolocator.getLastKnownPosition(); if (locationData != null) { return LatLng(locationData.latitude, locationData.longitude); @@ -719,8 +717,8 @@ class PlacePickerState extends State { Future _delayedPop() async { Navigator.of(context, rootNavigator: true).push( PageRouteBuilder( - pageBuilder: (_, __, ___) => WillPopScope( - onWillPop: () async => false, + pageBuilder: (_, __, ___) => PopScope( + canPop: false, child: Scaffold( backgroundColor: Colors.transparent, body: Center(