11355 Commits

Author SHA1 Message Date
Todd Volkert
cb9a3f698c
Add timeline events for post frame callbacks (#136435)
Before this change, long-running post-frame callbacks wouldn't show up in the timeline at all.  This adds a timeline event for post-frame callbacks, with a debug flag that will add timeline events for each individual callback.

#testexempt -- we have no way to test calls to the timeline.
2023-10-22 20:46:21 +00:00
LongCatIsLooong
5f477642c4
RenderEditable WidgetSpan intrinsics (#136979)
Update the `RenderEditable` implementation to match `RenderParagraph`. Fixes https://github.com/flutter/flutter/issues/136596
2023-10-20 21:32:19 +00:00
Kate Lovett
548843b9f9
Revert "[Velocity Tracker] Fix: Issue 97761: Flutter Scrolling does not match iOS; inadvertent scrolling when user lifts up finger" (#136905)
Reverts flutter/flutter#132291

We have found this introduced flakiness in many of our tests.

Fixes https://github.com/flutter/flutter/issues/135728
2023-10-19 22:10:14 +00:00
Qun Cheng
40776d01f1
Allow users to customize search algorithm in DropdownMenu (#136848)
Fixes #136735

This PR is to add a searchCallback to allow users to customize the search algorithm. This feature is used to fix b/305662376 which needs an exact match algorithm.
2023-10-19 18:32:50 +00:00
Kostia Sokolovskyi
9fa9fd365c
_DefaultTabControllerState should dispose all created TabContoller instances. (#136608) 2023-10-19 10:38:19 -07:00
Greg Spencer
0abb017cfd
Reland: "Add code for updating focusedChild when removing grandchildren from scope" (#136899) 2023-10-19 10:22:46 -07:00
auto-submit[bot]
c2bd2c1175
Reverts "Fixes ability to call nextFocus() on a node to focus its descendant" (#136894)
Reverts flutter/flutter#136773
Initiated by: itsjustkevin
This change reverts the following previous change:
Original Description:
fixes https://github.com/flutter/flutter/issues/134854
2023-10-19 14:38:26 +00:00
auto-submit[bot]
cbf50a953b
Reverts "Add code for updating focusedChild when removing grandchildren from scope" (#136862)
Reverts flutter/flutter#136771
Initiated by: gspencergoog
This change reverts the following previous change:
Original Description:
## Description

This adds code to make sure that grandchildren are removed from the `focusedChild` of a scope when the child is detached.

## Related Issues
 - Fixes https://github.com/flutter/flutter/issues/136758

## Tests
 - Added regression test.
2023-10-19 03:13:25 +00:00
Greg Spencer
2492242593
Add code for updating focusedChild when removing grandchildren from scope (#136771)
## Description

This adds code to make sure that grandchildren are removed from the `focusedChild` of a scope when the child is detached.

## Related Issues
 - Fixes https://github.com/flutter/flutter/issues/136758

## Tests
 - Added regression test.
2023-10-18 23:44:40 +00:00
Greg Spencer
13a0d475f5
Convert menus to use OverlayPortal (#130534)
## Description

This converts the `MenuAnchor` class to use `OverlayPortal` instead of directly using the overlay.

## Related Issues
 - Fixes https://github.com/flutter/flutter/issues/124830

## Tests
 - No tests yet (hence it is a draft)
2023-10-18 20:13:08 +00:00
chunhtai
24530b8021
Fixes ability to call nextFocus() on a node to focus its descendant (#136773)
fixes https://github.com/flutter/flutter/issues/134854
2023-10-18 19:00:53 +00:00
Taha Tesser
4f959b97a7
Fix Slider onChanged callback order & never calls onChangeStart on SliderInteraction.slideOnly allowed interaction (#136720)
fixes [Slider will call onChanged before onChangeStart when sliding.](https://github.com/flutter/flutter/issues/136707)

This fixes a regression from https://github.com/flutter/flutter/pull/121483

### Code sample

<details>
<summary>expand to view the code sample</summary> 

```dart
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

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

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Example(),
    );
  }
}

class Example extends StatefulWidget {
  const Example({super.key});

  @override
  State<Example> createState() => _ExampleState();
}

class _ExampleState extends State<Example> {
  double _sliderValue = 0.5;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Slider(
          // allowedInteraction: SliderInteraction.tapAndSlide,
          // allowedInteraction: SliderInteraction.tapOnly,
          // allowedInteraction: SliderInteraction.slideOnly
          // allowedInteraction: SliderInteraction.slideThumb,
          value: _sliderValue,
          onChangeStart: (newValue) {
            print("onChangeStart ......");
          },
          onChanged: (newValue) {
            print("onChanged ......");
            setState(() {
              _sliderValue = newValue;
            });
          },
          onChangeEnd: (newValue) {
            print("onChangeEnd ......");
          },
        ),
      ),
    );
  }
}
```

</details>
2023-10-18 16:25:47 +00:00
Arash
a9567313c1
[Feat] Stroke color for Slider value indicator (#135986)
Consider a scenario where the background color and indicator's background color are the same. 

Adding a stroke color to the value indicator would be a valuable for the following reasons:
- **Visual Clarity:** It would allow developers to make the value indicator stand out more against the background, making it easier for users to notice.
- **Customization:** It would provide more flexibility in customizing the appearance of the sliding widget, allowing developers to match the design requirements of their apps.
- **Accessibility:** Improved visual distinction can enhance the accessibility of the sliding widget for users with various needs.

*List which issues are fixed by this PR. You must list at least one issue.*

Fixes #135984
2023-10-18 16:03:08 +00:00
Aakash Pamnani
941897f60b
Fixed : Empty Rows shown at last page in Paginated data table (#132646)
Fixed empty rows at the last page in paginated data table

BEFORE:
![Before](https://github.com/flutter/flutter/assets/76067278/1f1e364c-df38-462f-b9fb-868554ce04a5)

AFTER:
![After](https://github.com/flutter/flutter/assets/76067278/80648a25-e9e6-4873-805f-b18c7c6a00af)

Issues resolves : #80421
2023-10-18 15:44:31 +00:00
Gildásio Filho
492b6f7ddf
Add findChildIndexCallback examples (#133469)
The documentation for using `findChildIndexCallback` recommends using `indexOf`, but that causes [this line](05259ca938/packages/flutter/lib/src/rendering/sliver_multi_box_adaptor.dart (L259)) to throw in debug mode, and when using `SliverList`, it breaks the render.

This PR changes the usage to check if the index is not negative before using it, and changes to return `null` instead if the child wasn't able to be found.

There's the related issue #107123, but this doesn't actually fix it.

-----

This PR has been updated to add the snippets that were used in the `findChildIndexCallback` comment as examples with proper tests, as well as updating the comment to reference the new examples.
2023-10-18 00:26:17 +00:00
Kate Lovett
0cc2eff204
Revert "[SingleChildScrollView] Correct the offset pixels if it is out of range during layout" (#136744) 2023-10-17 14:19:24 -05:00
Todd Volkert
4f6c2ccc84
Add docs to SchedulerBinding (#136433)
Add documentation that I went looking for and didn't find :-)
2023-10-17 01:52:15 +00:00
Dan Field
2df7244f74
Do not hold on to stale canvas reference in _RenderSegmentedButton (#136658)
Fixes https://github.com/flutter/flutter/issues/135747

Before this change, the render object was storing the `context.canvas` and using it after painting children. If those children were composited (e.g. because of an `Opacity` layer), the canvas it stored was disposed and not valid for use anymore.
2023-10-16 21:03:59 +00:00
Binni Goel
ce3e81d10c
Cupertino search field test leak tracking and Fix. RestorableTextEditingController not disposed. (#136615) 2023-10-16 10:29:05 -07:00
Taha Tesser
17c664fbbd
Fix NavigationRail's indicator inkwell doesn't support transparent color. (#136359)
fixes [NavigationRail can't have a transparent Hover color because there is always opacity set](https://github.com/flutter/flutter/issues/135866)

### Code sample

<details>
<summary>expand to view the code sample</summary> 

```dart
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.green).copyWith(
          primary: Colors.transparent,
        ),
      ),
      home: const Example(),
    );
  }
}

class Example extends StatefulWidget {
  const Example({Key? key}) : super(key: key);

  @override
  State<StatefulWidget> createState() => _ExampleState();
}

class _ExampleState extends State<Example> {
  int _selectedIndex = 0;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('NavigationRail Example'),
      ),
      body: Row(
        children: <Widget>[
          NavigationRail(
            selectedIndex: _selectedIndex,
            onDestinationSelected: (int index) {
              setState(() {
                _selectedIndex = index;
              });
            },
            labelType: NavigationRailLabelType.all,
            destinations: const <NavigationRailDestination>[
              NavigationRailDestination(
                icon: Icon(Icons.favorite_border),
                selectedIcon: Icon(Icons.favorite),
                label: Text('First'),
              ),
              NavigationRailDestination(
                icon: Icon(Icons.bookmark_border),
                selectedIcon: Icon(Icons.book),
                label: Text('Second'),
              ),
              NavigationRailDestination(
                icon: Icon(Icons.star_border),
                selectedIcon: Icon(Icons.star),
                label: Text('Third'),
              ),
            ],
          ),
          const VerticalDivider(thickness: 1, width: 1),
          Expanded(
            child: Center(
              child: Text('Selected Index: $_selectedIndex'),
            ),
          )
        ],
      ),
    );
  }
}
```

</details>
2023-10-16 08:48:13 +00:00
Binni Goel
77c19f50c1
Test cover cupertino for memory leaks and fix Opacity Layer not disposed. (#136576) 2023-10-15 12:26:52 -07:00
Kostia Sokolovskyi
2c3db435a8
_RouterState should dispose created _RestorableRouteInformation. (#136556)
### Description
- Fixes https://github.com/flutter/flutter/issues/134205.

### Tests
- Removes ignoring the `_RestorableRouteInformation` leak from `cupertino/app_test.dart`;
- Removes ignoring the `_RestorableRouteInformation` leak from `material/app_test.dart`;
- Removes ignoring the `_RestorableRouteInformation` leak from `widgets/app_test.dart`;
- Removes ignoring the `_RestorableRouteInformation` leak from `widgets/route_notification_messages_test.dart`;
- Removes ignoring the `_RestorableRouteInformation` leak from `widgets/router_restoration_test.dart`;
- Updates `widgets/router_test.dart` to use `testWidgetsWithLeakTracking`.
2023-10-14 02:58:17 +00:00
Daniel Chevalier
ac095ed393
Changes WidgetInspector to use valuenotifier instead of a force rebuild for (#131634)
![](https://media.giphy.com/media/qriH9W51oLsL6/giphy.gif)
Fixes https://github.com/flutter/devtools/issues/6014

Change the forceRebuild behaviour of the WidgetInspector to use
ValueListenableBuilders instead. This should help resolve heavy rebuilds
when the widgetInspectorOverride value changes.
2023-10-13 17:07:57 -04:00
Kostia Sokolovskyi
7d79472531
SearchAnchor should dispose created FocusNode and SearchController. (#136120) 2023-10-12 19:35:46 -07:00
Todd Volkert
bc688cf0df
Make constraints a covariant argument in RenderBox.computeDryLayout() (#136432)
Some render box subclasses have a specific layout contract that is tightly coupled with other render box subclasses (e.g. two private classes in a local project file). In these cases, it is also possible that they use a constraints object that is a subclass of `BoxConstraints`. To allow for this, this change makes the `constraints` argument to `RenderBox.computeDryLayout()` a covariant argument.

For completeness' sake, this updates the other render objects in the rendering package to also use the covariant keyword for this argument.
2023-10-13 01:10:29 +00:00
xubaolin
3f722c1442
[SingleChildScrollView] Correct the offset pixels if it is out of range during layout (#136239)
Fixes https://github.com/flutter/flutter/issues/105733
FIxes https://github.com/flutter/flutter/issues/135865

The above two issues will not occur on the `ListView` widget, so after analyzing their differences, it was found that the `SingleChildScrollView` pixels were not corrected according to the content dimensions during layout.

### ListView correct the pixels codes
5dfd78c2e3/packages/flutter/lib/src/rendering/viewport.dart (L1462-L1465)

We should correct the pixels to prevent the physics ballistic simulations.

This change makes them have the same behavior.
2023-10-12 21:25:09 +00:00
Greg Spencer
22b0a62a0c
Allow TapRegion to consume tap events (#136305)
## Description

In order for `MenuAnchor` menus to be able to not pass on the taps that close their menus, `TapRegion` needed a way to consume them.  This change adds a flag to the `TapRegion`, `consumeOutsideTap` that will consume taps that occur outside of the region if the flag is set (it is false by default). The same flag is added to `MenuAnchor` to allow selecting the behavior for menus.

`TapRegion` consumes the tap event by registering with the gesture arena and immediately resolving the tap as accepted if any regions in a group have `consumeOutsideTap` set to true.

This PR also deprecates `MenuAnchor.anchorTapClosesMenu`, since it is a much more limited version of the same feature that only applied to the anchor itself, and even then only applied to closing the menu, not passing along the tap.  The same functionality can now be implemented by handling a tap on the anchor widget and checking to see if the menu is open before closing it.

## Related Issues
 - https://github.com/flutter/flutter/issues/135327

## Tests
 - Added tests for `TapRegion` to make sure taps are consumed properly.
2023-10-12 21:04:41 +00:00
Michael Goderbauer
7ea5536f12
Fix doc TODO (#136485)
Underlying bug (https://github.com/dart-lang/dartdoc/issues/2276) has been fixed a while ago.
2023-10-12 20:52:51 +00:00
Taha Tesser
f65dd3bac0
Fix chip widgets don't the apply provided iconTheme (#135751)
fixes [`Chip.iconTheme` does not apply the icon theme](https://github.com/flutter/flutter/issues/111828)

### Description
- Fix chip widgets that don't utilize the provided `iconTheme`.
- Prevent `iconTheme` with just color from overriding the default icon size.
- Add some missing M3 tests for the chip and chip theme properties.

### Code sample

<details>
<summary>expand to view the code sample</summary> 

```dart
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: ThemeData(useMaterial3: true),
      home: const Example(),
    );
  }
}

class Example extends StatefulWidget {
  const Example({super.key});

  @override
  State<Example> createState() => _ExampleState();
}

class _ExampleState extends State<Example> {
  final bool _isEnable = true;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.spaceEvenly,
          children: <Widget>[
            RawChip(
              iconTheme: const IconThemeData(color: Colors.amber),
              avatar: const Icon(Icons.favorite_rounded),
              label: const Text('RawChip'),
              onPressed: () {},
              isEnabled: _isEnable,
            ),
            const Chip(
              iconTheme: IconThemeData(color: Colors.amber),
              avatar: Icon(Icons.favorite_rounded),
              label: Text('Chip'),
              // onDeleted: () {},
            ),
            FilterChip(
              iconTheme: const IconThemeData(color: Colors.amber),
              avatar: const Icon(Icons.favorite_rounded),
              label: const Text('FilterChip'),
              selected: false,
              onSelected: _isEnable ? (bool value) {} : null,
            ),
            InputChip(
              iconTheme: const IconThemeData(color: Colors.amber),
              avatar: const Icon(Icons.favorite_rounded),
              label: const Text('InputChip'),
              isEnabled: _isEnable,
              onPressed: () {},
            ),
            ActionChip(
              iconTheme: const IconThemeData(color: Colors.amber),
              avatar: const Icon(Icons.favorite_rounded),
              label: const Text('ActionChip'),
              onPressed: _isEnable ? () {} : null,
            ),
            ChoiceChip(
              iconTheme: const IconThemeData(color: Colors.amber),
              avatar: const Icon(Icons.favorite_rounded),
              label: const Text('ChoiceChip'),
              selected: false,
              onSelected: _isEnable ? (bool value) {} : null,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () {},
        child: const Icon(Icons.add),
      ),
    );
  }
}

```

</details>

### Before
![Screenshot 2023-09-29 at 16 59 39](https://github.com/flutter/flutter/assets/48603081/4bc32032-cff3-4237-812f-86f17ed95337)

### After

![Screenshot 2023-09-29 at 16 55 24](https://github.com/flutter/flutter/assets/48603081/05a1fc52-fb31-4790-a840-18f2e9718241)
2023-10-12 14:17:56 +00:00
Qun Cheng
6388e3d727
Floating SnackBar should always float above the bottom widgets (#136411)
Fixes #136162

This PR is to fix the floating `SnackBar` issue so that when the top of the bottom bar is higher than the top of the FAB, the snack bar will still float and not be clipped.

| Before fix | After fix |
|--------|--------|
| ![Screenshot 2023-10-11 at 1 54 30 PM](https://github.com/flutter/flutter/assets/36861262/dbe02312-1a80-4532-9bad-a8f162a6a942) | ![Screenshot 2023-10-11 at 1 54 52 PM](https://github.com/flutter/flutter/assets/36861262/68211de0-f04f-4b1a-b554-baf6a8e2f947)
 |
2023-10-12 01:17:07 +00:00
Bryan Olivares
d9c0d3ae51
SearchBar should listen to changes to the SearchController and update suggestions on change (#134337)
This PR is adding a listener to the `SearchController`, so that the `suggestionBuilder` can be updated when the `SearchController` changes. 

Another method we can possibly do is  have an update method on `SearchController`, so that the user can manually update the suggestions instead of us doing it automatically.

Fixes #132161
2023-10-12 00:55:38 +00:00
Kevin Moore
3e60999b11
Allow latest pkg:material_color_utilities (#132445)
* Allow latest pkg:material_color_utilities
* Bump other dependencies to their latest - including pkg:web
2023-10-11 23:57:16 +00:00
Kate Lovett
156e3487b0
Fix some deprecation details (#136385)
This fixes/notates a few deprecations from an audit for the next tech debt cycle.

- ThemeData errorColor and backgroundColor are notated as deprecated in multiple places, but one usage had a different version tag. Updated to match the rest.
- ThemeData.copyWith useMaterial3 was deprecated because it did not do what developers expected - it did not automatically reassign all of the color values and such. (confirmed with @HansMuller) I added a note so that when we later remove it we don't introduce a bug.
- the describeEnum deprecation was tagged wrong, it was a very long PR so by the time it merged the version it was finally tagged with was much later. (https://github.com/flutter/flutter/pull/125016)
2023-10-11 19:39:06 +00:00
Kenzie Davisson
a047358c5c
Add profilePlatformChannels service extension (#136051)
We will expose this from a button in DevTools.
https://github.com/flutter/devtools/issues/6166
2023-10-11 10:45:06 -07:00
Maximilian Fischer
6ff02dbc83
Include size factors when computing the intrinsic size of a RenderPositionedBox (#135823)
This PR includes the `widthFactor` and `heightFactor` when computing the intrinsic size of a `RenderPositionedBox`.

<details><summary>Code sample</summary>

Red should have a height of 100, blue one of 200.

```dart
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Intrinsic Bug',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: Scaffold(
        body: Row(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Expanded(
              child: IntrinsicHeight(
                child: Align(
                  heightFactor: 0.5,
                  child: Container(
                    height: 200,
                    color: Colors.red,
                  ),
                ),
              ),
            ),
            Expanded(
              child: Container(
                height: 200,
                color: Colors.blue,
              ),
            ),
          ],
        ),
      ),
    );
  }
}
```
</details>

Before:
![grafik](https://github.com/flutter/flutter/assets/45403027/447d8b9b-e7f3-482a-900d-53e436830321)
After:
![grafik](https://github.com/flutter/flutter/assets/45403027/6d1a104b-3327-47e2-8b36-798ed0136793)

Fix #135822
2023-10-11 17:39:56 +00:00
Kostia Sokolovskyi
cc41e25f21
_RenderSnapshotWidget should dispose created OffsetLayer. (#136267) 2023-10-11 08:45:39 -07:00
Taha Tesser
692d7ade9e
Fix FlexibleSpaceBar does compositing with near zero opacity. (#136255)
fixes [`flexible_space_bar.dart': Failed assertion: line 475 pos 12: 'needsCompositing': is not true.` is thrown when scrolling down in the list and then up](https://github.com/flutter/flutter/issues/135698)
2023-10-11 07:19:30 +00:00
Valentin Vignal
b989428fa2
Add SizeTransition.fixedCrossAxisSizeFactor (#134659)
Fixes https://github.com/flutter/flutter/issues/134654
2023-10-11 00:53:34 +00:00
Greg Spencer
7e1d366a4d
Add key event handlers that happen before or after the focus traversal (#136280)
## Description

This adds a mechanism for listening to key events before or after focus traversal occurs.

It adds four methods to the public `FocusManager` API:

- `addEarlyKeyEventHandler` - Adds a handler that can handle events before they are given to the focus tree for handling.
- `removeEarlyKeyEventHandler` - Removes an early event handler.
- `addLateKeyEventHandler` - Adds a handler that can handle events if they have not been handled by anything in the focus tree.
- `removeLateKeyEventHandler` - Removes a late event handler.

This allows an app to get notified for a key anywhere, and prevent the focus tree from seeing that event if it handles it.

For the menu system, this allows it to eat an escape key press and close all the open menus.

## Related Issues
 - https://github.com/flutter/flutter/issues/135334

## Tests
 - Added tests for new functionality.
2023-10-10 23:16:25 +00:00
Jonah Williams
a106b81cc5
[framework] restore old zoom page transition for benchmarking. (#133346)
In the past I switched the implementation of the zoom page transition because the performance of the old transition was terrible, but I'm hopeful that with Impeller we'll be able to identify and fix the issues that made it so slow. In order to evaluate this though, we need to be able to opt into the old transition for benchmarks on CI.

https://github.com/flutter/flutter/issues/129742
https://github.com/flutter/flutter/issues/121325
2023-10-10 22:27:07 +00:00
Kostia Sokolovskyi
0a6947049b
TimePickerDialog should dispose created ChangeNotifiers. (#136261) 2023-10-10 11:05:26 -07:00
Kostia Sokolovskyi
5d9983a125
RenderAnnotatedRegion should dispose created layers. (#136086) 2023-10-10 08:32:01 -07:00
Hassan
e127f7191b
[web] Fix page up page down home end shortcut behavior on web (#135454)
We delegate page up / page down actions to the browser. However, we don't let the browser scroll the underlying `<textarea>` - the framework handles scrolling, so page up/down don't end up doing anything. Since the framework handles scrolling for text inputs and textareas, we should let it also handle the actions for `page up`, `page down`, `home`, `end`, and their modifiers. 

fixes https://github.com/flutter/flutter/issues/121867
2023-10-09 17:50:54 +00:00
Greg Spencer
a5e3e78591
Update MediaQuery documentation to highlight asynchronous nature of size (#135719)
## Description

This updates the documentation for `MediaQuery` and `Overlay` to include the following:

- That `MediaQueryData.size` is set asynchronously, and doesn't necessarily reflect the size of the current frame.
- That the specific `MediaQuery.sizeOf` and related methods are preferred over the more generic `MediaQuery.of`.
- That the size of the `Overlay` isn't necessarily the size returned by `MediaQueryData.size`

As well as adding some symbol links, and fixing some error in documentation.

## Tests
 - Documentation only
2023-10-09 16:55:09 +00:00
chunhtai
ff73448f33
Reland "Adds a parent scope TraversalEdgeBehavior and fixes modal rou… (#134554)
…… (#134550)"

fixes https://github.com/flutter/flutter/issues/112567

This reverts commit 5900c4baa751aff8f05e820287a02b60cdd62dfa.

The internal test needs migration. cl/564746935

This is the same of original pr, no new change

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2023-10-09 09:10:23 -07:00
Bruno Leroux
a6d712497d
Update BottomSheet test for M3 + fix an issue in elevation resolution (#136071)
This PR updates unit tests from bottom sheet tests for M3 migration.

More info in https://github.com/flutter/flutter/issues/127064

It also contains in bottom_sheet.dart where a default value took precedence over a theme attribute.
2023-10-09 06:31:49 +00:00
Chris Bobbe
a88a2503ae
bottom_sheet: Clarify doc about behavior when useSafeArea is false (#134793)
As discussed at https://github.com/flutter/flutter/pull/122225#issuecomment-1690729628, this is a docs change meant to help people in the absence of a fix for #121752, which is being closed as WONTFIX.
2023-10-07 02:45:24 +00:00
Mateus Felipe C. C. Pinto
dcd24ef0fa
Simplify assertion in AsyncSnapshot (#135899)
Simplify assertion in `AsyncSnapshot`.

Fixes #135731.
2023-10-07 00:58:05 +00:00
LongCatIsLooong
ebe72d3f32
Call markNeedsPaint when adding overlayChild to Overlay (#135941)
Fixes https://github.com/flutter/flutter/issues/134656

`_skipMarkNeesLayout` was meant to only skip `markNeedsLayout` calls. Re-painting is still needed when a child gets added/removed from the `Overlay`.
2023-10-06 22:12:20 +00:00
Polina Cherkasova
f0970365ca
RenderEditable should dispose created layers. (#135942) 2023-10-06 12:30:20 -06:00