Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix Scaffold bottomSheet null exceptions #117008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 21, 2022

Conversation

justinmc
Copy link
Contributor

@justinmc justinmc commented Dec 13, 2022

Prevents the possibility of null exceptions on widget.bottomSheet!.

I was unable to reproduce this "in the wild", but the test does reproduce it by directly calling setState on the StatefulBuilder while the bottom sheet is animating out. Note the use of ignore: invalid_use_of_protected_member.

@Piinks Do you have any other ideas about how to reproduce/test this? I think if I could get that DraggableScrollableActuator to rebuild while its animating out then it would cause the error too. I tried many different variations of building a DraggableScrollableSheet in my bottomSheet and trying to scroll/resize it during the close animation, but couldn't get it to rebuild.

If there is not a better way to test it, are we ok with the ignore to be able to call setState?

Closes #117004

@justinmc justinmc requested review from xster and Piinks December 13, 2022 19:55
@justinmc justinmc self-assigned this Dec 13, 2022
@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Dec 13, 2022
_currentBottomSheet = _buildBottomSheet<void>(
(BuildContext context) {
return NotificationListener<DraggableScrollableNotification>(
onNotification: persistentBottomSheetExtentChanged,
child: DraggableScrollableActuator(
child: StatefulBuilder(
key: _currentBottomSheetKey,
builder: (BuildContext context, StateSetter setState) => widget.bottomSheet!,
builder: (BuildContext context, StateSetter setState) => bottomSheet,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option would be to build SizedBox.shrink() here when bottomSheet is null. However, since this seems to happen when the bottomSheet is animating out, we probably do want to use the old bottomSheet during that time and not suddenly make it disappear.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know it is happening when animating out?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the wild, no, we seem to know nothing about when it's happening. In my test I was able to cause it to happen while animating out, though.

I have switched over to using SizedBox.shrink despite my previous comment. The reason is that it needs to get the latest widget.bottomSheet when the widget is rebuilt with a new parameter, otherwise it will still display the old one.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@justinmc Hi, I think I have reproduced this in the wild, press the '+' button will trigger the exception.

import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MyHomePage(title: 'Flutter Demo Home Page');
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  // This widget is the home page of your application. It is stateful, meaning
  // that it has a State object (defined below) that contains fields that affect
  // how it looks.

  // This class is the configuration for the state. It holds the values (in this
  // case the title) provided by the parent (in this case the App widget) and
  // used by the build method of the State. Fields in a Widget subclass are
  // always marked "final".

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      // This call to setState tells the Flutter framework that something has
      // changed in this State, which causes it to rerun the build method below
      // so that the display can reflect the updated values. If we changed
      // _counter without calling setState(), then the build method would not be
      // called again, and so nothing would appear to happen.
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    // This method is rerun every time setState is called, for instance as done
    // by the _incrementCounter method above.
    //
    // The Flutter framework has been optimized to make rerunning build methods
    // fast, so that you can just rebuild anything that needs updating rather
    // than having to individually change instances of widgets.
    return MaterialApp(
      theme: _counter % 2 == 0 ? ThemeData.dark() : ThemeData.light(),
      home: Scaffold(
        appBar: AppBar(
          // Here we take the value from the MyHomePage object that was created by
          // the App.build method, and use it to set our appbar title.
          title: Text(widget.title),
        ),
        bottomSheet: _counter % 2 == 0
            ? Container(
                width: double.infinity,
                height: 100,
                color: Colors.blue,
                child: const Text('BottomSheet'),
              )
            : null,
        body: Center(
          // Center is a layout widget. It takes a single child and positions it
          // in the middle of the parent.
          child: Column(
            // Column is also a layout widget. It takes a list of children and
            // arranges them vertically. By default, it sizes itself to fit its
            // children horizontally, and tries to be as tall as its parent.
            //
            // Invoke "debug painting" (press "p" in the console, choose the
            // "Toggle Debug Paint" action from the Flutter Inspector in Android
            // Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
            // to see the wireframe for each widget.
            //
            // Column has various properties to control how it sizes itself and
            // how it positions its children. Here we use mainAxisAlignment to
            // center the children vertically; the main axis here is the vertical
            // axis because Columns are vertical (the cross axis would be
            // horizontal).
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              const Text(
                'You have pushed the button this many times:',
              ),
              Text(
                '$_counter',
                style: Theme.of(context).textTheme.headlineMedium,
              ),
            ],
          ),
        ),
        floatingActionButton: FloatingActionButton(
          onPressed: _incrementCounter,
          tooltip: 'Increment',
          child: const Icon(Icons.add),
        ), // This trailing comma makes auto-formatting nicer for build methods.
      ),
    );
  }
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xu-baolin Glad you're back! I think you nailed it here 👍. I was able to write a test that reproduced the bug based on this example. Thank you!

See 35a6f8d

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing @xu-baolin! Thank you! I hope you are feeling better! 🤗

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost recovered, thank you, guys!

Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like there are some test failures here.
To be honest, I am not very familiar here. @xu-baolin may have an idea as to what could cause this issue. The first thing I thought is maybe the customer is removing the sheet from the Scaffold when it is dismissed? Or disposing of it before the animation completes?

@xu-baolin
Copy link
Member

It looks like there are some test failures here.

To be honest, I am not very familiar here. @xu-baolin may have an idea as to what could cause this issue. The first thing I thought is maybe the customer is removing the sheet from the Scaffold when it is dismissed? Or disposing of it before the animation completes?

I just got a positive test. Let's take a look when I defeat the virus.

@justinmc
Copy link
Contributor Author

@xu-baolin Get well soon! Definitely rest up and don't worry about this until you're healthy 💪

@@ -2230,7 +2230,9 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin, Resto
child: DraggableScrollableActuator(
child: StatefulBuilder(
key: _currentBottomSheetKey,
builder: (BuildContext context, StateSetter setState) => widget.bottomSheet!,
builder: (BuildContext context, StateSetter setState) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, if the bottom sheet has been abruptly removed and is null at this point, should we also do anything to make the bottom sheet state closed? Should _currentBottomSheet be null? Or should the animation controller value be set to closed?

I am not sure what the expected behavior is based on no customer test, so I am fine with landing this as is and touching base with the customer to see if this resolves their issues before making more changes. WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I played around with this a bunch after reading your comment and discovered that my current solution would stop the exit animation when the bug was encountered, even though it didn't give an error. I updated this to show the exit animation with the most recent bottomSheet when it has been set to null, and I updated my second test to cover this case as well.

Otherwise we seem to be well covered here when the bottom sheet is closing, and we shouldn't have to do anything else. See _closeCurrentBottomSheet, which will get called when bottomSheet is set to null. Though I agree we should keep in touch with the customer about it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@justinmc Hi caching the last bottom sheet may also cause danger, such as if the sheet has a GlobalKey and the developer reparents it to a different place. It will cause a duplicate GlobalKey error.

I played around with this a bunch after reading your comment and discovered that my current solution would stop the exit animation when the bug was encountered, even though it didn't give an error

---- I think this result is acceptable, it might be better to keep it as is until we get feedback from the customer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I think you're right about that. I've gone back to the previous solution.

The GlobalKey error is reproducible even on master right now because of the exit animation. But we should probably wait for feedback before we make further changes as you say.

Code to repro GlobalKey error
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return const MyHomePage(title: 'Flutter Demo Home Page');
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;
  final GlobalKey bottomSheetKey = GlobalKey();

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    final Widget bottomSheet = Container(
      key: bottomSheetKey,
      width: double.infinity,
      height: 100,
      color: Colors.blue,
      child: const Text('BottomSheet'),
    );

    return MaterialApp(
      theme: _counter % 2 == 0 ? ThemeData.dark() : ThemeData.light(),
      home: Scaffold(
        appBar: AppBar(
          title: Text(widget.title),
        ),
        bottomSheet: _counter % 2 == 0 ? bottomSheet : null,
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              const Text(
                'You have pushed the button this many times:',
              ),
              Text(
                '$_counter',
                style: Theme.of(context).textTheme.headlineMedium,
              ),
              if (_counter % 2 != 0) 
                bottomSheet,
            ],
          ),
        ),
        floatingActionButton: FloatingActionButton(
          onPressed: _incrementCounter,
          tooltip: 'Increment',
          child: const Icon(Icons.add),
        ),
      ),
    );
  }
}

Copy link
Member

@xu-baolin xu-baolin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Dec 21, 2022
@auto-submit auto-submit bot merged commit 8ff1b6e into flutter:master Dec 21, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 22, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Dec 22, 2022
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Dec 22, 2022
* d1244b7 da77d1a3a Roll Skia from 2e3ee507e838 to 7ad6f27aff57 (1 revision) (flutter/engine#38447) (flutter/flutter#117474)

* 400b05a Manual package roll (flutter/flutter#117439)

* 9a347fb Support safe area and scrolling in the NavigationDrawer (flutter/flutter#116995)

* 2a50236 Add native unit tests to iOS and macOS templates (flutter/flutter#117147)

* 1970bc9 cacheWidth cacheHeight support for canvaskit on web (flutter/flutter#117423)

* ff347bf Fix `InkRipple` doesn't respect `rectCallback` when rendering ink circle (flutter/flutter#117395)

* ddb7e43 Roll Flutter Engine from da77d1a3abb8 to 84ba80331ffe (2 revisions) (flutter/flutter#117489)

* 8ff1b6e Fix Scaffold bottomSheet null exceptions (flutter/flutter#117008)

* 2931e50 Handle the case of no selection rects (flutter/flutter#117419)

* 39fa011 Revert "Add support for double tap and drag for text selection (#109573)" (flutter/flutter#117497)

* b8b3567 Remove single-view assumption from widgets library (flutter/flutter#117480)

* ca7ca3b Roll Flutter Engine from 84ba80331ffe to a90c45db3f13 (2 revisions) (flutter/flutter#117499)

* 9fb1ae8 [iOS] Add task for spell check integration test (flutter/flutter#116222)
auto-submit bot pushed a commit to flutter/plugins that referenced this pull request Dec 22, 2022
* 9aa2ea1 Roll Flutter Engine from 0a6a4a58f4f7 to db5605ea7115 (11 revisions) (flutter/flutter#117109)

* 409a39d remove debugPrint from timePicker test (flutter/flutter#117111)

* 169b49f Revert "[framework] make transform with filterQuality a rpb (#116792)" (flutter/flutter#117095)

* 47300e0 Roll Plugins from 10c0293 to 78de28c (4 revisions) (flutter/flutter#117145)

* dcd2170 Fix typos in scale gesture recognizer docs (flutter/flutter#117116)

* fc3571e Improve documentation of `compute()` function (flutter/flutter#116878)

* b122200 Roll Flutter Engine from db5605ea7115 to 29196519c124 (13 revisions) (flutter/flutter#117148)

* f1d157b Add an integration test to plugin template example (flutter/flutter#117062)

* ada4460 Audit `covariant` usage in tool (flutter/flutter#116930)

* 1eaf5c0 [flutter_tools] tree shake icons from web builds (flutter/flutter#115886)

* 91c1c70 Bump ossf/scorecard-action from 2.0.6 to 2.1.0 (flutter/flutter#117170)

* c98978a Update Navigator updatePages() (flutter/flutter#116945)

* 0916375 [tools]Build IPA validation UI Polish  (flutter/flutter#116744)

* a41c447 Pass dimension explicitly to mac x64 packaging. (flutter/flutter#117172)

* 86b62a3 Tiny fix about outdated message (flutter/flutter#114391)

* a34e419 Inject current `FlutterView` into tree and make available via `View.of(context)` (flutter/flutter#116924)

* c7cb5f3 [flutter_tools] pin package intl and roll pub packages (flutter/flutter#117168)

* 7336312 Do not filter the stderr output of "flutter run" in the devicelab run tests (flutter/flutter#117188)

* fa711f7 Run packaging on presubtmit. (flutter/flutter#116943)

* 76bb8ea Reland "Fix text field label animation duration and curve" (#114646)"

* 80e1008 fix: #110342 unable to update rich text widget gesture recognizer (flutter/flutter#116849)

* da7b832 Bottom App Bar M3 background color fix (flutter/flutter#117082)

* ab47fc3 Roll Plugins from 78de28c to cbcf507 (3 revisions) (flutter/flutter#117213)

* 23a2fa3 Reland "Adds API in semanticsconfiguration to decide how to merge chi… (flutter/flutter#116895)

* 9102f2f Revert "Inject current `FlutterView` into tree and make available via `View.of(context)` (#116924)" (flutter/flutter#117214)

* 3d0607b Defer `systemFontsDidChange` to the transientCallbacks phase (flutter/flutter#117123)

* ecf9b2d Update localization of shortcut labels in menus (flutter/flutter#116681)

* 0604a0e Add a recursive flag to the zip command - currently it is zipping nothing (flutter/flutter#117227)

* 98e9032 [web] Allow shift + left/right keyboard shortcuts to be handled by framework on web (flutter/flutter#117217)

* ebeb491 Use the name of errors, not the diagnostic messages. (flutter/flutter#117229)

* 93c581a Formatted and removed lints from devicelab README.md (flutter/flutter#117239)

* 5018a6c Roll Flutter Engine from 29196519c124 to d91e20879a67 (29 revisions) (flutter/flutter#117242)

* 36d536a Roll Flutter Engine from d91e20879a67 to 60cf34e2abf1 (4 revisions) (flutter/flutter#117246)

* c9dd458 42689eafb Sped up FlutterStandardCodec writing speed. (flutter/engine#38345) (flutter/flutter#117249)

* 0a2a1d9 d45d375ae [iOS, macOS] Migrate from assert to FML_DCHECK (flutter/engine#38368) (flutter/flutter#117256)

* bf5fdb9 Reland "Inject current FlutterView into tree and make available via `View.of(context)` (#116924)" (flutter/flutter#117244)

* 427b2fb 901b455d0 Roll Fuchsia Mac SDK from bn5VF1-xDf-wKjIw8... to qYE6uXjRtAxy7p5HB... (flutter/engine#38373) (flutter/flutter#117258)

* cee3e6c b10769998 Even though the file is pure C code, it's useful to use a C++ or Objective-C++ filename in order to use FML (assertions) in the implementation. (flutter/engine#38365) (flutter/flutter#117260)

* 7b850ef f74dd5331 Roll Fuchsia Linux SDK from H6B0UgW07fc1nBtnc... to PqyqxdbUFyd8xoYIP... (flutter/engine#38377) (flutter/flutter#117262)

* b20a9e0 imporve gesture recognizer semantics test cases (flutter/flutter#117257)

* a82c556 3626c487a Add a missing include to display_list_matrix_clip_tracker.h (flutter/engine#38371) (flutter/flutter#117269)

* 9daf2a6 Roll Flutter Engine from 3626c487a610 to 7e296985f426 (2 revisions) (flutter/flutter#117270)

* d0d13c5 51b84d69b Roll Fuchsia Mac SDK from qYE6uXjRtAxy7p5HB... to qk9nUlw83EeMMaWmE... (flutter/engine#38380) (flutter/flutter#117273)

* 725049f 794370b9c Roll Fuchsia Linux SDK from PqyqxdbUFyd8xoYIP... to bloqad357AGI6lnOb... (flutter/engine#38381) (flutter/flutter#117276)

* 49f3ca4 eeae936f9 Use canvaskit `toByteData` for unsupported videoFrame formats (flutter/engine#38361) (flutter/flutter#117279)

* c0dddac Fix is canvas kit bool (flutter/flutter#116944)

* d88d524 276327f7e Roll Fuchsia Mac SDK from qk9nUlw83EeMMaWmE... to DdU--deE0Xl4TQ2Bm... (flutter/engine#38383) (flutter/flutter#117286)

* b7d9be0 747a9d8c7 Roll Skia from 7b0a9d9a3008 to 0362c030efa7 (9 revisions) (flutter/engine#38385) (flutter/flutter#117289)

* 1233fc9 37387019b Roll Fuchsia Linux SDK from bloqad357AGI6lnOb... to mRBUNknZk43y-LHGS... (flutter/engine#38386) (flutter/flutter#117290)

* a3a0048 3c6cab032 Roll Fuchsia Mac SDK from DdU--deE0Xl4TQ2Bm... to NLb_T58g0l_X46JEN... (flutter/engine#38387) (flutter/flutter#117295)

* 420c6d6 Roll Flutter Engine from 3c6cab03274f to 58ab5277a7c4 (2 revisions) (flutter/flutter#117312)

* d238bed Roll Plugins from cbcf507 to 840a049 (8 revisions) (flutter/flutter#117314)

* 3eefb7a a9491515f Roll Skia from 0362c030efa7 to fc0ac31a46f8 (4 revisions) (flutter/engine#38399) (flutter/flutter#117317)

* 9f9010f [flutter_tools] Update DAP progress when waiting for Dart Debug extension connection (flutter/flutter#116892)

* 32da250 a12dadfda Roll Fuchsia Mac SDK from NLb_T58g0l_X46JEN... to NS4fVXM2KhKcZ1uyD... (flutter/engine#38400) (flutter/flutter#117319)

* cb988c7 Add `indicatorColor` & `indicatorShape` to `NavigationRail`, `NavigationDrawer` and move these properties from destination to `NavigationBar` (flutter/flutter#117049)

* 5fcb48d Fix `NavigationRail` highlight (flutter/flutter#117320)

* 70f391d 7bc519375 Roll Skia from fc0ac31a46f8 to 46af4ad25426 (1 revision) (flutter/engine#38403) (flutter/flutter#117322)

* 9f2c5d8 Support `flutter build web --wasm` (flutter/flutter#117075)

* 55584ad Roll Flutter Engine from 7bc519375b7b to 45713ea10510 (2 revisions) (flutter/flutter#117330)

* 4daff08 Roll Flutter Engine from 45713ea10510 to cba3a3990138 (5 revisions) (flutter/flutter#117336)

* 1adc275 Bump min SDK to 2.19.0-0 (flutter/flutter#117345)

* efadc34 Roll Flutter Engine from cba3a3990138 to 6de29d1cba70 (3 revisions) (flutter/flutter#117354)

* b30947b roll packages (flutter/flutter#117226)

* e625e5f 3330cce60 Roll Fuchsia Linux SDK from yGQvkNl85l1TSeuo9... to uKNwsaf92uZcX_QiY... (flutter/engine#38411) (flutter/flutter#117358)

* 50a23d9 339791f19 Roll Skia from 8876daf17554 to e8c3fa6d7d2f (3 revisions) (flutter/engine#38413) (flutter/flutter#117366)

* 7f7a877 Implemented Scrim Focus for BottomSheet (flutter/flutter#116743)

* 38e3930 Exposed tooltip longPress action when available (flutter/flutter#117338)

* 61fb6ea Manual roll Flutter Engine from 339791f190fa to 7ee3bf518036 (1 revision) #117367 (flutter/flutter#117372)

* c64dcbe Revert "Manual roll Flutter Engine from 339791f190fa to 7ee3bf518036 (1 revision) #117367 (#117372)" (flutter/flutter#117396)

* 8289ea6 Move a comment where it belongs (flutter/flutter#117385)

* fa3777b Enable `sized_box_shrink_expand` lint (flutter/flutter#117371)

* e0742eb [Android] Add spell check suggestions toolbar (flutter/flutter#114460)

* 0220afd enable use_enums (flutter/flutter#117376)

* d71fa88 Bump ossf/scorecard-action from 2.1.0 to 2.1.1 (flutter/flutter#117337)

* 4591f05 roll packages (flutter/flutter#117357)

* 46bb853 Revert "Revert "Manual roll Flutter Engine from 339791f190fa to 7ee3bf518036 (1 revision) #117367 (#117372)" (#117396)" (flutter/flutter#117402)

* 81bc54b Enable `use_colored_box` lint (flutter/flutter#117370)

* fdd2d7d Sync analysis_options.yaml & cleanups (flutter/flutter#117327)

* de35764 [Android] Bump template AGP and NDK versions (flutter/flutter#116536)

* b308555 Enable `dangling_library_doc_comments` and `library_annotations` lints (flutter/flutter#117365)

* b3c7fe3 enable test_ownership in presubmit (flutter/flutter#117414)

* 014b8f7 Roll Flutter Engine from 7ee3bf518036 to 75d75575d0ea (12 revisions) (flutter/flutter#117421)

* cd0f15a Add support for double tap and drag for text selection (flutter/flutter#109573)

* e8e26b6 c7eae2901 [Impeller] Remove depth/stencil attachments from imgui pipeline (flutter/engine#38427) (flutter/flutter#117425)

* a3e7fe3 de59f842a Roll Dart SDK from 35f6108ef685 to 1530a824fd5f (6 revisions) (flutter/engine#38431) (flutter/flutter#117429)

* 1699351 4724a91af Roll Skia from 09d796c0a728 to a60f3f6214d3 (5 revisions) (flutter/engine#38432) (flutter/flutter#117433)

* 9024c95 28f344ceb Roll Dart SDK from 1530a824fd5f to 8078926ca996 (1 revision) (flutter/engine#38434) (flutter/flutter#117435)

* cae7846 c9ee05b68 use min/max sandwich test on unit test bounds (flutter/engine#38435) (flutter/flutter#117442)

* 6819f72 Roll Flutter Engine from c9ee05b68e6e to 2404db80ae80 (3 revisions) (flutter/flutter#117443)

* f5c0716 4910ff889 Roll Fuchsia Mac SDK from nJJfWIwH5zElheIX8... to UsYNZnnfR_s0OGQoX... (flutter/engine#38444) (flutter/flutter#117454)

* a7a5d14 Roll Plugins from 840a049 to 54fc206 (6 revisions) (flutter/flutter#117456)

* 51a3e3a 1e695f453 Roll Dart SDK from 778a29535ab5 to 62ea309071c6 (1 revision) (flutter/engine#38445) (flutter/flutter#117459)

* d1244b7 da77d1a3a Roll Skia from 2e3ee507e838 to 7ad6f27aff57 (1 revision) (flutter/engine#38447) (flutter/flutter#117474)

* 400b05a Manual package roll (flutter/flutter#117439)

* 9a347fb Support safe area and scrolling in the NavigationDrawer (flutter/flutter#116995)

* 2a50236 Add native unit tests to iOS and macOS templates (flutter/flutter#117147)

* 1970bc9 cacheWidth cacheHeight support for canvaskit on web (flutter/flutter#117423)

* ff347bf Fix `InkRipple` doesn't respect `rectCallback` when rendering ink circle (flutter/flutter#117395)

* ddb7e43 Roll Flutter Engine from da77d1a3abb8 to 84ba80331ffe (2 revisions) (flutter/flutter#117489)

* 8ff1b6e Fix Scaffold bottomSheet null exceptions (flutter/flutter#117008)

* 2931e50 Handle the case of no selection rects (flutter/flutter#117419)

* 39fa011 Revert "Add support for double tap and drag for text selection (#109573)" (flutter/flutter#117497)

* b8b3567 Remove single-view assumption from widgets library (flutter/flutter#117480)

* ca7ca3b Roll Flutter Engine from 84ba80331ffe to a90c45db3f13 (2 revisions) (flutter/flutter#117499)

* 9fb1ae8 [iOS] Add task for spell check integration test (flutter/flutter#116222)
@justinmc justinmc deleted the bottom-sheet-error branch December 22, 2022 18:17
loic-sharma pushed a commit to fluttergithubbot/flutter that referenced this pull request Jan 6, 2023
* Prevent possibility of null exceptions on widget.bottomSheet

* New approach that fixes bug in updating the bottomSheet

* Real-world test for bottomSheet error

* Allow bottomSheet to animate out after being killed, even if it was rebuilt

* Go back to the simple solution of SizedBox.shrink
gspencergoog pushed a commit to gspencergoog/flutter that referenced this pull request Jan 19, 2023
* Prevent possibility of null exceptions on widget.bottomSheet

* New approach that fixes bug in updating the bottomSheet

* Real-world test for bottomSheet error

* Allow bottomSheet to animate out after being killed, even if it was rebuilt

* Go back to the simple solution of SizedBox.shrink
mauricioluz pushed a commit to mauricioluz/plugins that referenced this pull request Jan 26, 2023
* 9aa2ea1 Roll Flutter Engine from 0a6a4a58f4f7 to db5605ea7115 (11 revisions) (flutter/flutter#117109)

* 409a39d remove debugPrint from timePicker test (flutter/flutter#117111)

* 169b49f Revert "[framework] make transform with filterQuality a rpb (#116792)" (flutter/flutter#117095)

* 47300e0 Roll Plugins from 10c0293 to 78de28c (4 revisions) (flutter/flutter#117145)

* dcd2170 Fix typos in scale gesture recognizer docs (flutter/flutter#117116)

* fc3571e Improve documentation of `compute()` function (flutter/flutter#116878)

* b122200 Roll Flutter Engine from db5605ea7115 to 29196519c124 (13 revisions) (flutter/flutter#117148)

* f1d157b Add an integration test to plugin template example (flutter/flutter#117062)

* ada4460 Audit `covariant` usage in tool (flutter/flutter#116930)

* 1eaf5c0 [flutter_tools] tree shake icons from web builds (flutter/flutter#115886)

* 91c1c70 Bump ossf/scorecard-action from 2.0.6 to 2.1.0 (flutter/flutter#117170)

* c98978a Update Navigator updatePages() (flutter/flutter#116945)

* 0916375 [tools]Build IPA validation UI Polish  (flutter/flutter#116744)

* a41c447 Pass dimension explicitly to mac x64 packaging. (flutter/flutter#117172)

* 86b62a3 Tiny fix about outdated message (flutter/flutter#114391)

* a34e419 Inject current `FlutterView` into tree and make available via `View.of(context)` (flutter/flutter#116924)

* c7cb5f3 [flutter_tools] pin package intl and roll pub packages (flutter/flutter#117168)

* 7336312 Do not filter the stderr output of "flutter run" in the devicelab run tests (flutter/flutter#117188)

* fa711f7 Run packaging on presubtmit. (flutter/flutter#116943)

* 76bb8ea Reland "Fix text field label animation duration and curve" (#114646)"

* 80e1008 fix: #110342 unable to update rich text widget gesture recognizer (flutter/flutter#116849)

* da7b832 Bottom App Bar M3 background color fix (flutter/flutter#117082)

* ab47fc3 Roll Plugins from 78de28c to cbcf507 (3 revisions) (flutter/flutter#117213)

* 23a2fa3 Reland "Adds API in semanticsconfiguration to decide how to merge chi… (flutter/flutter#116895)

* 9102f2f Revert "Inject current `FlutterView` into tree and make available via `View.of(context)` (#116924)" (flutter/flutter#117214)

* 3d0607b Defer `systemFontsDidChange` to the transientCallbacks phase (flutter/flutter#117123)

* ecf9b2d Update localization of shortcut labels in menus (flutter/flutter#116681)

* 0604a0e Add a recursive flag to the zip command - currently it is zipping nothing (flutter/flutter#117227)

* 98e9032 [web] Allow shift + left/right keyboard shortcuts to be handled by framework on web (flutter/flutter#117217)

* ebeb491 Use the name of errors, not the diagnostic messages. (flutter/flutter#117229)

* 93c581a Formatted and removed lints from devicelab README.md (flutter/flutter#117239)

* 5018a6c Roll Flutter Engine from 29196519c124 to d91e20879a67 (29 revisions) (flutter/flutter#117242)

* 36d536a Roll Flutter Engine from d91e20879a67 to 60cf34e2abf1 (4 revisions) (flutter/flutter#117246)

* c9dd458 42689eafb Sped up FlutterStandardCodec writing speed. (flutter/engine#38345) (flutter/flutter#117249)

* 0a2a1d9 d45d375ae [iOS, macOS] Migrate from assert to FML_DCHECK (flutter/engine#38368) (flutter/flutter#117256)

* bf5fdb9 Reland "Inject current FlutterView into tree and make available via `View.of(context)` (#116924)" (flutter/flutter#117244)

* 427b2fb 901b455d0 Roll Fuchsia Mac SDK from bn5VF1-xDf-wKjIw8... to qYE6uXjRtAxy7p5HB... (flutter/engine#38373) (flutter/flutter#117258)

* cee3e6c b10769998 Even though the file is pure C code, it's useful to use a C++ or Objective-C++ filename in order to use FML (assertions) in the implementation. (flutter/engine#38365) (flutter/flutter#117260)

* 7b850ef f74dd5331 Roll Fuchsia Linux SDK from H6B0UgW07fc1nBtnc... to PqyqxdbUFyd8xoYIP... (flutter/engine#38377) (flutter/flutter#117262)

* b20a9e0 imporve gesture recognizer semantics test cases (flutter/flutter#117257)

* a82c556 3626c487a Add a missing include to display_list_matrix_clip_tracker.h (flutter/engine#38371) (flutter/flutter#117269)

* 9daf2a6 Roll Flutter Engine from 3626c487a610 to 7e296985f426 (2 revisions) (flutter/flutter#117270)

* d0d13c5 51b84d69b Roll Fuchsia Mac SDK from qYE6uXjRtAxy7p5HB... to qk9nUlw83EeMMaWmE... (flutter/engine#38380) (flutter/flutter#117273)

* 725049f 794370b9c Roll Fuchsia Linux SDK from PqyqxdbUFyd8xoYIP... to bloqad357AGI6lnOb... (flutter/engine#38381) (flutter/flutter#117276)

* 49f3ca4 eeae936f9 Use canvaskit `toByteData` for unsupported videoFrame formats (flutter/engine#38361) (flutter/flutter#117279)

* c0dddac Fix is canvas kit bool (flutter/flutter#116944)

* d88d524 276327f7e Roll Fuchsia Mac SDK from qk9nUlw83EeMMaWmE... to DdU--deE0Xl4TQ2Bm... (flutter/engine#38383) (flutter/flutter#117286)

* b7d9be0 747a9d8c7 Roll Skia from 7b0a9d9a3008 to 0362c030efa7 (9 revisions) (flutter/engine#38385) (flutter/flutter#117289)

* 1233fc9 37387019b Roll Fuchsia Linux SDK from bloqad357AGI6lnOb... to mRBUNknZk43y-LHGS... (flutter/engine#38386) (flutter/flutter#117290)

* a3a0048 3c6cab032 Roll Fuchsia Mac SDK from DdU--deE0Xl4TQ2Bm... to NLb_T58g0l_X46JEN... (flutter/engine#38387) (flutter/flutter#117295)

* 420c6d6 Roll Flutter Engine from 3c6cab03274f to 58ab5277a7c4 (2 revisions) (flutter/flutter#117312)

* d238bed Roll Plugins from cbcf507 to 840a049 (8 revisions) (flutter/flutter#117314)

* 3eefb7a a9491515f Roll Skia from 0362c030efa7 to fc0ac31a46f8 (4 revisions) (flutter/engine#38399) (flutter/flutter#117317)

* 9f9010f [flutter_tools] Update DAP progress when waiting for Dart Debug extension connection (flutter/flutter#116892)

* 32da250 a12dadfda Roll Fuchsia Mac SDK from NLb_T58g0l_X46JEN... to NS4fVXM2KhKcZ1uyD... (flutter/engine#38400) (flutter/flutter#117319)

* cb988c7 Add `indicatorColor` & `indicatorShape` to `NavigationRail`, `NavigationDrawer` and move these properties from destination to `NavigationBar` (flutter/flutter#117049)

* 5fcb48d Fix `NavigationRail` highlight (flutter/flutter#117320)

* 70f391d 7bc519375 Roll Skia from fc0ac31a46f8 to 46af4ad25426 (1 revision) (flutter/engine#38403) (flutter/flutter#117322)

* 9f2c5d8 Support `flutter build web --wasm` (flutter/flutter#117075)

* 55584ad Roll Flutter Engine from 7bc519375b7b to 45713ea10510 (2 revisions) (flutter/flutter#117330)

* 4daff08 Roll Flutter Engine from 45713ea10510 to cba3a3990138 (5 revisions) (flutter/flutter#117336)

* 1adc275 Bump min SDK to 2.19.0-0 (flutter/flutter#117345)

* efadc34 Roll Flutter Engine from cba3a3990138 to 6de29d1cba70 (3 revisions) (flutter/flutter#117354)

* b30947b roll packages (flutter/flutter#117226)

* e625e5f 3330cce60 Roll Fuchsia Linux SDK from yGQvkNl85l1TSeuo9... to uKNwsaf92uZcX_QiY... (flutter/engine#38411) (flutter/flutter#117358)

* 50a23d9 339791f19 Roll Skia from 8876daf17554 to e8c3fa6d7d2f (3 revisions) (flutter/engine#38413) (flutter/flutter#117366)

* 7f7a877 Implemented Scrim Focus for BottomSheet (flutter/flutter#116743)

* 38e3930 Exposed tooltip longPress action when available (flutter/flutter#117338)

* 61fb6ea Manual roll Flutter Engine from 339791f190fa to 7ee3bf518036 (1 revision) #117367 (flutter/flutter#117372)

* c64dcbe Revert "Manual roll Flutter Engine from 339791f190fa to 7ee3bf518036 (1 revision) #117367 (#117372)" (flutter/flutter#117396)

* 8289ea6 Move a comment where it belongs (flutter/flutter#117385)

* fa3777b Enable `sized_box_shrink_expand` lint (flutter/flutter#117371)

* e0742eb [Android] Add spell check suggestions toolbar (flutter/flutter#114460)

* 0220afd enable use_enums (flutter/flutter#117376)

* d71fa88 Bump ossf/scorecard-action from 2.1.0 to 2.1.1 (flutter/flutter#117337)

* 4591f05 roll packages (flutter/flutter#117357)

* 46bb853 Revert "Revert "Manual roll Flutter Engine from 339791f190fa to 7ee3bf518036 (1 revision) #117367 (#117372)" (#117396)" (flutter/flutter#117402)

* 81bc54b Enable `use_colored_box` lint (flutter/flutter#117370)

* fdd2d7d Sync analysis_options.yaml & cleanups (flutter/flutter#117327)

* de35764 [Android] Bump template AGP and NDK versions (flutter/flutter#116536)

* b308555 Enable `dangling_library_doc_comments` and `library_annotations` lints (flutter/flutter#117365)

* b3c7fe3 enable test_ownership in presubmit (flutter/flutter#117414)

* 014b8f7 Roll Flutter Engine from 7ee3bf518036 to 75d75575d0ea (12 revisions) (flutter/flutter#117421)

* cd0f15a Add support for double tap and drag for text selection (flutter/flutter#109573)

* e8e26b6 c7eae2901 [Impeller] Remove depth/stencil attachments from imgui pipeline (flutter/engine#38427) (flutter/flutter#117425)

* a3e7fe3 de59f842a Roll Dart SDK from 35f6108ef685 to 1530a824fd5f (6 revisions) (flutter/engine#38431) (flutter/flutter#117429)

* 1699351 4724a91af Roll Skia from 09d796c0a728 to a60f3f6214d3 (5 revisions) (flutter/engine#38432) (flutter/flutter#117433)

* 9024c95 28f344ceb Roll Dart SDK from 1530a824fd5f to 8078926ca996 (1 revision) (flutter/engine#38434) (flutter/flutter#117435)

* cae7846 c9ee05b68 use min/max sandwich test on unit test bounds (flutter/engine#38435) (flutter/flutter#117442)

* 6819f72 Roll Flutter Engine from c9ee05b68e6e to 2404db80ae80 (3 revisions) (flutter/flutter#117443)

* f5c0716 4910ff889 Roll Fuchsia Mac SDK from nJJfWIwH5zElheIX8... to UsYNZnnfR_s0OGQoX... (flutter/engine#38444) (flutter/flutter#117454)

* a7a5d14 Roll Plugins from 840a049 to 54fc206 (6 revisions) (flutter/flutter#117456)

* 51a3e3a 1e695f453 Roll Dart SDK from 778a29535ab5 to 62ea309071c6 (1 revision) (flutter/engine#38445) (flutter/flutter#117459)

* d1244b7 da77d1a3a Roll Skia from 2e3ee507e838 to 7ad6f27aff57 (1 revision) (flutter/engine#38447) (flutter/flutter#117474)

* 400b05a Manual package roll (flutter/flutter#117439)

* 9a347fb Support safe area and scrolling in the NavigationDrawer (flutter/flutter#116995)

* 2a50236 Add native unit tests to iOS and macOS templates (flutter/flutter#117147)

* 1970bc9 cacheWidth cacheHeight support for canvaskit on web (flutter/flutter#117423)

* ff347bf Fix `InkRipple` doesn't respect `rectCallback` when rendering ink circle (flutter/flutter#117395)

* ddb7e43 Roll Flutter Engine from da77d1a3abb8 to 84ba80331ffe (2 revisions) (flutter/flutter#117489)

* 8ff1b6e Fix Scaffold bottomSheet null exceptions (flutter/flutter#117008)

* 2931e50 Handle the case of no selection rects (flutter/flutter#117419)

* 39fa011 Revert "Add support for double tap and drag for text selection (#109573)" (flutter/flutter#117497)

* b8b3567 Remove single-view assumption from widgets library (flutter/flutter#117480)

* ca7ca3b Roll Flutter Engine from 84ba80331ffe to a90c45db3f13 (2 revisions) (flutter/flutter#117499)

* 9fb1ae8 [iOS] Add task for spell check integration test (flutter/flutter#116222)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Null error on Scaffold's bottomSheet
3 participants