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 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/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/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..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'; @@ -23,6 +24,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 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. @@ -31,7 +33,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.appBarOptions}) { if (this.localizationItem == null) { this.localizationItem = new LocalizationItem(); } @@ -90,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; }); @@ -131,22 +131,26 @@ 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( appBar: AppBar( key: this.appBarKey, - title: SearchInput(searchPlace), + title: SearchInput(searchPlace, widget.localizationItem!), centerTitle: true, - automaticallyImplyLeading: false, + leading: widget.appBarOptions?.leading, + automaticallyImplyLeading: + widget.appBarOptions?.showBackButton ?? false, ), body: Column( children: [ @@ -193,7 +197,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( @@ -236,10 +241,6 @@ class PlacePickerState extends State { previousSearchTerm = place; - if (context == null) { - return; - } - clearOverlay(); setState(() { @@ -281,7 +282,7 @@ class PlacePickerState extends State { ), ); - Overlay.of(context)?.insert(this.overlayEntry!); + Overlay.of(context).insert(this.overlayEntry!); autoCompleteSearch(place); } @@ -291,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}&" @@ -302,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(); @@ -353,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(); @@ -397,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 @@ -434,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(); @@ -477,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(); @@ -514,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; @@ -639,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); @@ -712,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( 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 299c917..38e4ffa 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.bodyMedium?.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(() { diff --git a/pubspec.lock b/pubspec.lock index 56e97de..d280222 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,55 +1,102 @@ # 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 - url: "https://pub.dartlang.org" + sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" + url: "https://pub.dev" source: hosted - version: "2.8.2" + version: "2.13.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" 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: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.4.0" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.2" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.19.1" + crypto: + dependency: transitive + description: + name: crypto + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + csslib: + dependency: transitive + description: + name: csslib + sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" + 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 - url: "https://pub.dartlang.org" + sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" + url: "https://pub.dev" + source: hosted + 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: + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.1.1" flutter: dependency: "direct main" description: flutter @@ -59,9 +106,10 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - url: "https://pub.dartlang.org" + sha256: f948e346c12f8d5480d2825e03de228d0eb8c3a737e4cdaa122267b89c022b5e + url: "https://pub.dev" source: hosted - version: "2.0.5" + version: "2.0.28" flutter_test: dependency: "direct dev" description: flutter @@ -72,200 +120,387 @@ 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 - url: "https://pub.dartlang.org" + sha256: "79939537046c9025be47ec645f35c8090ecadb6fe98eba146a0d25e8c1357516" + url: "https://pub.dev" source: hosted - version: "9.0.1" + version: "14.0.2" geolocator_android: dependency: transitive description: name: geolocator_android - url: "https://pub.dartlang.org" + sha256: "114072db5d1dce0ec0b36af2697f55c133bc89a2c8dd513e137c0afe59696ed4" + url: "https://pub.dev" source: hosted - version: "4.1.0" + version: "5.0.1+1" geolocator_apple: dependency: transitive description: name: geolocator_apple - url: "https://pub.dartlang.org" + sha256: dbdd8789d5aaf14cf69f74d4925ad1336b4433a6efdf2fce91e8955dc921bf22 + 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: "2.2.1" + version: "0.2.3" geolocator_platform_interface: dependency: transitive description: name: geolocator_platform_interface - url: "https://pub.dartlang.org" + sha256: "30cb64f0b9adcc0fb36f628b4ebf4f731a2961a0ebd849f4b56200205056fe67" + url: "https://pub.dev" source: hosted - version: "4.0.6" + version: "4.2.6" geolocator_web: dependency: transitive description: name: geolocator_web - url: "https://pub.dartlang.org" + sha256: b1ae9bdfd90f861fde8fd4f209c37b953d65e92823cb73c7dee1fa021b06f172 + url: "https://pub.dev" source: hosted - version: "2.1.6" + version: "4.1.3" geolocator_windows: dependency: transitive description: name: geolocator_windows - url: "https://pub.dartlang.org" + sha256: "175435404d20278ffd220de83c2ca293b73db95eafbdc8131fe8609be1421eb6" + url: "https://pub.dev" source: hosted - version: "0.1.1" + 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: + name: google_maps + sha256: "4d6e199c561ca06792c964fa24b2bac7197bf4b401c2e1d23e345e5f9939f531" + url: "https://pub.dev" + source: hosted + version: "8.1.1" google_maps_flutter: dependency: "direct main" description: name: google_maps_flutter - url: "https://pub.dartlang.org" + sha256: e1805e5a5885bd14a1c407c59229f478af169bf4d04388586b19f53145a5db3a + url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.12.3" google_maps_flutter_android: dependency: transitive description: name: google_maps_flutter_android - url: "https://pub.dartlang.org" + sha256: ab83128296fbeaa52e8f2b3bf53bcd895e64778edddcdc07bc8f33f4ea78076c + url: "https://pub.dev" source: hosted - version: "2.1.10" + version: "2.16.1" google_maps_flutter_ios: dependency: transitive description: name: google_maps_flutter_ios - url: "https://pub.dartlang.org" + sha256: d03678415da9de8ce7208c674b264fc75946f326e696b4b7f84c80920fc58df6 + url: "https://pub.dev" source: hosted - version: "2.1.11" + version: "2.15.4" google_maps_flutter_platform_interface: dependency: transitive description: name: google_maps_flutter_platform_interface - url: "https://pub.dartlang.org" + sha256: f8293f072ed8b068b092920a72da6693aa8b3d62dc6b5c5f0bc44c969a8a776c + url: "https://pub.dev" + source: hosted + version: "2.12.1" + google_maps_flutter_web: + dependency: transitive + description: + name: google_maps_flutter_web + sha256: a45786ea6691cc7cdbe2cf3ce2c2daf4f82a885745666b4a36baada3a4e12897 + 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: + name: html + sha256: "6d1264f2dffa1b1101c25a91dff0dc2daee4c18e87cd8538729773c073dbf602" + url: "https://pub.dev" source: hosted - version: "2.2.2" + version: "0.15.6" http: dependency: "direct main" description: name: http - url: "https://pub.dartlang.org" + sha256: "2c11f3f94c687ee9bad77c171151672986360b2b001d109814ee7140b2cf261b" + url: "https://pub.dev" source: hosted - version: "0.13.5" + version: "1.4.0" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" + url: "https://pub.dev" source: hosted - version: "4.0.0" - js: + version: "4.1.2" + leak_tracker: dependency: transitive description: - name: js - url: "https://pub.dartlang.org" + name: leak_tracker + sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" + url: "https://pub.dev" source: hosted - version: "0.6.4" + version: "10.0.9" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + url: "https://pub.dev" + source: hosted + version: "3.0.9" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + url: "https://pub.dev" source: hosted - version: "0.12.11" + version: "0.12.17" material_color_utilities: dependency: transitive description: name: material_color_utilities - url: "https://pub.dartlang.org" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" source: hosted - version: "0.1.4" + version: "0.11.1" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + 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: "1.7.0" + version: "3.2.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + 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: "1.8.1" + version: "6.1.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.8" + sanitize_html: + dependency: transitive + description: + name: sanitize_html + sha256: "12669c4a913688a26555323fb9cec373d8f9fbe091f2d01c40c723b33caa8989" + url: "https://pub.dev" + source: hosted + version: "2.1.0" sky_engine: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.10.1" + 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 - url: "https://pub.dartlang.org" + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.1" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.4" stream_transform: dependency: transitive description: name: stream_transform - url: "https://pub.dartlang.org" + sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871 + url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.1.1" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.4.1" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.2" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + url: "https://pub.dev" source: hosted - version: "0.4.9" + version: "0.7.4" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + uuid: + dependency: transitive + description: + name: uuid + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff + url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "4.5.1" 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" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02 + url: "https://pub.dev" + source: hosted + version: "15.0.0" + web: + dependency: transitive + description: + name: web + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" + 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: ">=2.17.0-0 <3.0.0" - flutter: ">=2.10.0" + dart: ">=3.8.1 <4.0.0" + flutter: ">=3.32.6" diff --git a/pubspec.yaml b/pubspec.yaml index 75d6448..f3d3ccc 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,15 +4,16 @@ 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: ^0.13.5 - google_maps_flutter: ^2.2.0 + http: ^1.4.0 + google_maps_flutter: ^2.12.3 # location: ^4.4.0 - geolocator: ^9.0.1 + geolocator: ^14.0.2 + google_api_headers: ^4.5.5 dev_dependencies: flutter_test: