1. 07 Aug, 2023 16 commits
  2. 06 Aug, 2023 4 commits
  3. 05 Aug, 2023 12 commits
  4. 04 Aug, 2023 8 commits
    • gaaclarke's avatar
      Sped up the time to find macrobenchmarks. (#131959) · 11025e4a
      gaaclarke authored
      This reduce the execution time of macrobenchmarks driver tests.
      
      I tried to find the exact size to scroll the screen but I couldn't find a way to do that with driver tests.
      11025e4a
    • engine-flutter-autoroll's avatar
      Roll Flutter Engine from c254deb8fbda to 4f4734cd48da (2 revisions) (#131955) · 53082f65
      engine-flutter-autoroll authored
      https://github.com/flutter/engine/compare/c254deb8fbda...4f4734cd48da
      
      2023-08-04 chris@bracken.jp [Darwin] Enable ARC in darwin/common unit tests (flutter/engine#44396)
      2023-08-04 skia-flutter-autoroll@skia.org Roll Skia from 45c0a830d805 to 6dc76e862f90 (2 revisions) (flutter/engine#44399)
      
      If this roll has caused a breakage, revert this CL and stop the roller
      using the controls here:
      https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
      Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
      is aware of the problem.
      
      To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose
      
      To report a problem with the AutoRoller itself, please file a bug:
      https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
      
      Documentation for the AutoRoller is here:
      https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
      53082f65
    • engine-flutter-autoroll's avatar
      Roll Flutter Engine from a7bea8621f4b to c254deb8fbda (3 revisions) (#131950) · b7acafa0
      engine-flutter-autoroll authored
      https://github.com/flutter/engine/compare/a7bea8621f4b...c254deb8fbda
      
      2023-08-04 skia-flutter-autoroll@skia.org Roll Skia from 85938bb68e75 to 45c0a830d805 (3 revisions) (flutter/engine#44397)
      2023-08-04 55360120+Matt2D@users.noreply.github.com Flutter iOS Interactive Keyboard: Take Screenshot and Handle Pointer Movement  (flutter/engine#43972)
      2023-08-04 skia-flutter-autoroll@skia.org Roll Dart SDK from b3372378e487 to a0b59bac20fc (1 revision) (flutter/engine#44393)
      
      If this roll has caused a breakage, revert this CL and stop the roller
      using the controls here:
      https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
      Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
      is aware of the problem.
      
      To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose
      
      To report a problem with the AutoRoller itself, please file a bug:
      https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
      
      Documentation for the AutoRoller is here:
      https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
      b7acafa0
    • Justin McCandless's avatar
      Predictive back support for root routes (#120385) · dedd100e
      Justin McCandless authored
      This PR aims to support Android's predictive back gesture when popping the entire Flutter app.  Predictive route transitions between routes inside of a Flutter app will come later.
      
      <img width="200" src="https://user-images.githubusercontent.com/389558/217918109-945febaa-9086-41cc-a476-1a189c7831d8.gif" />
      
      ### Trying it out
      
      If you want to try this feature yourself, here are the necessary steps:
      
        1. Run Android 33 or above.
        1. Enable the feature flag for predictive back on the device under "Developer
           options".
        1. Create a Flutter project, or clone [my example project](https://github.com/justinmc/flutter_predictive_back_examples).
        1. Set `android:enableOnBackInvokedCallback="true"` in
           android/app/src/main/AndroidManifest.xml (already done in the example project).
        1. Check out this branch.
        1. Run the app. Perform a back gesture (swipe from the left side of the
           screen).
      
      You should see the predictive back animation like in the animation above and be able to commit or cancel it.
      
      ### go_router support
      
      go_router works with predictive back out of the box because it uses a Navigator internally that dispatches NavigationNotifications!
      
      ~~go_router can be supported by adding a listener to the router and updating SystemNavigator.setFrameworkHandlesBack.~~
      
      Similar to with nested Navigators, nested go_routers is supported by using a PopScope widget.
      
      <details>
      
      <summary>Full example of nested go_routers</summary>
      
      ```dart
      // Copyright 2014 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.
      
      import 'package:go_router/go_router.dart';
      
      import 'package:flutter/material.dart';
      import 'package:flutter/scheduler.dart';
      
      void main() => runApp(_MyApp());
      
      class _MyApp extends StatelessWidget {
        final GoRouter router = GoRouter(
          routes: <RouteBase>[
            GoRoute(
              path: '/',
              builder: (BuildContext context, GoRouterState state) => _HomePage(),
            ),
            GoRoute(
              path: '/nested_navigators',
              builder: (BuildContext context, GoRouterState state) => _NestedGoRoutersPage(),
            ),
          ],
        );
      
        @override
        Widget build(BuildContext context) {
          return MaterialApp.router(
            routerConfig: router,
          );
        }
      }
      
      class _HomePage extends StatelessWidget {
        @override
        Widget build(BuildContext context) {
          return Scaffold(
            appBar: AppBar(
              title: const Text('Nested Navigators Example'),
            ),
            body: Center(
              child: Column(
                mainAxisAlignment: MainAxisAlignment.center,
                children: <Widget>[
                  const Text('Home Page'),
                  const Text('A system back gesture here will exit the app.'),
                  const SizedBox(height: 20.0),
                  ListTile(
                    title: const Text('Nested go_router route'),
                    subtitle: const Text('This route has another go_router in addition to the one used with MaterialApp above.'),
                    onTap: () {
                      context.push('/nested_navigators');
                    },
                  ),
                ],
              ),
            ),
          );
        }
      }
      
      class _NestedGoRoutersPage extends StatefulWidget {
        @override
        State<_NestedGoRoutersPage> createState() => _NestedGoRoutersPageState();
      }
      
      class _NestedGoRoutersPageState extends State<_NestedGoRoutersPage> {
        late final GoRouter _router;
        final GlobalKey<NavigatorState> _nestedNavigatorKey = GlobalKey<NavigatorState>();
      
        // If the nested navigator has routes that can be popped, then we want to
        // block the root navigator from handling the pop so that the nested navigator
        // can handle it instead.
        bool get _popEnabled {
          // canPop will throw an error if called before build. Is this the best way
          // to avoid that?
          return _nestedNavigatorKey.currentState == null ? true : !_router.canPop();
        }
      
        void _onRouterChanged() {
          // Here the _router reports the location correctly, but canPop is still out
          // of date.  Hence the post frame callback.
          SchedulerBinding.instance.addPostFrameCallback((Duration duration) {
            setState(() {});
          });
        }
      
        @override
        void initState() {
          super.initState();
      
          final BuildContext rootContext = context;
          _router = GoRouter(
            navigatorKey: _nestedNavigatorKey,
            routes: [
              GoRoute(
                path: '/',
                builder: (BuildContext context, GoRouterState state) => _LinksPage(
                  title: 'Nested once - home route',
                  backgroundColor: Colors.indigo,
                  onBack: () {
                    rootContext.pop();
                  },
                  buttons: <Widget>[
                    TextButton(
                      onPressed: () {
                        context.push('/two');
                      },
                      child: const Text('Go to another route in this nested Navigator'),
                    ),
                  ],
                ),
              ),
              GoRoute(
                path: '/two',
                builder: (BuildContext context, GoRouterState state) => _LinksPage(
                  backgroundColor: Colors.indigo.withBlue(255),
                  title: 'Nested once - page two',
                ),
              ),
            ],
          );
      
          _router.addListener(_onRouterChanged);
        }
      
        @override
        void dispose() {
          _router.removeListener(_onRouterChanged);
          super.dispose();
        }
      
        @override
        Widget build(BuildContext context) {
          return PopScope(
            popEnabled: _popEnabled,
            onPopped: (bool success) {
              if (success) {
                return;
              }
              _router.pop();
            },
            child: Router<Object>.withConfig(
              restorationScopeId: 'router-2',
              config: _router,
            ),
          );
        }
      }
      
      class _LinksPage extends StatelessWidget {
        const _LinksPage ({
          required this.backgroundColor,
          this.buttons = const <Widget>[],
          this.onBack,
          required this.title,
        });
      
        final Color backgroundColor;
        final List<Widget> buttons;
        final VoidCallback? onBack;
        final String title;
      
        @override
        Widget build(BuildContext context) {
          return Scaffold(
            backgroundColor: backgroundColor,
            body: Center(
              child: Column(
                mainAxisAlignment: MainAxisAlignment.center,
                children: <Widget>[
                  Text(title),
                  //const Text('A system back here will go back to Nested Navigators Page One'),
                  ...buttons,
                  TextButton(
                    onPressed: onBack ?? () {
                      context.pop();
                    },
                    child: const Text('Go back'),
                  ),
                ],
              ),
            ),
          );
        }
      }
      ```
      
      </details>
      
      ### Resources
      
      Fixes https://github.com/flutter/flutter/issues/109513
      Depends on engine PR https://github.com/flutter/engine/pull/39208  
      Design doc: https://docs.google.com/document/d/1BGCWy1_LRrXEB6qeqTAKlk-U2CZlKJ5xI97g45U7azk/edit#
      Migration guide: https://github.com/flutter/website/pull/8952
      dedd100e
    • engine-flutter-autoroll's avatar
      Roll Flutter Engine from e9f80bff0703 to a7bea8621f4b (3 revisions) (#131948) · daf58279
      engine-flutter-autoroll authored
      https://github.com/flutter/engine/compare/e9f80bff0703...a7bea8621f4b
      
      2023-08-04 skia-flutter-autoroll@skia.org Roll Skia from 5eef2e2b94b4 to 85938bb68e75 (1 revision) (flutter/engine#44392)
      2023-08-04 dnfield@google.com [Impeller] DlCanvas implementation wrapping Aiks canvas (flutter/engine#44248)
      2023-08-04 30870216+gaaclarke@users.noreply.github.com [Impeller] Added a doc page to point out important impeller benchmarks (flutter/engine#44333)
      
      If this roll has caused a breakage, revert this CL and stop the roller
      using the controls here:
      https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
      Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
      is aware of the problem.
      
      To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose
      
      To report a problem with the AutoRoller itself, please file a bug:
      https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
      
      Documentation for the AutoRoller is here:
      https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
      daf58279
    • engine-flutter-autoroll's avatar
      Roll Flutter Engine from badca1f7f8c9 to e9f80bff0703 (6 revisions) (#131943) · ceb70d1a
      engine-flutter-autoroll authored
      https://github.com/flutter/engine/compare/badca1f7f8c9...e9f80bff0703
      
      2023-08-04 skia-flutter-autoroll@skia.org Roll Skia from c40343629a6b to 5eef2e2b94b4 (1 revision) (flutter/engine#44391)
      2023-08-04 skia-flutter-autoroll@skia.org Roll Skia from 03874e298589 to c40343629a6b (4 revisions) (flutter/engine#44389)
      2023-08-04 skia-flutter-autoroll@skia.org Roll Fuchsia Mac SDK from FAGt3OEY8Yi1-SaFj... to jMLeVECzwzDoe9dYS... (flutter/engine#44388)
      2023-08-04 skia-flutter-autoroll@skia.org Roll Skia from 636077ca3a50 to 03874e298589 (1 revision) (flutter/engine#44386)
      2023-08-04 vegorov@google.com Roll buildroot to a067408d923ccf80742571bb7a71705499f5779e (flutter/engine#44385)
      2023-08-04 skia-flutter-autoroll@skia.org Roll Skia from 100bf3248bf0 to 636077ca3a50 (1 revision) (flutter/engine#44384)
      
      Also rolling transitive DEPS:
        fuchsia/sdk/core/mac-amd64 from FAGt3OEY8Yi1 to jMLeVECzwzDo
      
      If this roll has caused a breakage, revert this CL and stop the roller
      using the controls here:
      https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
      Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
      is aware of the problem.
      
      To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose
      
      To report a problem with the AutoRoller itself, please file a bug:
      https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
      
      Documentation for the AutoRoller is here:
      https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
      ceb70d1a
    • Taha Tesser's avatar
      Mention `showTimePicker` function be can be used to show dialog with the time... · 05f9a96e
      Taha Tesser authored
      Mention `showTimePicker` function be can be used to show dialog with the time picker in the `TimePickerDialog` docs (#131932)
      
      fixes https://github.com/flutter/flutter/issues/131931
      
      Every time I search for the time picker in the API docs I end up in the `TimePickerDialog` docs.  
      
      We should link `showTimePicker` so it can be easier to reach it and mention it can be used directly to show a dialog with a time picker.
      05f9a96e
    • Victoria Ashworth's avatar
      Check for simulator runtime in flutter doctor (#131795) · b39604e0
      Victoria Ashworth authored
      Redo of https://github.com/flutter/flutter/pull/130728 - code is the same as before. That PR was stuck in Google testing and then I messed up the rebase so started over.
      
      ----
      
      Starting in Xcode 15, the simulator is no longer included in Xcode and must be downloaded and installed separately. This adds a validation to `flutter doctor` to warn when the needed simulator runtime is missing.
      
      Validation message looks like:
      ```
      [!] Xcode - develop for iOS and macOS (Xcode 15.0)
          ! iOS 17.0 Simulator not installed; this may be necessary for iOS and macOS development.
            To download and install the platform, open Xcode, select Xcode > Settings > Platforms,
            and click the GET button for the required platform.
      
            For more information, please visit:
              https://developer.apple.com/documentation/xcode/installing-additional-simulator-runtimes
      ```
      
      It may also show an error like this when something goes wrong when checking for the simulator:
      ```
      [!] Xcode - develop for iOS and macOS (Xcode 15.0)
          ✗ Unable to find the iPhone Simulator SDK.
      ```
      
      Note: I'm unsure of in the future if the SDK and the simulator runtime will need to match the exact version or just the major. For now, it only checks against the major version.
      
      Part 3 of https://github.com/flutter/flutter/issues/129558.
      b39604e0