- 13 Mar, 2024 4 commits
-
-
Victoria Ashworth authored
When a Sliver with items is outside of the Viewport, but within the Viewport's `cacheExtent`, the framework should create SemanticNodes for the items even though they are out of view. However, for this to work, the Sliver's geometry must have a `cacheExtent` (how much space the sliver took up of the Viewport's `cacheExtent`) greater than 0, otherwise it is [excluded](https://github.com/flutter/flutter/blob/f01ce9f4cb41beff7b85122b5fcf1228bb655a87/packages/flutter/lib/src/rendering/viewport.dart#L311-L315). `SliverFillRemaining` widgets that fall outside the viewport did not have this set and therefore were being excluded when SemanticNodes were created, even if they were within the Viewport's `cacheExtent`. This PR sets the `cacheExtent` for `SliverFillRemaining` widgets. In addition, `RenderSliverFillRemainingWithScrollable` would get dropped from the semantic tree because it's child had a size of 0 when outside the remaining paint extent. To fix, we give the child a `maxExtent` of the sliver's `cacheExtent` if it's outside the remaining paint extent but within the viewport's cacheExtent. Fixes https://github.com/flutter/flutter/issues/142065. Definitions: * `RenderViewport.cacheExtent`: ```dart /// The viewport has an area before and after the visible area to cache items /// that are about to become visible when the user scrolls. /// /// Items that fall in this cache area are laid out even though they are not /// (yet) visible on screen. The [cacheExtent] describes how many pixels /// the cache area extends before the leading edge and after the trailing edge /// of the viewport. /// /// The total extent, which the viewport will try to cover with children, is /// [cacheExtent] before the leading edge + extent of the main axis + /// [cacheExtent] after the trailing edge. /// /// The cache area is also used to implement implicit accessibility scrolling /// on iOS: When the accessibility focus moves from an item in the visible /// viewport to an invisible item in the cache area, the framework will bring /// that item into view with an (implicit) scroll action. ``` * `SliverGeometry.cacheExtent`: ```dart /// How many pixels the sliver has consumed in the /// [SliverConstraints.remainingCacheExtent]. ``` * `SliverContraints.remainingCacheExtent`: ```dart /// Describes how much content the sliver should provide starting from the /// [cacheOrigin]. /// /// Not all content in the [remainingCacheExtent] will be visible as some /// of it might fall into the cache area of the viewport. /// /// Each sliver should start laying out content at the [cacheOrigin] and /// try to provide as much content as the [remainingCacheExtent] allows. ```
-
Qun Cheng authored
This PR is to remove deprecated `Scrollbar.showTrackOnHover` and `ScrollbarThemeData.showTrackOnHover`. These parameters are made obsolete in https://github.com/flutter/flutter/pull/111706. Part of https://github.com/flutter/flutter/issues/143956
-
Bruno Leroux authored
## Description This PR migrates `InputDecorator` helper/counter/error related tests to M3 and adds some missing tests. It is the fifth step for the M3 test migration for `InputDecorator`. Step 1: https://github.com/flutter/flutter/pull/142981 Step 2: https://github.com/flutter/flutter/pull/143369 Step 3: https://github.com/flutter/flutter/pull/143520 Step 4: https://github.com/flutter/flutter/pull/144169 ## Related Issue Related to https://github.com/flutter/flutter/issues/139076 fixes https://github.com/flutter/flutter/issues/138213
-
xubaolin authored
Fixes #38926 This patch implements the iOS behavior pointed out by @dkwingsmt at #38926 , which is also consistent with the performance of my settings application on the iPhone. ### iOS behavior (horizontal or vertical drag) ## Algorithm When dragging: delta(combined) = max(i of n that are positive) delta(i) - max(i of n that are negative) delta(i) It means that, if two fingers are moving +50 and +10 respectively, it will move +50; if they're moving at +50 and -10 respectively, it will move +40. ~~TODO~~ ~~Write some test cases~~
-
- 12 Mar, 2024 3 commits
-
-
Kate Lovett authored
There were some recent change in flutter/cocoon. Check that the bot warns and holds up the PR as expected.
-
Michael Goderbauer authored
This was uncovered as part of https://github.com/flutter/flutter/pull/144706.
-
Nate authored
This PR implements a temporary fix for the mobile device keyboard bug reported in [this comment](https://github.com/flutter/flutter/pull/142930#issuecomment-1981750069). CC @gspencergoog
-
- 11 Mar, 2024 2 commits
-
-
Nate authored
Based on issue #144903, this PR aims to bring the codebase more in line with the [Flutter repo style guide](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#avoid-using-if-chains-or--or--with-enum-values): > #### Avoid using `if` chains or `?:` or `==` with enum values <br> This change unfortunately increases the total line length, but it also improves readability.
-
victorgalo authored
The purpose of this PR is to temporarily skip one integration test that is blocking the changes indicated below: (This change adds a new property in Semantics widget that would take an integer corresponding to the heading levels defined by the ARIA heading role. This is necessary in order to get proper accessibility and usability in a website for users who rely on screen readers and other assistive technologies.) Issue fixed by this PR: https://github.com/flutter/flutter/issues/97894 Engine part: https://github.com/flutter/engine/pull/41435 Framework part: https://github.com/flutter/flutter/pull/125771
-
- 09 Mar, 2024 2 commits
- 08 Mar, 2024 1 commit
-
-
Mitchell Goodwin authored
Fixes #124850. Changes the fallback for the builder on Android. Before the error was from the platform being changed mid Cupertino transition to iOS. If a default builder wasn't set for iOS (which a developer developing only for Android might not), then it defaulted to the Zoom transition. Which changing the transition while on the fly caused issues.
-
- 07 Mar, 2024 3 commits
-
-
Faisal Ansari authored
Fixed -> DropdownMenu throws exception when it is in any scrollable list view and scrolls quickly #139871
-
Bruno Leroux authored
## Description This PRs changes the default value transit mode for key event simulation. The default transit mode for key event simulation is currently `KeyDataTransitMode.rawKeyData` while on the framework side `KeyDataTransitMode.keyDataThenRawKeyData` is the preferred transit mode. `KeyDataTransitMode.keyDataThenRawKeyData` is more accurate and can help detect issues. For instance the following test will fail with `KeyDataTransitMode.rawKeyData` because raw keyboard logic for modifier keys is less accurate: ```dart testWidgets('Press control left once', (WidgetTester tester) async { debugKeyEventSimulatorTransitModeOverride = KeyDataTransitMode.keyDataThenRawKeyData; final List<KeyEvent> events = <KeyEvent>[]; final FocusNode focusNode = FocusNode(); addTearDown(focusNode.dispose); await tester.pumpWidget( Focus( focusNode: focusNode, autofocus: true, onKeyEvent: (_, KeyEvent event) { events.add(event); return KeyEventResult.handled; }, child: Container(), ), ); await simulateKeyDownEvent(LogicalKeyboardKey.controlLeft); // This will fail when transit mode is KeyDataTransitMode.rawKeyData // because a down event for controlRight is synthesized. expect(events.length, 1); debugKeyEventSimulatorTransitModeOverride = null; }); ``` And the following this test is ok with `KeyDataTransitMode.rawKeyData` but rightly fails with `KeyDataTransitMode.keyDataThenRawKeyData`: ```dart testWidgets('Simulates consecutive key down events', (WidgetTester tester) async { debugKeyEventSimulatorTransitModeOverride = KeyDataTransitMode.rawKeyData; // Simulating several key down events without key up in between is tolerated // when transit mode is KeyDataTransitMode.rawKeyData, it will trigger an // assert on KeyDataTransitMode.keyDataThenRawKeyData. await simulateKeyDownEvent(LogicalKeyboardKey.arrowDown); await simulateKeyDownEvent(LogicalKeyboardKey.arrowDown); debugKeyEventSimulatorTransitModeOverride = null; }); ``` ## Related Issue Related to https://github.com/flutter/flutter/issues/143845 ## Tests Adds two tests.
-
Valentin Vignal authored
-
- 06 Mar, 2024 2 commits
-
-
Qun Cheng authored
This PR is to remove deprecated `ThemeData.errorColor`. These parameters are made obsolete in https://github.com/flutter/flutter/pull/110162. Part of https://github.com/flutter/flutter/issues/143956
-
Greg Price authored
I was doing some debugging on a RenderSliver subclass, and found that SliverConstraints.toString was missing the precedingScrollExtent field. Add that, and add both that field and userScrollDirection to the `==` and hashCode implementations, which had been skipping them, so that all three methods now handle all the class's fields.
-
- 05 Mar, 2024 4 commits
-
-
Tirth authored
Adds missing `style` to `PopupMenuButton`. Fixes: #114709
-
Michael Goderbauer authored
This is a regression test for https://github.com/flutter/flutter/issues/144087 and https://github.com/flutter/flutter/issues/138588. To be submitted after https://github.com/flutter/flutter/pull/144579.
-
Bruno Leroux authored
## Description This PR makes `CupertinoTextFormFieldRow` restorable. The implementation is based on https://github.com/flutter/flutter/pull/78835 which made `FormField` and `TextFormField` restorable. ## Related Issue Fixes https://github.com/flutter/flutter/issues/144504. ## Tests Adds 4 tests.
-
Jonah Williams authored
Until we figure out why this is unstable on Impeller swiftshader, disable it.
-
- 04 Mar, 2024 2 commits
-
-
Bruno Leroux authored
## Description This PR fix the text color for the default action in a CupertiniContextMenu. Previously the dynamic color was not resolved which leads to text being blacks when theme brightness was dark. | Before | After | |--------|--------| | ![Capture dâeÌcran 2024-03-04 aÌ 14 58 45](https://github.com/flutter/flutter/assets/840911/6a06715d-b2b8-49e1-b6de-37c03b96b627) | ![Capture dâeÌcran 2024-03-04 aÌ 15 00 27](https://github.com/flutter/flutter/assets/840911/ed7c71ec-96f2-46ca-a5f6-ba3890732e33) | ## Related Issue Fixes https://github.com/flutter/flutter/issues/144492. ## Tests Adds 1 test, updates 1.
-
Nate authored
Originally, my aim was just to refactor (as per usual), but while messing around with the `TableBorder.symmetric` constructor, I realized that `borderRadius` was missing! This pull request makes a few class constructors more efficient, and it fixes #144277 by adding the missing parameter. <br>
-
- 01 Mar, 2024 4 commits
-
-
Taha Tesser authored
fixes [`DatePickerDialog` date entry hover background and ink splash have different radius](https://github.com/flutter/flutter/issues/141350) fixes [Ability to customize DatePicker day selection background and overlay shape](https://github.com/flutter/flutter/issues/144220) ### 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( home: Scaffold( body: Center( child: Builder(builder: (context) { return FilledButton( onPressed: () { showDatePicker( context: context, initialDate: DateTime.now(), firstDate: DateTime.utc(2010), lastDate: DateTime.utc(2030), ); }, child: const Text('Show Date picker'), ); }), ), ), ); } } ``` </details> ### Material DatePicker states specs ![overlay_specs](https://github.com/flutter/flutter/assets/48603081/45ce16cf-7ee9-41e1-a4fa-327de07b78d1) ### Day selection overlay | Before | After | | --------------- | --------------- | | <img src="https://github.com/flutter/flutter/assets/48603081/b529d38d-0232-494b-8bf2-55d28420a245" /> | <img src="https://github.com/flutter/flutter/assets/48603081/c4799559-a7ef-45fd-aed9-aeb386370580" /> | ### Hover, pressed, highlight preview | Before | After | | --------------- | --------------- | | <video src="https://github.com/flutter/flutter/assets/48603081/8edde82a-7f39-4482-afab-183e1bce5991" /> | <video src="https://github.com/flutter/flutter/assets/48603081/04e1502e-67a4-4b33-973d-463067d70151" /> | ### Using `DatePickerThemeData.dayShape` to customize day selection background and overlay shape | Before | After | | --------------- | --------------- | | <img src="https://github.com/flutter/flutter/assets/48603081/a0c85f58-a69b-4e14-a45d-41e580ceedce" /> | <img src="https://github.com/flutter/flutter/assets/48603081/db67cee1-d28d-4168-98b8-fd7a9cb70cda" /> | ### Example preview ![Screenshot 2024-02-29 at 15 07 50](https://github.com/flutter/flutter/assets/48603081/3770ed5c-28bf-4d0a-9514-87e1cd2ce515)
-
Taha Tesser authored
fixes [Chips delete button hover style is square, not circular](https://github.com/flutter/flutter/issues/141335) ### Code sample <details> <summary>expand to view the code sample</summary> ```dart import 'package:flutter/material.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( body: Center( child: RawChip( label: const Text('Test'), onPressed: null, deleteIcon: const Icon(Icons.clear, size: 18), onDeleted: () {}, ), ), ), ); } } ``` </details> ### Preview | Before | After | | --------------- | --------------- | | <img src="https://github.com/flutter/flutter/assets/48603081/c5d62c57-97b3-4f94-b83d-df13559ee3a8" /> | <img src="https://github.com/flutter/flutter/assets/48603081/b76edaab-73e0-4aa9-8ca2-127eedd77814" /> |
-
Bruno Leroux authored
## Description This PR migrate hint related tests to M3 and adds some missing tests. It is the fourth step for the M3 test migration for `InputDecorator`. Step 1: https://github.com/flutter/flutter/pull/142981 Step 2: https://github.com/flutter/flutter/pull/143369 Step 3: https://github.com/flutter/flutter/pull/143520 ## Related Issue Related to https://github.com/flutter/flutter/issues/139076
-
Bruno Leroux authored
## Description This PR expands the items displayed in the overflow menu of a `TextSelectionToolbar` making buttons clickable in the blank area. | Before | After | |--------|--------| | Each item has its own width | All items expand horizontally | | ![Capture dâeÌcran 2024-02-29 aÌ 14 43 57](https://github.com/flutter/flutter/assets/840911/f7379eef-9185-4cc4-bf14-e4c916c432b1) | ![Capture dâeÌcran 2024-02-29 aÌ 14 40 47](https://github.com/flutter/flutter/assets/840911/bff272cd-9fe2-4f07-adaf-61edef03d26e) | ## Related Issue Fixes https://github.com/flutter/flutter/issues/144089. ## Tests Adds 1 tests.
-
- 29 Feb, 2024 7 commits
-
-
hangyu authored
reland https://github.com/flutter/flutter/pull/143117 fixes: https://github.com/flutter/flutter/issues/143116 fixes: https://github.com/flutter/flutter/issues/141992 ## 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]. - [ ] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [ ] 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 [Data Driven Fixes]: https://github.com/flutter/flutter/wiki/Data-driven-Fixes
-
Qun Cheng authored
This PR is to remove deprecated ThemeData.backgroundColor. These parameters are made obsolete in https://github.com/flutter/flutter/pull/110162. Part of https://github.com/flutter/flutter/issues/143956
-
Amir Panahandeh authored
Adds a test to validate state is preserved after reordering in `TwoDimensionalViewport` (reference: https://github.com/flutter/flutter/pull/141504#pullrequestreview-1837501775). - Fixes #130754
-
Qun Cheng authored
This PR is to remove deprecated ThemeData.toggleableActiveColor. These parameters are made obsolete in https://github.com/flutter/flutter/pull/97972. Part of https://github.com/flutter/flutter/pull/111080
-
LongCatIsLooong authored
This is for https://github.com/flutter/flutter/issues/127803: a text field should unregister from the scribble scope, when it becomes unfocusable. When a `FocusNode` has listeners and its `_canRequestFocus` flag is set to true, it adds `+1` to `_focusabilityListeningDescendantCount` of all ancestors until it reaches the first ancestor with `descendantsAreFocusable = false`. When the a `FocusNode`'s `descendantsAreFocusable` changes, all listeners that contributed to its `_focusabilityListeningDescendantCount` will be notified.
-
LongCatIsLooong authored
The [internal test failure](https://github.com/flutter/flutter/pull/144207#issuecomment-1968236339) was caused by `Focus.withExternalFocusNode` modifying the external node's attributes. The extra changes are in this commit: https://github.com/flutter/flutter/commit/e53d98b06c6e2ae65271681c4b40b28b2d02ad04 CL with (almost) passing TGP: cl/611157582
-
Tong Mu authored
Fixes https://github.com/flutter/flutter/issues/144261
-
- 28 Feb, 2024 5 commits
-
-
Qun Cheng authored
-
auto-submit[bot] authored
Reverts flutter/flutter#144207 Initiated by: CaseyHillers Reason for reverting: b/327301206 - Breaking a customer test Original PR Author: LongCatIsLooong Reviewed By: {gspencergoog} This change reverts the following previous change: Original Description: `FocusNode.canRequestFocus` was doing a double traversal if no ancestor disallows focus. The last for loop only has to reach as far as the enclosing scope. Also this caches the `FocusNode.enclosingScope` since the getter access happens much more frequently than node reparenting.
-
Polina Cherkasova authored
-
Taha Tesser authored
This a test utility class for `tabs_test.dart` to prepare the class for Material 3 tests updates. More info in https://github.com/flutter/flutter/issues/139076
-
Qun Cheng authored
This PR is to remove deprecated ThemeData.bottomAppBarColor. These parameters are made obsolete in https://github.com/flutter/flutter/pull/110162. Part of https://github.com/flutter/flutter/pull/111080
-
- 27 Feb, 2024 1 commit
-
-
hangyu authored
Reland #143334
-