From e8dd49e1199b8e38042145fcf760f6ecca8832a9 Mon Sep 17 00:00:00 2001 From: Matan Shukry Date: Sat, 17 Aug 2024 10:21:21 +0300 Subject: [PATCH 1/9] test --- bla.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 bla.txt diff --git a/bla.txt b/bla.txt new file mode 100644 index 0000000..8e66e82 --- /dev/null +++ b/bla.txt @@ -0,0 +1 @@ +just test From 36b9a8077394753eb5ad4909868acf0a1ee9fdc9 Mon Sep 17 00:00:00 2001 From: Matan Shukry Date: Sat, 17 Aug 2024 10:22:00 +0300 Subject: [PATCH 2/9] test --- bla.txt | 1 - flutter_google_places_sdk_platform_interface/bla.txt | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 bla.txt create mode 100644 flutter_google_places_sdk_platform_interface/bla.txt diff --git a/bla.txt b/bla.txt deleted file mode 100644 index 8e66e82..0000000 --- a/bla.txt +++ /dev/null @@ -1 +0,0 @@ -just test diff --git a/flutter_google_places_sdk_platform_interface/bla.txt b/flutter_google_places_sdk_platform_interface/bla.txt new file mode 100644 index 0000000..a7f8d9e --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/bla.txt @@ -0,0 +1 @@ +bla From 366620ae4f142fb68a2c4218c22a0dfd2bf79031 Mon Sep 17 00:00:00 2001 From: Matan Shukry Date: Sat, 17 Aug 2024 10:29:34 +0300 Subject: [PATCH 3/9] build runner --- .github/workflows/tests_platform_interface.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests_platform_interface.yml b/.github/workflows/tests_platform_interface.yml index c010ffa..c5ebb7c 100644 --- a/.github/workflows/tests_platform_interface.yml +++ b/.github/workflows/tests_platform_interface.yml @@ -50,6 +50,8 @@ jobs: - name: Install dependencies run: flutter pub get working-directory: ${{ env.dir }} + - name: Build Runner + run: flutter pub run build_runner - name: Flutter Analyze run: flutter analyze working-directory: ${{ env.dir }} From 156929c79557dd33d8f5d94f39c051230ccaf62e Mon Sep 17 00:00:00 2001 From: Matan Shukry Date: Sat, 17 Aug 2024 10:30:55 +0300 Subject: [PATCH 4/9] dir --- .github/workflows/tests_platform_interface.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests_platform_interface.yml b/.github/workflows/tests_platform_interface.yml index c5ebb7c..c0a9186 100644 --- a/.github/workflows/tests_platform_interface.yml +++ b/.github/workflows/tests_platform_interface.yml @@ -52,6 +52,7 @@ jobs: working-directory: ${{ env.dir }} - name: Build Runner run: flutter pub run build_runner + working-directory: ${{ env.dir }} - name: Flutter Analyze run: flutter analyze working-directory: ${{ env.dir }} From 41f6b9cd2ad696f1842875b0415c5a8d77527e18 Mon Sep 17 00:00:00 2001 From: Matan Shukry Date: Sat, 17 Aug 2024 10:32:47 +0300 Subject: [PATCH 5/9] build --- .github/workflows/tests_platform_interface.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests_platform_interface.yml b/.github/workflows/tests_platform_interface.yml index c0a9186..8450585 100644 --- a/.github/workflows/tests_platform_interface.yml +++ b/.github/workflows/tests_platform_interface.yml @@ -51,7 +51,7 @@ jobs: run: flutter pub get working-directory: ${{ env.dir }} - name: Build Runner - run: flutter pub run build_runner + run: flutter pub run build_runner build working-directory: ${{ env.dir }} - name: Flutter Analyze run: flutter analyze From 51a588cbf7ffe6a76cabb44313f3194f9f1082a6 Mon Sep 17 00:00:00 2001 From: Matan Shukry Date: Sat, 17 Aug 2024 10:40:11 +0300 Subject: [PATCH 6/9] more --- .../analysis_options.yaml | 12 ------------ ...ethod_channel_flutter_google_places_sdk_test.dart | 4 +++- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/flutter_google_places_sdk_platform_interface/analysis_options.yaml b/flutter_google_places_sdk_platform_interface/analysis_options.yaml index b324c60..6bfe7d5 100644 --- a/flutter_google_places_sdk_platform_interface/analysis_options.yaml +++ b/flutter_google_places_sdk_platform_interface/analysis_options.yaml @@ -29,10 +29,6 @@ analyzer: missing_return: warning # allow having TODOs in the code todo: ignore - # Ignore analyzer hints for updating pubspecs when using Future or - # Stream and not importing dart:async - # Please see https://github.com/flutter/flutter/pull/24528 for details. - sdk_version_async_exported_from_core: ignore exclude: - "bin/cache/**" - "lib/l10n/messages_*.dart" @@ -47,8 +43,6 @@ linter: # https://github.com/dart-lang/linter/blob/master/example/all.yaml - always_declare_return_types - always_put_control_body_on_new_line - # - always_put_required_named_parameters_first # we prefer having parameters in the same order as fields https://github.com/flutter/flutter/issues/10219 - - always_require_non_null_named_parameters # - always_specify_types - annotate_overrides # - avoid_annotating_with_dynamic # conflicts with always_specify_types @@ -106,13 +100,9 @@ linter: - flutter_style_todos - hash_and_equals - implementation_imports - # - invariant_booleans # too many false positives: https://github.com/dart-lang/linter/issues/811 - - iterable_contains_unrelated_type # - join_return_with_assignment # not yet tested - library_names - library_prefixes - # - lines_longer_than_80_chars # not yet tested - - list_remove_unrelated_type # - literal_only_boolean_expressions # too many false positives: https://github.com/dart-lang/sdk/issues/34181 # - missing_whitespace_between_adjacent_strings # not yet tested - no_adjacent_strings_in_list @@ -140,8 +130,6 @@ linter: - prefer_const_literals_to_create_immutables # - prefer_constructors_over_static_methods # not yet tested - prefer_contains - # - prefer_double_quotes # opposite of prefer_single_quotes - - prefer_equal_for_default_values # - prefer_expression_function_bodies # conflicts with https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#consider-using--for-short-functions-and-methods - prefer_final_fields - prefer_final_in_for_each diff --git a/flutter_google_places_sdk_platform_interface/test/method_channel_flutter_google_places_sdk_test.dart b/flutter_google_places_sdk_platform_interface/test/method_channel_flutter_google_places_sdk_test.dart index bced15c..16c89a8 100644 --- a/flutter_google_places_sdk_platform_interface/test/method_channel_flutter_google_places_sdk_test.dart +++ b/flutter_google_places_sdk_platform_interface/test/method_channel_flutter_google_places_sdk_test.dart @@ -15,7 +15,8 @@ void main() { const channel = MethodChannel('plugins.msh.com/flutter_google_places_sdk'); final List log = []; - channel.setMockMethodCallHandler((MethodCall methodCall) async { + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockMethodCallHandler(channel, (MethodCall methodCall) async { log.add(methodCall); for (final callback in handlers) { final result = callback(methodCall); @@ -23,6 +24,7 @@ void main() { return result; } } + return null; }); final places = FlutterGooglePlacesSdkMethodChannel(); From 3e5c0cf8d0213f8b5daa4841e5b554d18d5b4e55 Mon Sep 17 00:00:00 2001 From: Matan Shukry Date: Sat, 17 Aug 2024 10:40:58 +0300 Subject: [PATCH 7/9] no bla --- flutter_google_places_sdk_platform_interface/bla.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 flutter_google_places_sdk_platform_interface/bla.txt diff --git a/flutter_google_places_sdk_platform_interface/bla.txt b/flutter_google_places_sdk_platform_interface/bla.txt deleted file mode 100644 index a7f8d9e..0000000 --- a/flutter_google_places_sdk_platform_interface/bla.txt +++ /dev/null @@ -1 +0,0 @@ -bla From ea45becbefaf7220ac3771c4ed5b02496c7a209f Mon Sep 17 00:00:00 2001 From: Matan Shukry Date: Sat, 17 Aug 2024 10:43:22 +0300 Subject: [PATCH 8/9] describe no --- .../lib/src/types/place_type.dart | 4 ++-- .../lib/src/types/place_type_filter.dart | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/place_type.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/place_type.dart index 7b3595f..c7f41cb 100644 --- a/flutter_google_places_sdk_platform_interface/lib/src/types/place_type.dart +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/place_type.dart @@ -1,4 +1,4 @@ -import 'package:flutter/foundation.dart'; + /// Available types for a [Place] /// @@ -159,7 +159,7 @@ enum PlaceType { final placeTypeValuesMap = { for (final placeType in PlaceType.values) - describeEnum(placeType): placeType + placeType.name: placeType }; extension PlaceTypeDescriptor on PlaceType { diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/place_type_filter.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/place_type_filter.dart index d578824..598deba 100644 --- a/flutter_google_places_sdk_platform_interface/lib/src/types/place_type_filter.dart +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/place_type_filter.dart @@ -1,4 +1,4 @@ -import 'package:flutter/foundation.dart'; + /// Filter to restrict the result set of autocomplete predictions to certain types. /// @@ -58,5 +58,5 @@ enum PlaceTypeFilter { } extension PlaceTypeFilterDescriptor on PlaceTypeFilter { - String get value => describeEnum(this); + String get value => name; } From 2e9af888f2740a650b0e7f406434c9b2fd62f086 Mon Sep 17 00:00:00 2001 From: Matan Shukry Date: Sat, 17 Aug 2024 10:53:57 +0300 Subject: [PATCH 9/9] test --- .../test/method_channel_flutter_google_places_sdk_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flutter_google_places_sdk_platform_interface/test/method_channel_flutter_google_places_sdk_test.dart b/flutter_google_places_sdk_platform_interface/test/method_channel_flutter_google_places_sdk_test.dart index 16c89a8..963843d 100644 --- a/flutter_google_places_sdk_platform_interface/test/method_channel_flutter_google_places_sdk_test.dart +++ b/flutter_google_places_sdk_platform_interface/test/method_channel_flutter_google_places_sdk_test.dart @@ -91,7 +91,7 @@ void main() { arguments: { 'query': testQuery, 'countries': testCountries, - 'typesFilter': '(cities)', + 'typesFilter': ['(cities)'], 'newSessionToken': newSessionToken, 'origin': origin.toJson(), 'locationBias': locationBias.toJson(),