From 13818023c99e8a382e201d8b322242bc84df2c4c Mon Sep 17 00:00:00 2001 From: stuartmorgan Date: Mon, 12 Dec 2022 11:56:50 -0500 Subject: [PATCH 1/6] [camera] Attempt to fix flaky new Android test (#6831) The recently added "recording with image stream" test is very flaky, often throwing on `stop`. This is a speculative fix for that flake based on the documentation of `stop` indicating that it will throw if nothing has been recorded. --- .../camera_android/example/integration_test/camera_test.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/camera/camera_android/example/integration_test/camera_test.dart b/packages/camera/camera_android/example/integration_test/camera_test.dart index 4e75fdc9ef57..0ddb66388456 100644 --- a/packages/camera/camera_android/example/integration_test/camera_test.dart +++ b/packages/camera/camera_android/example/integration_test/camera_test.dart @@ -277,7 +277,10 @@ void main() { expect(controller.value.isStreamingImages, true); - sleep(const Duration(milliseconds: 500)); + // Stopping recording before anything is recorded will throw, per + // https://developer.android.com/reference/android/media/MediaRecorder.html#stop() + // so delay long enough to ensure that some data is recorded. + await Future.delayed(const Duration(seconds: 2)); await controller.stopVideoRecording(); await controller.dispose(); From da4321d01decbedefc0d2d2536f373c51971cee8 Mon Sep 17 00:00:00 2001 From: Oreofe Solarin Date: Mon, 12 Dec 2022 12:30:20 -0500 Subject: [PATCH 2/6] [google_maps_flutter] Modified `README.md` to fix minor syntax issues (#6631) * Refactored Reaadme using code excerpts * Fixes * Updated Upstream and Fixed Test Errors * Re-added temp_exclude_excerpt.yaml back due to Failing Test * Restore deleted changelog entries Co-authored-by: stuartmorgan --- .../google_maps_flutter/CHANGELOG.md | 3 +- .../google_maps_flutter/README.md | 36 ++++------ .../example/build.excerpt.yaml | 15 ++++ .../example/lib/readme_sample.dart | 72 +++++++++++++++++++ .../google_maps_flutter/example/pubspec.yaml | 1 + .../google_maps_flutter/pubspec.yaml | 2 +- 6 files changed, 103 insertions(+), 26 deletions(-) create mode 100644 packages/google_maps_flutter/google_maps_flutter/example/build.excerpt.yaml create mode 100644 packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample.dart diff --git a/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md index 4d0164603c42..af701d542029 100644 --- a/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md @@ -1,5 +1,6 @@ -## NEXT +## 2.2.2 +* Modified `README.md` to fix minor syntax issues and added Code Excerpt to `README.md`. * Updates code for new analysis options. * Updates code for `no_leading_underscores_for_local_identifiers` lint. diff --git a/packages/google_maps_flutter/google_maps_flutter/README.md b/packages/google_maps_flutter/google_maps_flutter/README.md index 58726a1faaa1..b3e3d9bc8333 100644 --- a/packages/google_maps_flutter/google_maps_flutter/README.md +++ b/packages/google_maps_flutter/google_maps_flutter/README.md @@ -1,5 +1,7 @@ # Google Maps for Flutter + + [![pub package](https://img.shields.io/pub/v/google_maps_flutter.svg)](https://pub.dev/packages/google_maps_flutter) A Flutter plugin that provides a [Google Maps](https://developers.google.com/maps/) widget. @@ -105,38 +107,25 @@ the `GoogleMap`'s `onMapCreated` callback. ### Sample Usage + ```dart -import 'dart:async'; - -import 'package:flutter/material.dart'; -import 'package:google_maps_flutter/google_maps_flutter.dart'; - -void main() => runApp(MyApp()); - -class MyApp extends StatelessWidget { - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'Flutter Google Maps Demo', - home: MapSample(), - ); - } -} - class MapSample extends StatefulWidget { + const MapSample({Key? key}) : super(key: key); + @override State createState() => MapSampleState(); } class MapSampleState extends State { - Completer _controller = Completer(); + final Completer _controller = + Completer(); - static final CameraPosition _kGooglePlex = CameraPosition( + static const CameraPosition _kGooglePlex = CameraPosition( target: LatLng(37.42796133580664, -122.085749655962), zoom: 14.4746, ); - static final CameraPosition _kLake = CameraPosition( + static const CameraPosition _kLake = CameraPosition( bearing: 192.8334901395799, target: LatLng(37.43296265331129, -122.08832357078792), tilt: 59.440717697143555, @@ -144,7 +133,7 @@ class MapSampleState extends State { @override Widget build(BuildContext context) { - return new Scaffold( + return Scaffold( body: GoogleMap( mapType: MapType.hybrid, initialCameraPosition: _kGooglePlex, @@ -154,8 +143,8 @@ class MapSampleState extends State { ), floatingActionButton: FloatingActionButton.extended( onPressed: _goToTheLake, - label: Text('To the lake!'), - icon: Icon(Icons.directions_boat), + label: const Text('To the lake!'), + icon: const Icon(Icons.directions_boat), ), ); } @@ -164,7 +153,6 @@ class MapSampleState extends State { final GoogleMapController controller = await _controller.future; controller.animateCamera(CameraUpdate.newCameraPosition(_kLake)); } -} ``` See the `example` directory for a complete sample app. diff --git a/packages/google_maps_flutter/google_maps_flutter/example/build.excerpt.yaml b/packages/google_maps_flutter/google_maps_flutter/example/build.excerpt.yaml new file mode 100644 index 000000000000..2102d25a193c --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter/example/build.excerpt.yaml @@ -0,0 +1,15 @@ +targets: + $default: + sources: + include: + - lib/** + # Some default includes that aren't really used here but will prevent + # false-negative warnings: + - $package$ + - lib/$lib$ + exclude: + - '**/.*/**' + # - '**/build/**' + # builders: + # code_excerpter|code_excerpter: + # enabled: true \ No newline at end of file diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample.dart new file mode 100644 index 000000000000..a15639893515 --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample.dart @@ -0,0 +1,72 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// ignore_for_file: public_member_api_docs + +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; + +void main() => runApp(const MyApp()); + +class MyApp extends StatelessWidget { + const MyApp({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return const MaterialApp( + title: 'Flutter Google Maps Demo', + home: MapSample(), + ); + } +} + +// #docregion MapSample +class MapSample extends StatefulWidget { + const MapSample({Key? key}) : super(key: key); + + @override + State createState() => MapSampleState(); +} + +class MapSampleState extends State { + final Completer _controller = + Completer(); + + static const CameraPosition _kGooglePlex = CameraPosition( + target: LatLng(37.42796133580664, -122.085749655962), + zoom: 14.4746, + ); + + static const CameraPosition _kLake = CameraPosition( + bearing: 192.8334901395799, + target: LatLng(37.43296265331129, -122.08832357078792), + tilt: 59.440717697143555, + zoom: 19.151926040649414); + + @override + Widget build(BuildContext context) { + return Scaffold( + body: GoogleMap( + mapType: MapType.hybrid, + initialCameraPosition: _kGooglePlex, + onMapCreated: (GoogleMapController controller) { + _controller.complete(controller); + }, + ), + floatingActionButton: FloatingActionButton.extended( + onPressed: _goToTheLake, + label: const Text('To the lake!'), + icon: const Icon(Icons.directions_boat), + ), + ); + } + + Future _goToTheLake() async { + final GoogleMapController controller = await _controller.future; + controller.animateCamera(CameraUpdate.newCameraPosition(_kLake)); + } + // #enddocregion MapSample +} diff --git a/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml index ce6819c190db..06bfbbf290e4 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml @@ -22,6 +22,7 @@ dependencies: google_maps_flutter_platform_interface: ^2.2.1 dev_dependencies: + build_runner: ^2.1.10 espresso: ^0.2.0 flutter_driver: sdk: flutter diff --git a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml index 540f5d810966..a037f614f2ac 100644 --- a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml @@ -2,7 +2,7 @@ name: google_maps_flutter description: A Flutter plugin for integrating Google Maps in iOS and Android applications. repository: https://github.com/flutter/plugins/tree/main/packages/google_maps_flutter/google_maps_flutter issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 -version: 2.2.1 +version: 2.2.2 environment: sdk: ">=2.14.0 <3.0.0" From e8c9731f1b1ccf96d9ed60f09530fec301ecac96 Mon Sep 17 00:00:00 2001 From: engine-flutter-autoroll Date: Mon, 12 Dec 2022 13:22:20 -0500 Subject: [PATCH 3/6] Roll Flutter from eefbe85c8bd4 to bd0791be3ff2 (25 revisions) (#6832) * 48cfe2eb0 Opt dashing_postprocess.dart out of null safety until we figure out why (flutter/flutter#116786) * b4304dadc Update the Dart language version in the pubspec generated by the dartdoc script (flutter/flutter#116789) * 55e750115 Roll Plugins from 51434ec83dde to 6ab7d710d2fb (3 revisions) (flutter/flutter#116781) * e57b7f4ea Add Material 3 support for `ListTile` - Part 1 (flutter/flutter#116194) * 73cb7c2fc Squashed MediaQuery InheritedModel (flutter/flutter#114459) * 1da8f4edc Several fixes to packaging builders. (flutter/flutter#116800) * 86fa9e511 Roll Flutter Engine from 8d83b98c55b3 to 030950f3070c (29 revisions) (flutter/flutter#116802) * ca3ce3945 89fd33c62 Don't use sync*, as it is unimplemented in dart2wasm. (flutter/engine#38149) (flutter/flutter#116808) * 332032dda Roll Flutter Engine from 89fd33c62f2c to a259613ab871 (2 revisions) (flutter/flutter#116811) * 9dd30878d Add LookupBoundary to Material (flutter/flutter#116736) * cbdc763cf Roll Flutter Engine from a259613ab871 to 8b56b5a98ed4 (2 revisions) (flutter/flutter#116813) * c4b8046d9 Floating cursor cleanup (flutter/flutter#116746) * 7d7848aba d64a5129a [const_finder] Ignore constructor invocations from generated tear-off declarations (flutter/engine#38131) (flutter/flutter#116814) * be5c389e6 faae28965 Roll Skia from 44062eff3e25 to 1b194c67700e (2 revisions) (flutter/engine#38166) (flutter/flutter#116817) * 7549925c8 Revert "Adds API in semanticsconfiguration to decide how to merge child semanticsConfigurations (#110730)" (flutter/flutter#116839) * 68f02dd2e Roll Flutter Engine from faae28965a94 to fbb79e704b0a (6 revisions) (flutter/flutter#116843) * ec02f3bfb 656b67796 Roll Dart SDK from 0940b5e6ccd5 to 21f2997a8fc6 (9 revisions) (flutter/engine#38172) (flutter/flutter#116844) * c02d53fc0 More gracefully handle license loading failures (flutter/flutter#87841) * 4a1511166 0795bccae Roll Skia from 0d482f9fa8b3 to 80d9e679f909 (2 revisions) (flutter/engine#38195) (flutter/flutter#116853) * 1fc166a51 3ca497ebb Roll Skia from 80d9e679f909 to 29791c73ae16 (1 revision) (flutter/engine#38200) (flutter/flutter#116859) * 9fdb64b7e Taboo the word "simply" from our API documentation. (flutter/flutter#116061) * 92aebc953 922546c91 [Impeller] Fix asset names used for the generated entrypoint name can contain invalid identifiers for the target language (flutter/engine#38202) (flutter/flutter#116868) * 437f6f86e 9e37c9883 Roll Skia from 29791c73ae16 to 7bd37737e35d (1 revision) (flutter/engine#38207) (flutter/flutter#116871) * d19f77674 62a5de2ef Roll Skia from 7bd37737e35d to 0cb546781e89 (4 revisions) (flutter/engine#38213) (flutter/flutter#116880) * bd0791be3 Pass drone_dimensions as part of the main target. (flutter/flutter#116812) --- .ci/flutter_master.version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/flutter_master.version b/.ci/flutter_master.version index 9cc98b6e21ea..f2f849143643 100644 --- a/.ci/flutter_master.version +++ b/.ci/flutter_master.version @@ -1 +1 @@ -eefbe85c8bd4185a087cd83251e552be326568ad +bd0791be3ff217c4f22e7cc09e1469f973470a9b From 2eb616545fff113141f9b0d40851a9322ad54c23 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Mon, 12 Dec 2022 11:30:02 -0800 Subject: [PATCH 4/6] Reland "[google_maps_flutter] ios: re-enable test with popup #5312" (#6783) * reland fix fix test for iOS 16 fix fix typos * format * update changelog --- .../google_maps_flutter_ios/CHANGELOG.md | 2 ++ .../example/ios/Podfile | 3 -- .../ios/RunnerUITests/GoogleMapsUITests.m | 33 +++++++++++++++---- 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_ios/CHANGELOG.md index 81b9c8f0f110..e5f232d3ce16 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_ios/CHANGELOG.md @@ -1,6 +1,8 @@ ## NEXT * Updates code for new analysis options. +* Re-enable XCUITests: testUserInterface. +* Remove unnecessary `RunnerUITests` target from Podfile of the example app. ## 2.1.12 diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Podfile b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Podfile index 14b4bdc51c96..29bfe631a3e7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Podfile +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Podfile @@ -34,9 +34,6 @@ target 'Runner' do pod 'OCMock', '~> 3.9.1' end - target 'RunnerUITests' do - inherit! :search_paths - end end post_install do |installer| diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerUITests/GoogleMapsUITests.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerUITests/GoogleMapsUITests.m index f4cdb7c50ab2..c3af06691a3f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerUITests/GoogleMapsUITests.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerUITests/GoogleMapsUITests.m @@ -2,9 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +@import CoreLocation; @import XCTest; @import os.log; -@import GoogleMaps; @interface GoogleMapsUITests : XCTestCase @property(nonatomic, strong) XCUIApplication *app; @@ -18,8 +18,6 @@ - (void)setUp { self.app = [[XCUIApplication alloc] init]; [self.app launch]; - // The location permission interception is currently not working. - // See: https://github.com/flutter/flutter/issues/93325. [self addUIInterruptionMonitorWithDescription:@"Permission popups" handler:^BOOL(XCUIElement *_Nonnull interruptingElement) { @@ -45,8 +43,7 @@ - (void)setUp { }]; } -// Temporarily disabled due to https://github.com/flutter/flutter/issues/93325 -- (void)skip_testUserInterface { +- (void)testUserInterface { XCUIApplication *app = self.app; XCUIElement *userInteface = app.staticTexts[@"User interface"]; if (![userInteface waitForExistenceWithTimeout:30.0]) { @@ -54,17 +51,27 @@ - (void)skip_testUserInterface { XCTFail(@"Failed due to not able to find User interface"); } [userInteface tap]; + XCUIElement *platformView = app.otherElements[@"platform_view[0]"]; if (![platformView waitForExistenceWithTimeout:30.0]) { os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription); XCTFail(@"Failed due to not able to find platform view"); } + + // There is a known bug where the permission popups interruption won't get fired until a tap + // happened in the app. We expect a permission popup so we do a tap here. + // iOS 16 has a bug where if the app itself is directly tapped: [app tap], the first button + // (disable compass) in the app is also tapped, so instead we tap a arbitrary location in the app + // instead. + XCUICoordinate *coordinate = [app coordinateWithNormalizedOffset:CGVectorMake(0, 0)]; + [coordinate tap]; XCUIElement *compass = app.buttons[@"disable compass"]; if (![compass waitForExistenceWithTimeout:30.0]) { os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription); - XCTFail(@"Failed due to not able to find compass button"); + XCTFail(@"Failed due to not able to find disable compass button"); } - [compass tap]; + + [self forceTap:compass]; } - (void)testMapCoordinatesPage { @@ -190,4 +197,16 @@ - (void)testMapClickPage { } } +- (void)forceTap:(XCUIElement *)button { + // iOS 16 introduced a bug where hittable is NO for buttons. We force hit the location of the + // button if that is the case. It is likely similar to + // https://github.com/flutter/flutter/issues/113377. + if (button.isHittable) { + [button tap]; + return; + } + XCUICoordinate *coordinate = [button coordinateWithNormalizedOffset:CGVectorMake(0, 0)]; + [coordinate tap]; +} + @end From 738bd91d87f25bcf41d1d325d0dd5f89a6577c55 Mon Sep 17 00:00:00 2001 From: Collin Jackson Date: Mon, 12 Dec 2022 20:29:36 -0800 Subject: [PATCH 5/6] Update FlutterFire link (#6835) --- FlutterFire.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FlutterFire.md b/FlutterFire.md index 00326167e7ab..551d9b642c31 100644 --- a/FlutterFire.md +++ b/FlutterFire.md @@ -1,6 +1,6 @@ # FlutterFire - MOVED -The FlutterFire family of plugins has moved to the FirebaseExtended organization on GitHub. This makes it easier for us to collaborate with the Firebase team. We want to build the best integration we can! +The FlutterFire family of plugins has moved to the Firebase organization on GitHub. This makes it easier for us to collaborate with the Firebase team. We want to build the best integration we can! Visit FlutterFire at its new home: -https://github.com/FirebaseExtended/flutterfire \ No newline at end of file +https://github.com/firebase/flutterfire From ec2041f82584303d640fc7a3bc4ae31ebd76bc8e Mon Sep 17 00:00:00 2001 From: engine-flutter-autoroll Date: Tue, 13 Dec 2022 11:01:22 -0500 Subject: [PATCH 6/6] Roll Flutter from bd0791be3ff2 to 15af81782e19 (27 revisions) (#6837) * d1436d1df Roll Plugins from 6ab7d710d2fb to 0609adb457fd (2 revisions) (flutter/flutter#116891) * 84ed058b4 [flutter_tools] Add remap sampler support (flutter/flutter#116861) * a8c9f9c6f Fix `NavigationBar` ripple for non-default `NavigationDestinationLabelBehavior` (flutter/flutter#116888) * 5a229e282 Add LookupBoundary to Overlay (flutter/flutter#116741) * d19047d8a [framework] make opacity widget create a repaint boundary (flutter/flutter#116788) * 882e105a4 Revert "Add Material 3 support for `ListTile` - Part 1 (#116194)" (flutter/flutter#116908) * 7a743c881 [flutter_tools] Pin and roll pub (flutter/flutter#116745) * 558b7e004 Adjust test to tolerate additional trace fields (flutter/flutter#116914) * c420562ef Fix output match (flutter/flutter#116912) * 8e1f8352b Fix MediaQuery.paddingOf (flutter/flutter#116858) * 8cfc6061e Roll Flutter Engine from 62a5de2efc9c to 2148fc003077 (5 revisions) (flutter/flutter#116920) * 601f48cd9 InteractiveViewer discrete trackpad panning (flutter/flutter#112171) * 41625b662 Test flutter run does not have unexpected engine logs (flutter/flutter#116798) * 9b46f2a69 ff2fe8381 [cpp20] Fix incompatible aggregate initialization (flutter/engine#38165) (flutter/flutter#116927) * 15939b477 Remove duped fix rules (flutter/flutter#116933) * e331dcda1 [framework] make transform with filterQuality a rpb (flutter/flutter#116792) * 6432fd1b1 6c190ea1e Roll Skia from bb9378b61c4f to 788fe69e7ade (6 revisions) (flutter/engine#38226) (flutter/flutter#116935) * 97df2b319 Fix scroll jump when NestedScrollPosition is inertia-cancelled. (flutter/flutter#116689) * ca7fe3348 Roll Flutter Engine from 6c190ea1e8df to e144f81e92d8 (3 revisions) (flutter/flutter#116939) * b713edcee 290f3a35e Roll Skia from 788fe69e7ade to 2e417d4f7993 (3 revisions) (flutter/engine#38235) (flutter/flutter#116941) * 04ee5926a Remove RenderEditable textPainter height hack (flutter/flutter#113301) * 7211ca09d a33e699de Roll Skia from 2e417d4f7993 to 08dc0c9e4e70 (1 revision) (flutter/engine#38239) (flutter/flutter#116952) * f5249bcb0 Remove use of NullThrownError (flutter/flutter#116122) * 9ccfb87ad 64a661d6d Roll Skia from 08dc0c9e4e70 to 9abf4b1bf242 (4 revisions) (flutter/engine#38240) (flutter/flutter#116955) * 256d54e17 47417ce80 [Impeller Scene] Node deserialization (flutter/engine#38190) (flutter/flutter#116959) * db26f486e afc2f9559 Roll Skia from 9abf4b1bf242 to c83eef7dc2a3 (3 revisions) (flutter/engine#38243) (flutter/flutter#116970) * 15af81782 74a9c7e0f Roll Fuchsia Mac SDK from aMW0DjntzFJj4RoR3... to Cd_ZtrDVcpQ85HRL3... (flutter/engine#38242) (flutter/flutter#116973) --- .ci/flutter_master.version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/flutter_master.version b/.ci/flutter_master.version index f2f849143643..ef5451e4ffde 100644 --- a/.ci/flutter_master.version +++ b/.ci/flutter_master.version @@ -1 +1 @@ -bd0791be3ff217c4f22e7cc09e1469f973470a9b +15af81782e19ebe7273872f8b07ac71df4e749f2