From c2627ecf0f86d2c556bff876cbddd5f2827545f6 Mon Sep 17 00:00:00 2001 From: Josh Burton Date: Fri, 23 Feb 2024 11:41:08 +1300 Subject: [PATCH 1/3] updates google_api_headers dependency --- pubspec.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index 14c8af2..a285f3b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,24 +1,24 @@ name: flutter_google_places description: Google places autocomplete widgets for flutter. No wrapper, use https://pub.dev/packages/google_maps_webservice -version: 0.4.0 +version: 0.5.0 repository: https://github.com/fluttercommunity/flutter_google_places environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.12.0 <4.0.0' flutter: ">=1.17.0" dependencies: flutter: sdk: flutter - google_api_headers: ^1.3.0 + google_api_headers: ^3.8.0 google_maps_webservice: ^0.0.20-nullsafety.5 http: ^0.13.4 - rxdart: ^0.27.5 + rxdart: ^0.27.7 dev_dependencies: flutter_test: sdk: flutter - lint: ^1.10.0 + lint: ^2.3.0 flutter: assets: From 33ab1d564493bdb22715aa817ebda556b723bef9 Mon Sep 17 00:00:00 2001 From: Josh Burton Date: Fri, 19 Apr 2024 10:06:11 +1200 Subject: [PATCH 2/3] updates dependencies --- pubspec.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index a285f3b..fb3d40e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,15 +4,15 @@ version: 0.5.0 repository: https://github.com/fluttercommunity/flutter_google_places environment: - sdk: '>=2.12.0 <4.0.0' + sdk: '>=3.0.0 <4.0.0' flutter: ">=1.17.0" dependencies: flutter: sdk: flutter - google_api_headers: ^3.8.0 + google_api_headers: ^3.8.4 google_maps_webservice: ^0.0.20-nullsafety.5 - http: ^0.13.4 + http: ">=0.13.4 <2.0.0" rxdart: ^0.27.7 dev_dependencies: From 472efd07d983a2bcc2a3fb38f27a08f869f9a78d Mon Sep 17 00:00:00 2001 From: Josh Burton Date: Thu, 19 Dec 2024 08:34:03 +1300 Subject: [PATCH 3/3] updates dependencies and supports Flutter 3.27.1 --- example/lib/main.dart | 4 +-- lib/src/flutter_google_places.dart | 30 ++++++++++----------- lib/src/places_autocomplete_field.dart | 6 ++--- lib/src/places_autocomplete_form_field.dart | 2 +- pubspec.yaml | 6 ++--- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index ef99be3..45bd007 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -173,8 +173,8 @@ class _CustomSearchScaffoldState extends PlacesAutocompleteState { onTap: (p) { displayPrediction(p, context); }, - logo: Row( - children: const [FlutterLogo()], + logo: const Row( + children: [FlutterLogo()], mainAxisAlignment: MainAxisAlignment.center, ), ); diff --git a/lib/src/flutter_google_places.dart b/lib/src/flutter_google_places.dart index a451c36..0bb2f7a 100644 --- a/lib/src/flutter_google_places.dart +++ b/lib/src/flutter_google_places.dart @@ -64,7 +64,7 @@ class PlacesAutocompleteWidget extends StatefulWidget { this.region, this.logo, this.onError, - Key? key, + super.key, this.proxyBaseUrl, this.httpClient, this.startText, @@ -73,7 +73,7 @@ class PlacesAutocompleteWidget extends StatefulWidget { this.textStyle, this.themeData, this.resultTextStyle, - }) : super(key: key); + }); @override State createState() => @@ -142,7 +142,7 @@ class _PlacesAutocompleteOverlayState extends PlacesAutocompleteState { ], ), ), - const Divider() + const Divider(), ], ); @@ -259,11 +259,11 @@ class PlacesAutocompleteResult extends StatefulWidget { final TextStyle? resultTextStyle; const PlacesAutocompleteResult({ - Key? key, + super.key, this.onTap, this.logo, this.resultTextStyle, - }) : super(key: key); + }); @override PlacesAutocompleteResultState createState() => @@ -298,10 +298,10 @@ class AppBarPlacesAutoCompleteTextField extends StatefulWidget { final TextStyle? textStyle; const AppBarPlacesAutoCompleteTextField({ - Key? key, + super.key, this.textDecoration, this.textStyle, - }) : super(key: key); + }); @override AppBarPlacesAutoCompleteTextFieldState createState() => @@ -347,8 +347,8 @@ class AppBarPlacesAutoCompleteTextFieldState TextStyle _defaultStyle() { return TextStyle( color: Theme.of(context).brightness == Brightness.light - ? Colors.black.withOpacity(0.9) - : Colors.white.withOpacity(0.9), + ? Colors.black.withValues(alpha:0.9) + : Colors.white.withValues(alpha:0.9), fontSize: 16.0, ); } @@ -360,7 +360,7 @@ class PoweredByGoogleImage extends StatelessWidget { static const _poweredByGoogleBlack = "packages/flutter_google_places/assets/google_black.png"; - const PoweredByGoogleImage({Key? key}) : super(key: key); + const PoweredByGoogleImage({super.key}); @override Widget build(BuildContext context) { @@ -375,7 +375,7 @@ class PoweredByGoogleImage extends StatelessWidget { : _poweredByGoogleBlack, scale: 2.5, ), - ) + ), ], ); } @@ -387,11 +387,11 @@ class PredictionsListView extends StatelessWidget { final TextStyle? resultTextStyle; const PredictionsListView({ - Key? key, + super.key, required this.predictions, this.onTap, this.resultTextStyle, - }) : super(key: key); + }); @override Widget build(BuildContext context) { @@ -415,11 +415,11 @@ class PredictionTile extends StatelessWidget { final TextStyle? resultTextStyle; const PredictionTile({ - Key? key, + super.key, required this.prediction, this.onTap, this.resultTextStyle, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/src/places_autocomplete_field.dart b/lib/src/places_autocomplete_field.dart index cd16a99..ce01069 100644 --- a/lib/src/places_autocomplete_field.dart +++ b/lib/src/places_autocomplete_field.dart @@ -36,7 +36,7 @@ class PlacesAutocompleteField extends StatefulWidget { /// by the decoration to save space for the labels), set the [decoration] to /// null. const PlacesAutocompleteField({ - Key? key, + super.key, required this.apiKey, this.controller, this.leading, @@ -59,7 +59,7 @@ class PlacesAutocompleteField extends StatefulWidget { this.overlayBorderRadius, this.textStyle, this.textStyleFormField, - }) : super(key: key); + }); /// Controls the text being edited. /// @@ -239,7 +239,7 @@ class LocationAutocompleteFieldState extends State { ), ) else - const SizedBox() + const SizedBox(), ], ); diff --git a/lib/src/places_autocomplete_form_field.dart b/lib/src/places_autocomplete_form_field.dart index 9526ead..377e607 100644 --- a/lib/src/places_autocomplete_form_field.dart +++ b/lib/src/places_autocomplete_form_field.dart @@ -40,7 +40,7 @@ class PlacesAutocompleteFormField extends FormField { /// to [initalValue] or the empty string. /// /// For documentation about the various parameters, see the [PlacesAutocompleteField] class - /// and [new PlacesAutocompleteField], the constructor. + /// and [PlacesAutocompleteField], the constructor. PlacesAutocompleteFormField({ Key? key, required String apiKey, diff --git a/pubspec.yaml b/pubspec.yaml index fb3d40e..fe8d075 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_google_places description: Google places autocomplete widgets for flutter. No wrapper, use https://pub.dev/packages/google_maps_webservice -version: 0.5.0 +version: 0.6.0 repository: https://github.com/fluttercommunity/flutter_google_places environment: @@ -10,10 +10,10 @@ environment: dependencies: flutter: sdk: flutter - google_api_headers: ^3.8.4 + google_api_headers: ^4.3.0 google_maps_webservice: ^0.0.20-nullsafety.5 http: ">=0.13.4 <2.0.0" - rxdart: ^0.27.7 + rxdart: ^0.28.0 dev_dependencies: flutter_test: