Fixes https://github.com/flutter/flutter/issues/147097. The expand/collapse icon should not be the disabled color when ExpansionPanel.canTapOnHeader is true because the ExpansionPanel is active, and we may want to keep the icon there as a visual indicator to the user that it is expandable/collapsable.
This was broken in https://github.com/flutter/flutter/pull/122452. The culprit is that `PipelineOwner.ensureSemantics` doesn't turn on semantics for the entire app, it pretends to only turn it on for the local `PipelineOwner`. Unfortunately, that local `PipelineOwner` is never informed that it should produce semantics when semantics are not turned on globally. So, `PipelineOwner.ensureSemantics` is essentially without effect if semantics are not already turned on globally.
I can't think of a use case where it would be useful to only turn on semantics for a particular pipeline owner and fixing `PipelineOwner.ensureSemantics` would get pretty messy with performance implications even if semantics are turned off. So, this PR deprecates that functionality and moves the `SemanticsDebugger` to the global semantics API.
Fixes https://github.com/flutter/flutter/issues/147665.
It has been observed that while in extended navigation rail, if longer labels are given the it is overflowing. Problem identified in "NavigationRail" widget only in case of extended version of it. This PR includes the fix for the same.
Fixes https://github.com/flutter/flutter/issues/110901.
*NO breaking changes.*
## Description
This PR fixes floating `SnackBar` positioning when the text direction is RTL and the theme uses Material 2.
In https://github.com/flutter/flutter/pull/140215, I fixed the `SnackBar` position for M3/RTL, but while doing so I broke the positioning for M2/RTL... Unfortunately, there was no existing test for this case.
The solution is to not rely on `TextDirection` to compute the `SnackBar` position: the `SnackBar` is centered in both cases so the text direction has no impact on its positioning (it had some impact in the `SnackBar` content, but this is managed correctly).
## Related Issue
Fixes https://github.com/flutter/flutter/issues/147838.
## Tests
Adds 1 test.
Also, use `getDryLayout` for the first pass of the `label` layout.
The computeDryBaseline stuff doesn't have a test because there're asserts making sure it returns the same result as `computeDistanceToActualBaseline`. I have tried adding `+1` to the return expression and `flutter test` fails.
Minor grammatical fixes to MultiSelectableSelectionContainerDelegate:
* Removed plural words describing a singular subject.
* Removed redundant language.
* Elaborated on the behavior of `ensureChildUpdated`.
No issue was filed this was a minor rewording.
## Description
With this PR, when `InputDecorator.floatingLabelBehavior` is set to `FloatingLabelBehavior.always` the label style is always set to `InputDecorator.floatingLabelStyle`, previously `InputDecorator.labelStyle` was used when the field was not focused or was empty.
## Related Issue
Fixes https://github.com/flutter/flutter/issues/147231
## Tests
Adds 1 test for this particular issue and several missing tests.
Reverts: flutter/flutter#146260
Initiated by: chingjun
Reason for reverting: Broke internal tests. See b/338308016
Original PR Author: LongCatIsLooong
Reviewed By: {goderbauer}
This change reverts the following previous change:
Currently on iOS `TextField` horizontal drag gestures will have precedence over parent horizontal drag gestures when competing with each other because the default `touchSlop` value used by `TextField` to calculate whether the threshold for a drag has been met is the same as the one used by parent horizontal drag gestures like `PageView`, and other `Scrollable`s. The default value is `18.0`, and because the `TextField` receives the `PointerEvent` first in this scenario, it always declares victory before any parent horizontal drag gestures has the chance to.
Native iOS behavior: The parent horizontal drag gestures will always win unless the drag originated on the cursor (collapsed selection), in that case the TextField cursor drag gestures will win.
This change:
* Introduces `BaseTapAndDragGestureRecognizer.eagerVictoryOnDrag` which can be used to configure the recognizer to declare victory immediately when it detects a drag, or when disabled it will wait until it is the last recognizer in the arena before declaring victory. The default behavior is that it declares victory immediately when the drag is detected.
* Eliminates the iOS cursor drag logic from `TextSelectionGestureDetector`, this logic is now delegated to the selection handle overlay which already had this logic in place.
* Enables iOS cursor to always beat other drag gestures by setting the touch slop lower.
* Disables `eagerVictoryOnDrag` for iOS to allow for parent drag gestures to win and match native behavior.
Fixes#124421, Fixes#130198, Fixes#142624, Fixes#142447, Fixes#127017
Reverts: flutter/flutter#145647
Initiated by: jmagman
Reason for reverting: Failing draggable_test in post-submit.
Original PR Author: timcreatedit
Reviewed By: {justinmc, goderbauer}
This change reverts the following previous change:
We changed the coordinates used to position the `Draggable` feedback by transforming them into the `Overlay`s coordinate space. This has no influence on any untransformed `Overlay`, most Flutter apps should be not affected.
This PR fixes the positioning of the feedback in transformed context (see #145639 for before video):
https://github.com/flutter/flutter/assets/42270125/df34e198-0667-453d-a27a-a79b2e2825a1
- fixes#145639
*Update `reorderable_list.dart` from `widgets` to use Dart 3 return switch statement syntax for consistency.*
This just a syntax change to match the rest of the functions in this file
This PR contributes to https://github.com/flutter/flutter/issues/130459
### Description
- Fixes name of the `examples/api/lib/widgets/shortcuts/single_activator.single_activator.0.dart`
- Adds tests for `examples/api/lib/widgets/shortcuts/single_activator.0.dart`
Reverts: flutter/flutter#147403
Initiated by: chingjun
Reason for reverting: Causing an internal test to fail, see b/338159496 for details
Original PR Author: ValentinVignal
Reviewed By: {polina-c}
This change reverts the following previous change:
Part of https://github.com/flutter/flutter/issues/141198
This PR contributes to https://github.com/flutter/flutter/issues/130459
### Description
- Adds `examples/api/lib/widgets/shortcuts/character_activator.0.dart` test
- Fixes the description of the `examples/api/lib/widgets/shortcuts/character_activator.0.dart` example