- 19 Mar, 2024 3 commits
-
-
Mitchell Goodwin authored
Fixes #138270. Moves the majority of the logic of MaterialStateProperties down to the widgets layer, then has the existing Material classes pull from the widgets versions.
-
goodmost authored
fix some comments
-
Bruno Leroux authored
## Description The PR updates `SingleActivator` in order to add a parameter for specifying that a shortcut depends on <kbd>NumLock</kbd> key state. Somewhat similarly to what is possible with common modifiers expect that a boolean is not enough in this case because: by default, a shortcut should ignore the <kbd>NumLock</kbd> state and it should be possible to define shortcuts that require <kbd>NumLock</kbd> to be locked and other that require it to be unlocked. @gspencergoog I considered defining a new `ShortcutActivator` implementation for this, but I thinks that adding the feature directly to `SingleActivator` results in a cleaner API. ## Related Issue Fixes https://github.com/flutter/flutter/issues/145144 Preparation for https://github.com/flutter/flutter/issues/144936 ## Tests Adds 3 tests.
-
- 18 Mar, 2024 2 commits
-
-
LongCatIsLooong authored
Introduce methods for computing the baseline location of a RenderBox without affecting the current layout (#144655) Extracted from https://github.com/flutter/flutter/pull/138369 Introduces `RenderBox.{compute,get}DryBaseline` for computing the baseline location in `RenderBox.computeDryLayout`.
-
Taha Tesser authored
Update `inherited_theme_test.dart`, `ink_paint_test.dart`, `ink_splash_test.dart`, `opacity_test.dart` for Material 3 (#144013) Updated unit tests for `Tooltip` to have M2 and M3 versions. More info in #139076
-
- 15 Mar, 2024 1 commit
-
-
hangyu authored
1. Set cacheExtent for sliverAppBar so it's not dropped from the semantics tree. 2. Update its toolbarOpacity in a11y mode to 1.0. When scrolling in a11y mode and the focus is back to the sliverAppBar, the content should be visible. fixes: https://github.com/flutter/flutter/issues/143437 ## 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
-
- 14 Mar, 2024 1 commit
-
-
Nate authored
Migrates test code to new `switch` syntax.
-
- 13 Mar, 2024 4 commits
-
-
LongCatIsLooong authored
Revert "Add `FocusNode.focusabilityListenable` (#144280)" since the feature is no longer needed (#145102) This reverts commit 726e5d28. *Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.* *List which issues are fixed by this PR. You must list at least one issue. An issue is not required if the PR fixes something trivial like a typo.* *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
-
Nate authored
This pull request is part of the effort to solve issue #144903. In the past, my efforts to reduce line length involved refactoring away from switch statements, but unlike [yesterday's PR](https://github.com/flutter/flutter/pull/144905), this one is full of switch statements that make things more concise!
-
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. ```
-
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 2 commits
-
-
Kate Lovett authored
There were some recent change in flutter/cocoon. Check that the bot warns and holds up the PR as expected.
-
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
-
- 06 Mar, 2024 1 commit
-
-
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 1 commit
-
-
Jonah Williams authored
Until we figure out why this is unstable on Impeller swiftshader, disable it.
-
- 29 Feb, 2024 4 commits
-
-
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
-
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 1 commit
-
-
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.
-
- 27 Feb, 2024 1 commit
-
-
LongCatIsLooong authored
`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.
-
- 26 Feb, 2024 1 commit
-
-
Polina Cherkasova authored
Contributes to https://github.com/dart-lang/leak_tracker/issues/218
-
- 23 Feb, 2024 3 commits
-
-
Jonah Williams authored
This one flakes but rarely. Part of https://github.com/flutter/flutter/issues/143616
-
LongCatIsLooong authored
Relands "Changing `TextPainter.getOffsetForCaret` implementation to remove the logarithmic search (#143281)" (reverted in #143801) (#143954) The original PR was reverted because the new caret positioning callpath triggered a skparagraph assert. The assert has been removed. Relanding the PR with no changes applied.
-
Nate authored
This pull request fixes #143803 by taking advantage of Dart's null-aware operators. And unlike `switch` expressions ([9 PRs](https://github.com/flutter/flutter/pull/143634) and counting), the Flutter codebase is already fantastic when it comes to null-aware coding. After refactoring the entire repo, all the changes involving `?.` and `??` can fit into a single pull request.
-
- 22 Feb, 2024 1 commit
-
-
Kostia Sokolovskyi authored
Contributes to https://github.com/flutter/flutter/issues/141198 ### Description - Adds `CurvedAnimation` disposals to `material/chip.dart`, `material/input_decorator.dart`, `material/toggleable.dart`, `widgets/animated_switcher.dart`, `widgets/overscroll_indicator.dart`.
-
- 21 Feb, 2024 4 commits
-
-
Jonah Williams authored
This test is still unstable with the debug banner disabled. the Icon in the FAB appears to be shifting.
-
Jonah Williams authored
Part of https://github.com/flutter/flutter/issues/143616
-
Jonah Williams authored
Fixes some of https://github.com/flutter/flutter/issues/143616 by disabling the debug banner, which does not appear to be a critical part of the golden.
-
auto-submit[bot] authored
Reverts "Changing `TextPainter.getOffsetForCaret` implementation to remove the logarithmic search (#143281)" (#143801) Reverts flutter/flutter#143281 Initiated by: LongCatIsLooong Reason for reverting: https://github.com/flutter/flutter/issues/143797 Original PR Author: LongCatIsLooong Reviewed By: {justinmc, jason-simmons} This change reverts the following previous change: Original Description: The behavior largely remains the same, except: 1. The EOT cursor `(textLength, downstream)` for text ending in the opposite writing direction as the paragraph is now placed at the visual end of the last line. For example, in a LTR paragraph, the EOT cursor for `aA` (lowercase for LTR and uppercase for RTL) is placed to the right of the line: `aA|` (it was `a|A` before). This matches the behavior of most applications that do logical order arrow key navigation instead of visual order navigation. And it makes the navigation order consistent for `aA\naA`: ``` |aA => aA| => aA| => aA => aA => aA aA aA aA |aA aA| aA| (1) (2) (3) (4) (5) (6) ``` This is indeed still pretty confusing as (2) and (3), as well as (5) and (6) are hard to distinguish (when the I beam has a large width they are actually visually distinguishable -- they use the same anchor but one gets painted to the left and the other to the right. I noticed that emacs does the same). But logical order navigation will always be confusing in bidi text, in one way or another. Interestingly there are 3 different behaviors I've observed in chrome: - the chrome download dialog (which I think uses GTK text widgets but not sure which version) gives me 2 cursors when navigating bidi text, and - its HTML fields only show one, and presumably they place the I beam at the **trailing edge** of the character (which makes more sense for backspacing I guess). - On the other hand, its (new) omnibar seems to use visual order arrow navigation Side note: we may need to update the "tap to place the caret here" logic to handle the case where the tap lands outside of the text and the text ends in the opposite writing direction. 2. Removed the logarithmic search. The same could be done using the characters package but when glyphInfo tells you about the baseline location in the future we probably don't need the `getBoxesForRange` call. This should fix https://github.com/flutter/flutter/issues/123424. ## Internal Tests This is going to change the image output of some internal golden tests. I'm planning to merge https://github.com/flutter/flutter/pull/143281 before this to avoid updating the same golden files twice for invalid selections.
-
- 20 Feb, 2024 3 commits
-
-
xubaolin authored
Fixes https://github.com/flutter/flutter/issues/138912 Change `ItemExtentBuilder`'s return value nullable, it should return null if asked to build an item extent with a greater index than exists.
-
LongCatIsLooong authored
The behavior largely remains the same, except: 1. The EOT cursor `(textLength, downstream)` for text ending in the opposite writing direction as the paragraph is now placed at the visual end of the last line. For example, in a LTR paragraph, the EOT cursor for `aA` (lowercase for LTR and uppercase for RTL) is placed to the right of the line: `aA|` (it was `a|A` before). This matches the behavior of most applications that do logical order arrow key navigation instead of visual order navigation. And it makes the navigation order consistent for `aA\naA`: ``` |aA => aA| => aA| => aA => aA => aA aA aA aA |aA aA| aA| (1) (2) (3) (4) (5) (6) ``` This is indeed still pretty confusing as (2) and (3), as well as (5) and (6) are hard to distinguish (when the I beam has a large width they are actually visually distinguishable -- they use the same anchor but one gets painted to the left and the other to the right. I noticed that emacs does the same). But logical order navigation will always be confusing in bidi text, in one way or another. Interestingly there are 3 different behaviors I've observed in chrome: - the chrome download dialog (which I think uses GTK text widgets but not sure which version) gives me 2 cursors when navigating bidi text, and - its HTML fields only show one, and presumably they place the I beam at the **trailing edge** of the character (which makes more sense for backspacing I guess). - On the other hand, its (new) omnibar seems to use visual order arrow navigation Side note: we may need to update the "tap to place the caret here" logic to handle the case where the tap lands outside of the text and the text ends in the opposite writing direction. 2. Removed the logarithmic search. The same could be done using the characters package but when glyphInfo tells you about the baseline location in the future we probably don't need the `getBoxesForRange` call. This should fix https://github.com/flutter/flutter/issues/123424. ## Internal Tests This is going to change the image output of some internal golden tests. I'm planning to merge https://github.com/flutter/flutter/pull/143281 before this to avoid updating the same golden files twice for invalid selections.
-
Polina Cherkasova authored
-
- 18 Feb, 2024 2 commits
- 17 Feb, 2024 2 commits
-
-
Jonah Williams authored
Similar to other issues, appears that text goldens are really unstable with Impeller. Part of https://github.com/flutter/flutter/issues/143616
-
Jonah Williams authored
Part of https://github.com/flutter/flutter/issues/143616
-
- 14 Feb, 2024 1 commit
-
-
Michael Goderbauer authored
Follow-up to https://github.com/flutter/flutter/pull/143347.
-
- 13 Feb, 2024 2 commits
-
-
Nate authored
fixes #87061 It doesn't matter whether I'm using Google Chrome, VS Code, Discord, or a Terminal window: any time a text cursor is blinking, it means that the characters I type will show up there. And this isn't limited to text fields: if I repeatedly press `Tab` to navigate through a website, there's a visual indicator that goes away if I click away from the window, and it comes back if I click or `Alt+Tab` back into it. <details open> <summary>Example (Chrome):</summary>  </details> <details open> <summary>This PR adds the same functionality to Flutter apps:</summary>  </details>
-
Loïc Sharma authored
Adds some missing spaces, rewords some errors, and splits some errors into more lines.
-