mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
12978 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
3ee7f14390
|
[web] Fix unresponsive input above SelectionArea in Safari and Firefox. (#167275)
Fixes https://github.com/flutter/flutter/issues/157579
### Description
When the `TextField` is placed above the `HtmlElementView`, it becomes
unresponsive on Safari and Firefox. After the investigation, I found
that this happens because the underlying `input`/`textarea` loses focus,
leading to not listening to the keyboard input.
After some investigation, I found out that calling `preventDefault` on
`mousedown` events on SelectionArea's `div` element prevents the
`input/textarea` from losing focus.
This PR focuses on `SelectionArea`, but there is the same issue
happening in the `pointer_interceptor ` package
https://github.com/flutter/flutter/issues/157920. If this solution is
accepted, then I could file a separate PR for `pointer_interceptor`
package with the same fix.
| Before | After |
| :---: | :---: |
| https://input-above-selection-area-bug.web.app |
https://input-above-selection-area-fix.web.app |
| <video
src="https://github.com/user-attachments/assets/be73a5e9-84e4-44f9-96b3-f8d24f44e0b8"
/> | <video
src="https://github.com/user-attachments/assets/87746058-df6e-4caf-8f85-c240de32c630"
/> |
<details>
<summary>Old description</summary>
The fix I am proposing is to delay the `moveFocusToActiveDomElement` by
using `Timer`. I am not sure whether this is a proper fix, as it looks
like the issues may be in the way pointer events are handled. I tried
adding `event.preventDefault()` after `_callback(event, pointerData)` in
`pointer_binding.dart` and the issue was fixed, but then text selection
in `SelectionRegion` became broken.
|
||
|
|
df5f865a6b
|
[Cupertino] Apply RSuperellipse to most Cupertino widgets (#167784)
This PR applies RSuperellipse to most Cupertino widgets. I got the list by searching for `ClipRRect`, `drawRRect`, and `BoxDecoration` (with `borderRadius`) through the package. They're replaced by `ClipRSuperellipse`, `drawRSuperellipse`, and `ShapeDecoration` respectively. There are a few widgets that I didn't apply: * `CupertinoTextField` as well as its related widget `CupertinoSearchTextField`, because `CupertinoTextField` expects a `BoxDecoration` argument. Migrating it is nontrivial and will take place in a separate PR. * `CupertinoTextSelectionToolbar`, because it seems complicated (containing a lot of paths). I wonder if it's possible to replace the clipPath with clipRRect/clipRSe for better performance. * `CupertinoSwitch`. I suspect it's not an squircle since it tightly contains a full circle. Fixes https://github.com/flutter/flutter/issues/13914. ## 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/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md |
||
|
|
16e5318e26
|
Correct calculation for CupertinoTextSelectionToolbar vertical position (#169308)
[Size CupertinoTextSelectionToolbar to children](https://github.com/flutter/flutter/pull/133386) made a slight mistake when calculating if the toolbar should be above or below the text field. Doubling the toolbar arrow height in the `_isAbove `calculation added a buffer of its height (7.0) within which the toolbar would be positioned below the text but have its arrow still pointing downwards. This is why [I was only able to reproduce the bug within a 7.0 height range](https://github.com/flutter/flutter/issues/154812#issuecomment-2774094819). | Before | After | | --- | --- | | <img width="377" alt="toolbar pos before" src="https://github.com/user-attachments/assets/11f63cf3-f352-4232-8230-f04da89b0b4c" /> | <img width="377" alt="toolbar pos after" src="https://github.com/user-attachments/assets/4a48c3bd-158e-468e-9c67-af125c7856a7" /> | <details> <summary>Sample code</summary> ```dart import 'package:flutter/cupertino.dart'; void main() => runApp(const TextSelectionToolbarApp()); class TextSelectionToolbarApp extends StatelessWidget { const TextSelectionToolbarApp({super.key}); @override Widget build(BuildContext context) { return CupertinoApp( home: const CupertinoPageScaffold( child: SafeArea( child: ColoredBox( color: Color(0x11ff0000), child: Padding( padding: EdgeInsets.symmetric(vertical: 56.0, horizontal: 8.0), child: Column( children: [ CupertinoTextField(), ], ), ), ), ), ), ); } } ``` </details> Fixes [Cupertino Text Selection Toolbar has wrong position](https://github.com/flutter/flutter/issues/154812) |
||
|
|
3df4a3c6a5
|
Baseline-align CupertinoTextField placeholder (#166952)
| Before | After | | --- | --- | | <img width="348" alt="non baseline aligned placeholder" src="https://github.com/user-attachments/assets/62f779cc-1d16-41f3-92f8-a2de16a04895" /> | <img width="348" alt="baseline aligned placeholder" src="https://github.com/user-attachments/assets/e43d200f-ef47-4d10-a74a-a2c6998b44f5" /> | Fixes [Can't align placeholder of CupertinoTextField with min lines to top](https://github.com/flutter/flutter/issues/138794) |
||
|
|
b2b4fb5cbf
|
Start removing Observatory support and references (#169216)
This change removes references to Observatory, including: - Deprecated flags - Deprecated embedder APIs - Outdated documentation - Documentation instances where "VM service" should have been used - Incorrectly named tests / directories As a part of this change, `--serve-observatory` is no longer a valid flag. Observatory is still available for now via the `_serveObservatory` RPC, but will be removed in a follow up PR once we've prepared for breakages in G3. Work towards https://github.com/dart-lang/sdk/issues/50233 FYI @a-siva |
||
|
|
a44675cb39
|
Add flag to exclude focus for hidden children in Visibility, maintainFocusability. Set maintainFocusability to false in IndexedStack (#159133)
Fixes: https://github.com/flutter/flutter/issues/114213 and is a prerequisite for fixing: https://github.com/flutter/flutter/issues/148405 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] 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/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md |
||
|
|
c15a2c6c47
|
Removes unnecessary parentheses (#169015)
This is solely a change to allow the CL for https://github.com/dart-lang/sdk/issues/59069 to land. ## Pre-launch Checklist - [x] 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. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] 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. - [x] All existing and new tests are passing. |
||
|
|
c31247a7b3
|
Fix crash on two finger selection gesture (#168598)
This change blocks two selection handles from being able to be dragged simultaneously on iOS and the web, this matches the native behavior. On native Android both handles can still be dragged simultaneously this is the behavior observed on Google Keep/ Google Messages and Android's EditText. Also fixes an issue on iOS where the magnifier would not return after hiding when double tapping and dragging to select and then dragging outside the TextField area. The cause of this issue was because editableText.showMagnifier decides whether to update the magnifier position or show a new one based on whether it was visible, so when it was hidden and we attempt to update it's position, it would try to show a new magnifier which left the magnifier in a broken state. This change makes editableText.showMagnifier depend on whether a magnifier exists instead of just checking it's visibility. Similarly editableText.hideMagnifier now does not depend on the magnifier visibility, instead it internally (selectionOverlay.hideMagnifier) checks if the magnifier exists. Fixes #168578 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Renzo Olivares <roliv@google.com> |
||
|
|
8d2c9782e3
|
Fixes tab semantics gets dropped if the child produce a semantics node (#169233)
<!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> fixes https://github.com/flutter/flutter/issues/169175 the bug is due to the image widget will create it own semanitc node and force the semantics widget in the stack to form its own node instead of merge up. Modify the code so that it works correctly. ## 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/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md |
||
|
|
e78b434e8f
|
Update ButtonStyle documentation (#168062)
## Description This PR updates `ButtonStyle.minimumSize` and `ButtonStyle.fixedSize` documentation. It updates the documentation in order to describe the current behavior as it might be surprising. I have considered changing the behavior related to `ButtonStyle.minimumSize` but while experimenting I noticed that several widgets in the framework (and several tests) use `ButtonStyle.minimumSize` with the expectation that the given size is adjusted based on the ambient visual density (and there are probably several similar usages outside of the framework in Google and non-Google apps). ## Related Issue ButtonStyle.minimumSize : Fixes [minimumSize not respected properly when visual density is not standard](https://github.com/flutter/flutter/issues/123528) ButtonStyle.fixedSize : Fixes [Button behaves differently in Web/Desktop and Mobile](https://github.com/flutter/flutter/issues/85729) ## Tests Documentation only --------- Co-authored-by: Kate Lovett <katelovett@google.com> |
||
|
|
e1499da258
|
Fix the issue where DropdownMenu disposes of the controller. (#168541)
`DropdownMenu` should not dispose of an explicitly provided controller.
Its behavior should be similar to `TextField`.
|
||
|
|
fa24a71113
|
Add bottomSheetScrimBuilder to Scaffold (#167335)
<!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> Adds a new Scaffold param `bottomSheetScrimBuilder` that allows to define a custom scrim instead of the default ModalBarrier. Fixes https://github.com/flutter/flutter/issues/109037 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] 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/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md |
||
|
|
b8157ceb60
|
Use gestureSettings.touchSlop in PrimaryPointerGestureRecognizer (#161549)
<!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> Use `gestureSettings.touchSlop` in `PrimaryPointerGestureRecognizer.handleEvent()` unless a non-default value (including `null`) is specified. This behavior will be reflected in subclasses (`TapGestureRecognizer` and `LongPressGestureRecognizer`) and enable `GestureDetector` tap and long-press touch slop to be configured out of the box with `MediaQuery` instead of providing custom gesture recognizers: ```dart // After this PR you can do this: child: MediaQuery( data: MediaQuery.of(context).copyWith( gestureSettings: const DeviceGestureSettings(touchSlop: 64), ), child: GestureDetector( onTap: widget.onTap, child: Container(), ), // instead of this: child: RawGestureDetector( gestures: <Type, GestureRecognizerFactory>{ TapGestureRecognizer: GestureRecognizerFactoryWithHandlers<TapGestureRecognizer>( // Without https://github.com/flutter/flutter/pull/161541, we'll actually need to make // our own custom TapGestureRecognizer class to expose slop parameters too. () => TapGestureRecognizer(preAcceptSlopTolerance: 64, postAcceptSlopTolerance: 64, onTap: onTap), (TapGestureRecognizer instance) {}, ), }, child: Container(), ), ``` *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.* https://github.com/flutter/flutter/issues/154215 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* ## 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/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md |
||
|
|
7bfcb2f66f
|
Normalize BottomAppBarTheme (continue) (#168966)
This is following https://github.com/flutter/flutter/pull/168586: See https://github.com/flutter/flutter/pull/168586#discussion_r2082606584 for the context of this. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] 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/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md Signed-off-by: huycozy <huy@nevercode.io> |
||
|
|
b7e0dd6ff8
|
Respect calendarDelegate in showDateRangePicker (#168290)
This PR fixes an issue where the `calendarDelegate` parameter was not respected by `showDateRangePicker`. Although support for`calendarDelegate` was added in [PR #161874](https://github.com/flutter/flutter/pull/161874), it was inadvertently omitted from `showDateRangePicker`, causing inconsistencies in behavior compared to `showDatePicker`. ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. |
||
|
|
78df5036d0
|
Feat: Add full screen dialog support for dialog routes (#167794)
Feat: Add full screen dialog support for dialog routes fixes: #165478 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com> |
||
|
|
33cdd8ef31
|
Feat: Add persistentFooterDecoration for scaffold (#167524)
Feat: Add persistentFooterDecoration for scaffold fixes: #166478 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com> |
||
|
|
dd671fae53
|
fix(widget_inspector): add null check for flex factor property to prevent exception (#167890)
Null check exception appears while opening Widget Inspector as the attached screenshots and video.  https://github.com/user-attachments/assets/a250765a-0bb4-4b45-9451-db4b51347ca2 ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [X] I signed the [CLA]. - [X] I listed at least one issue that this PR fixes in the description above. - [X] I updated/added relevant documentation (doc comments with `///`). - [X] I added new tests to check the change I am making, or this PR is [test-exempt]. - [X] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [X] 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/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md --------- Co-authored-by: Ben Konyi <bkonyi@google.com> |
||
|
|
86f6c72995
|
Fix the issue with Tooltip (#168546)
Fixes #168545. Fixes #168445. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] 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/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md |
||
|
|
df5f110325
|
Add support for hiding widget subtrees from the widget inspector (#169007)
This PR introduces two new widgets: - `DisableWidgetInspectorScope`, which hides its children from the widget inspector - `EnableWidgetInspectorScope`, which makes its children available to the widget inspector These widgets are used to inform the `WidgetInspectorService`'s `InspectorSerializationDelegate` when it should be omitting `DiagnosticableNodes` from the response when building the root widget tree for the inspector. This functionality is meant to be used by developer tooling and packages that want to prevent unnecessary implementation details from polluting the inspector and possibly confusing end users. This change also includes some minor updates to the Widget Preview scaffolding template to hide the scaffold's implementation details and only show details for the previews defined by the user. Part of https://github.com/flutter/flutter/issues/166423 **Widget Previewer Demo** <img width="1606" alt="image" src="https://github.com/user-attachments/assets/eb23160e-01c5-413f-b1d2-97985ced9ef9" /> |
||
|
|
0b9225afdf
|
Shared element transition for predictive back (#154718)
This PR adds a shared element transition for predictive back navigation, based on the specification found here: https://developer.android.com/design/ui/mobile/guides/patterns/predictive-back#shared-element-transition. A new transition builder added: `PredictiveBackPageSharedElementTransitionsBuilder`, which constructs the shared element transition version. <details><summary>Code sample</summary> ```dart import 'package:flutter/material.dart'; void main() { runApp(const MainApp()); } class MainApp extends StatelessWidget { const MainApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( theme: ThemeData( brightness: Brightness.light, pageTransitionsTheme: const PageTransitionsTheme( builders: { TargetPlatform.android: PredictiveBackPageSharedElementTransitionsBuilder(), }, ), ), home: const FirstScreen(), ); } } class FirstScreen extends StatelessWidget { const FirstScreen({super.key}); @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text('First Screen'), ), body: Center( child: ElevatedButton( onPressed: () { Navigator.of(context).push( MaterialPageRoute(builder: (_) => const SecondScreen()), ); }, child: const Text('Go to Second Screen'), ), ), ); } } class SecondScreen extends StatelessWidget { const SecondScreen({super.key}); @override Widget build(BuildContext context) { return Theme( data: ThemeData(brightness: Brightness.dark), child: Scaffold( appBar: AppBar( title: const Text('Second Screen'), ), body: const Center( child: Text('Hello, Predictive back!'), ), ), ); } } ``` </details> [predictive_back_shared_element.webm](https://github.com/user-attachments/assets/1194cf09-c64f-4b1f-aa3f-10feb0ef12bd) Partial fix for #153577 --------- Co-authored-by: Justin McCandless <jmccandless@google.com> |
||
|
|
559c314ba3
|
Update the RangeSlider widget to the 2024 Material Design appearance (#163736)
Fixes [Update `RangeSlider` for Material 3 redesign](https://github.com/flutter/flutter/issues/162505) ### Description This PR updates `RangeSlider` with `year2023` flag which can be used to opt into the 2024 `RangeSlider design appearance. ### Code Sample <details> <summary>expand to view the code sample</summary> ```dart import 'package:flutter/material.dart'; void main() => runApp(const RangeSliderExampleApp()); class RangeSliderExampleApp extends StatelessWidget { const RangeSliderExampleApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( theme: ThemeData( sliderTheme: const SliderThemeData( showValueIndicator: ShowValueIndicator.always, ), ), home: Scaffold( appBar: AppBar(title: const Text('RangeSlider Sample')), body: const RangeSliderExample(), ), ); } } class RangeSliderExample extends StatefulWidget { const RangeSliderExample({super.key}); @override State<RangeSliderExample> createState() => _RangeSliderExampleState(); } class _RangeSliderExampleState extends State<RangeSliderExample> { RangeValues _currentRange1Values = const RangeValues(20.0, 60.0); RangeValues _currentRange2Values = const RangeValues(30.0, 80.0); @override Widget build(BuildContext context) { return Column( spacing: 20.0, mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ RangeSlider( year2023: false, values: _currentRange1Values, max: 100, onChanged: (RangeValues values) { setState(() { _currentRange1Values = values; }); }, ), RangeSlider( year2023: false, values: _currentRange2Values, max: 100, divisions: 10, labels: RangeLabels( _currentRange2Values.start.round().toString(), _currentRange2Values.end.round().toString(), ), onChanged: (RangeValues values) { setState(() { _currentRange2Values = values; }); }, ), ], ); } } ``` </details> | Preview 1 | Preview 2 | | --------------- | --------------- | | <img src="https://github.com/user-attachments/assets/e14a1b04-4e32-4b37-b2f5-2d2001f53114"/> | <img src="https://github.com/user-attachments/assets/aad36529-d576-4ec7-b2e5-49c9387456be"/> | # Custom track gap and thumb size <img width="343" alt="Screenshot 2025-02-20 at 15 26 09" src="https://github.com/user-attachments/assets/06c09679-1df8-4380-b3e6-c4add8f0cc42" /> <img width="338" alt="Screenshot 2025-02-20 at 15 27 19" src="https://github.com/user-attachments/assets/6226c515-f96b-412a-b59e-cafd2fba0515" /> ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] 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. - [x] 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/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md |
||
|
|
154146d0dd
|
docs: Update deprecation message for Slider.year2023 (#169053)
Fix https://github.com/flutter/flutter/issues/168637
The `Slider.year2023` documentation in the constructor message wasn't
updated/synced, leading to confusion. It should follow the information
presented in SliderThemeData:
|
||
|
|
56bfc03a09
|
Fixes Navigator calls onPopInvokedWithResult when onPopPage return false (#168567)
<!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> as title ## 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/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md |
||
|
|
4065d3c7ee
|
TextField magnifier stuck on long press cancel (#167881)
<!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> ## Fixes #167879 This PR fixes bug where magnifier and floating cursor get stuck on screen when long press is cancelled (eg. by closing the app). ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] 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/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md |
||
|
|
358e2f003d
|
Fix Chip delete button semantic bounds (#168310)
## Description This PR fixes Chip's delete icon semantic tap target. Chip implementation extends the hit area of the delete icon but it did not expand the semantic bounds. ### Before  ### After  ## Related Issue Fixes [Chip delete button tap target does not meet platform recommended tap target size](https://github.com/flutter/flutter/issues/94098) ## Tests Adds 1 test. --------- Co-authored-by: Kate Lovett <katelovett@google.com> Co-authored-by: chunhtai <47866232+chunhtai@users.noreply.github.com> |
||
|
|
57dd0de38c
|
Resolve Cupertino textstyle in MaterialBasedCupertinoThemeData (#167597)
Fixes #146864. The overridden resolve was keeping the Cupertino text styles from resolving their dynamic colors depending on the theme brightness when in a MaterialApp in most cases. I *believe* that this was to keep values from the Material theme from changing, but as far as I can tell that shouldn't affect anything in the current state and that is 6 year old code. Waiting to see if tests make me a liar. Update: tests made me a liar. Before (text should be showing): <img width="423" alt="Screenshot 2025-04-22 at 1 58 53 PM" src="https://github.com/user-attachments/assets/0aabf6cf-2c25-4446-8d12-69e745f26be0" /> After: <img width="418" alt="Screenshot 2025-04-22 at 1 59 16 PM" src="https://github.com/user-attachments/assets/ea9958bb-4470-4f16-b5ca-f149be1301b1" /> ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] 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/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md |
||
|
|
7cbb76d147
|
Clarify deprecation notice for jumpToWithoutSettling in scroll_position.dart (#167200)
## Description Improved the `@Deprecated` message for `jumpToWithoutSettling` to clarify the risks and suggest appropriate alternatives like `jumpTo` or using a custom `ScrollPosition`. This makes the warning more informative for developers, in line with Flutter's documentation practices. ## Checklist - [x] Documentation-only change - [x] No functional logic modified - [x] Analysis and tests unaffected |
||
|
|
a2c2d2c8de
|
Replace SizedBox spacing with spacing parameter in Row usages (#168688)
This PR refactors Flutter widgets that use SizedBox for spacing between children in Row into using the spacing parameter instead. ## 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]. - [x] 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. - [x] All existing and new tests are passing. |
||
|
|
6de5aed91f
|
Fix selection handles showing when using a mouse (#168751)
Fixes #168252 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Renzo Olivares <roliv@google.com> |
||
|
|
701385d5bd
|
Homogenize themes documentation (#168808)
## Description This PR homogenizes `xxxTheme` and `xxxThemeData` classes documentation. Mainly: - Points to `xxxTheme.of` from `xxxThemeData` documentation instead of using pseudo code (and add a code block in `xxxTheme.of` documentation when it was missing. - Fix `xxxTheme.of` documentation when the comment did not specify the correct return type. ## Tests Documentation only |
||
|
|
1329c8c2bd
|
[Widget Inspector] Fix missing cupertino icon in on-device inspector (#168847)
Resolves https://github.com/flutter/flutter/issues/168846 This is a follow-up to https://github.com/flutter/flutter/pull/167677. For apps that do not import `package:cupertino_icons`, the new on-device button's icon shows up as a `[?]`. This fix: * adds an explicit dependency on `package:cupertino_icons` to the framework * imports `CupertinoIcons` into `lib/src/widgets/app.dart` *Note: For some reason, adding the import to `packages/flutter/lib/src/material/app.dart` and `packages/flutter/lib/src/cupertino/app.dart` did not resolve the issue. That's why I've added it to `lib/src/widgets/app.dart`, even though it's not actually used in that file.* **Let me know if this is acceptable!** (cc @Piinks) I'm guessing we might not want to add a dependency on `cupertino_icons` to the Framework (this might even be breaking change?) so if not, it might make sense to use a different icon for the on-device inspector. Thanks! |
||
|
|
736087e9a4
|
CupertinoSliverNavigationBar respects accessibility text scaling (#168866)
Dupe of https://github.com/flutter/flutter/pull/167313 (closed because of issues with Google testing) Fixes [Cupertino nav bars should respect accessibility text scaling](https://github.com/flutter/flutter/issues/167248) Fixes [Title jumps during a CupertinoNavigationBar -> CupertinoNavigationBar hero transition](https://github.com/flutter/flutter/issues/90589) ## Before | Regular | Scaled | | --- | --- | | <img width="378" alt="Image" src="https://github.com/user-attachments/assets/0e010c06-253f-41a5-9b23-18c6d1f75046" /> | <img width="378" alt="Image" src="https://github.com/user-attachments/assets/7033f879-3e68-4e5e-94d1-cc84383d6d5d" /> | ## After | Regular | Scaled | | --- | --- | | <img width="375" alt="flutter nav bar unscaled" src="https://github.com/user-attachments/assets/ff761339-358e-4fa5-a0c2-b0f43f6cea2e" /> | <img width="376" alt="flutter after 2 textscale" src="https://github.com/user-attachments/assets/11d46451-bd46-4c65-9f3a-fb2b0da0d77c" /> | ## Native | Regular | Scaled | | --- | --- | | <img width="376" alt="Image" src="https://github.com/user-attachments/assets/5775f9f1-d1f9-446b-9ec8-e77073a8887e" /> | <img width="376" alt="Image" src="https://github.com/user-attachments/assets/76bf6263-d94c-4136-bd53-d91bb0d88437" /> | |
||
|
|
cd3b0a5a86
|
Reland "Clip search artifacts in CupertinoSliverNavigationBar searchable-to-searchable transitions" (#168772)
Fixes https://github.com/flutter/flutter/issues/168494 |
||
|
|
0cf1d34e9b
|
Make Cupertino sheet set the systemUIStyle through an AnnotatedRegion (#168182)
#164680 caused a regression where the systemUIStyle would not be set correctly if the previous page has a navbar. https://github.com/user-attachments/assets/656d171c-d768-4481-bf64-4c93463752a2 This happens because the RenderView is constantly watching for AnnotatedRegions at the top of the bottom of the screen to set the UI style. So the sheet when initialized would set the style, but during the transition the previous pages navbar is still at the top of the screen, so the RenderView immediately sets the style back to where it was. This PR fixes that by adding an AnnotatedRegion behind the previous page through the delegatedTransition with the style set correctly for the sheet. That way when the previous page drops low enough, the systemUI switches over. https://github.com/user-attachments/assets/e600e23b-aad3-4059-9009-c3037a15a2bd The RenderView is watching for right around the midpoint of the systemUI so it switches back and forth at a good point when the transition is manually dragged back and forth. https://github.com/user-attachments/assets/a299c0fd-0bbe-40f2-b235-a593f8b5a885 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] 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]. - [x] 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/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md |
||
|
|
606bb06c0f
|
Reverts "Use live region in error text input decorator for Android (#165531)" (#168848)
<!-- start_original_pr_link --> Reverts: flutter/flutter#165531 <!-- end_original_pr_link --> <!-- start_initiating_author --> Initiated by: matanlurey <!-- end_initiating_author --> <!-- start_revert_reason --> Reason for reverting: Breaks google client tests <!-- end_revert_reason --> <!-- start_original_pr_author --> Original PR Author: ash2moon <!-- end_original_pr_author --> <!-- start_reviewers --> Reviewed By: {chunhtai, reidbaker, hannah-hyj} <!-- end_reviewers --> <!-- start_revert_body --> This change reverts the following previous change: Resolves partly https://github.com/flutter/flutter/issues/165510 **Context:** This issue originates from https://github.com/flutter/flutter/issues/99715, where it was reported that `liveRegion` alone was insufficient for announcing form validation errors. While `liveRegion` announces the first error encountered, subsequent submissions with the same error message on Android would not trigger a re-announcement. **Original Solution:** Pull request https://github.com/flutter/flutter/pull/123373 addressed this by implementing the `announce` event to ensure error messages were consistently announced, even for repeated submissions. **Native Android Behavior (Jetpack Compose):** In native Android development using Jetpack Compose, setting the `isError` property of a `TextField` to `true` triggers Talkback to announce "Error invalid input." This announcement occurs *only* on the initial change to the error state. Subsequent errors, even if the `isError` property remains `true`, are not re-announced. This behavior closely mirrors the functionality of `liveRegion`, with the key difference being that `liveRegion` also announces the specific error text, in addition to the general error state. Testing in a native Jetpack Compose application confirms this behavior and provides a valuable comparison point against the current Flutter form example. **Suggested Action:** **Fork** the behavior in https://github.com/flutter/flutter/pull/123373. Reinstate the use of `liveRegion` for error announcements within `widgets/Form` for Android and keep other platforms the same. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] 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/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md <!-- end_revert_body --> Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com> |
||
|
|
494b08b420
|
Normalize BottomAppBarTheme (#168586)
This PR is to make `BottomAppBarTheme` conform to Flutter Material's conventions for component themes: - Added a `BottomAppBarThemeData` class which defines overrides for the defaults for `BottomAppBar` properties. - Added `BottomAppBarTheme` constructor parameters: `BottomAppBarThemeData? data` and `Widget? child`. This is now the preferred way to configure a `BottomAppBarTheme`: ```dart BottomAppBarTheme( data: BottomAppBarThemeData( color: xxx, height: xxx, elevation: xxx, shape: xxx, ... ), child: const BottomAppBar() ) ``` These two properties are made nullable to not break existing apps which has customized `ThemeData.bottomAppBarTheme`. - Update `BottomAppBarTheme` to be an `InheritedWidget` subclass. - Changed the type of component theme defaults from `BottomAppBarTheme` to `BottomAppBarThemeData`. - Changed the `BottomAppBarTheme bottomAppBarTheme` property to `BottomAppBarThemeData bottomAppBarTheme` in `ThemeData` and `ThemeData.copyWith()`. This may cause breaking changes, a migration guide will be created on website repo. - Add new tests for `BottomAppBarThemeData` and update the existing `BottomAppBarTheme` tests. And also turn to `true` for `useMaterial3` (along with usages accordingly) at the common method `_withTheme()` since `useMaterial3` is true by default. - Addresses the "theme normalization" sub-project within #91772. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] 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/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md --------- Signed-off-by: huycozy <huy@nevercode.io> |
||
|
|
4d037cfdf5
|
Add titleAlignment to CheckboxListTile and RadioListTile (#168666)
Fixes https://github.com/flutter/flutter/issues/168596#issue-3052291792 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] 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/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md |
||
|
|
e425d4348a
|
Remove deprecated todo about caching (#168534)
Relates to https://github.com/flutter/flutter/issues/3568 The comment https://github.com/flutter/flutter/issues/3568#issuecomment-2400681340 says `Cache<K, V>` is not going to be implemented, so this TODO is outdated ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] 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/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md |
||
|
|
5a48ed065c
|
Improve documentation for KeyedSubtree constructor (#167198)
<!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> *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].* ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] 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/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md |
||
|
|
30fe6e7857
|
Wire up the system text scaler from PlatformDispatcher (#159999)
The equality of 2 `SystemTextScaler` is determined by the platform's `textScaleFactor` scalar, because the `scale` method is always monotonically increasing wrt `textScaleFactor`. On Android the scalar reflects the user configuration in system preference it seems: https://developer.android.com/reference/android/content/res/Configuration#fontScale ## 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/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md |
||
|
|
30924e2d6d
|
[a11y] Semanctis flag refactor step 3: framework part (#167771)
issue: https://github.com/flutter/flutter/issues/166101, overall goal is to update semantics flag to be a struct/class to support more than 32 flags. step 1: https://github.com/flutter/flutter/pull/167421 Update semantics_node.h and dart:ui step 2: https://github.com/flutter/flutter/pull/167738 Update Embedder part to use a struct instead of a int bit mask. step 3:(this PR) Update Framework use the SemanticsFlags class instead of bitmask TODO: web engine use the new class SemanticsUpdateBuilder.updateNode pass a list of bools instead of bitmask flutter_tester use the SemanticsFlags class instead of bitmask [apicheck_test.dart](https://github.com/flutter/flutter/pull/167421/files#diff-69aefaacf1041f639974044962123bfae0756ce86032ac1f26256099425d7a5a) Add this test back |
||
|
|
9bdbf497bc
|
Reverts "Clip search artifacts in CupertinoSliverNavigationBar searchable-to-searchable transitions (#168510)" (#168775)
<!-- start_original_pr_link --> Reverts: flutter/flutter#168510 <!-- end_original_pr_link --> <!-- start_initiating_author --> Initiated by: victorsanni <!-- end_initiating_author --> <!-- start_revert_reason --> Reason for reverting: Tree is red. <!-- end_revert_reason --> <!-- start_original_pr_author --> Original PR Author: victorsanni <!-- end_original_pr_author --> <!-- start_reviewers --> Reviewed By: {MitchellGoodwin} <!-- end_reviewers --> <!-- start_revert_body --> This change reverts the following previous change: In https://github.com/flutter/flutter/pull/166705, non-searchable transitions were clipped. This PR also clips searchable-to-searchable transitions. Also replaces type check to detect searchable-to-searchable transitions. | Before | After | | --- | --- | | <img width="377" alt="before bottom search artifactsd" src="https://github.com/user-attachments/assets/a0726905-6dc1-463e-8cbb-bf1f5626fb1a" /> | <img width="379" alt="nav bar search artifacts bottom" src="https://github.com/user-attachments/assets/9474b3e5-a7a9-4a0e-9395-5f62106e65ad" /> | | <img width="379" alt="before top search artifacts" src="https://github.com/user-attachments/assets/adf2b34d-ffa9-4c86-bee5-6683b06ec44f" /> | <img width="379" alt="nav bar search artifacts top" src="https://github.com/user-attachments/assets/a7a8edd8-0c66-4e3d-8958-3152bf55e42a" /> | Fixes [Transition between two CupertinoSliverNavigationBar.search routes shows search artifacts mid-transition if one is collapsed and one is extended](https://github.com/flutter/flutter/issues/168494) <!-- end_revert_body --> Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com> |
||
|
|
f3a1806562
|
Use live region in error text input decorator for Android (#165531)
Resolves partly https://github.com/flutter/flutter/issues/165510 **Context:** This issue originates from https://github.com/flutter/flutter/issues/99715, where it was reported that `liveRegion` alone was insufficient for announcing form validation errors. While `liveRegion` announces the first error encountered, subsequent submissions with the same error message on Android would not trigger a re-announcement. **Original Solution:** Pull request https://github.com/flutter/flutter/pull/123373 addressed this by implementing the `announce` event to ensure error messages were consistently announced, even for repeated submissions. **Native Android Behavior (Jetpack Compose):** In native Android development using Jetpack Compose, setting the `isError` property of a `TextField` to `true` triggers Talkback to announce "Error invalid input." This announcement occurs *only* on the initial change to the error state. Subsequent errors, even if the `isError` property remains `true`, are not re-announced. This behavior closely mirrors the functionality of `liveRegion`, with the key difference being that `liveRegion` also announces the specific error text, in addition to the general error state. Testing in a native Jetpack Compose application confirms this behavior and provides a valuable comparison point against the current Flutter form example. **Suggested Action:** **Fork** the behavior in https://github.com/flutter/flutter/pull/123373. Reinstate the use of `liveRegion` for error announcements within `widgets/Form` for Android and keep other platforms the same. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] 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/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md --------- Co-authored-by: Reid Baker <1063596+reidbaker@users.noreply.github.com> |
||
|
|
40e990fd17
|
Clip search artifacts in CupertinoSliverNavigationBar searchable-to-searchable transitions (#168510)
In https://github.com/flutter/flutter/pull/166705, non-searchable transitions were clipped. This PR also clips searchable-to-searchable transitions. Also replaces type check to detect searchable-to-searchable transitions. | Before | After | | --- | --- | | <img width="377" alt="before bottom search artifactsd" src="https://github.com/user-attachments/assets/a0726905-6dc1-463e-8cbb-bf1f5626fb1a" /> | <img width="379" alt="nav bar search artifacts bottom" src="https://github.com/user-attachments/assets/9474b3e5-a7a9-4a0e-9395-5f62106e65ad" /> | | <img width="379" alt="before top search artifacts" src="https://github.com/user-attachments/assets/adf2b34d-ffa9-4c86-bee5-6683b06ec44f" /> | <img width="379" alt="nav bar search artifacts top" src="https://github.com/user-attachments/assets/a7a8edd8-0c66-4e3d-8958-3152bf55e42a" /> | Fixes [Transition between two CupertinoSliverNavigationBar.search routes shows search artifacts mid-transition if one is collapsed and one is extended](https://github.com/flutter/flutter/issues/168494) |
||
|
|
9771b4e464
|
Fixes hero not shown when remove pages without animation (#168617)
<!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> fixes https://github.com/flutter/flutter/issues/158136 ## 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/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md |
||
|
|
cba2e86350
|
[iOS] Do not hide selection handles when platform hides system context menu (#168678)
Fixes an issue where selection handles would be hidden when the system hides the platform context menu on iOS. Before: https://github.com/user-attachments/assets/61afecd8-7558-41fb-bba3-74b6e8e47f13 After: https://github.com/user-attachments/assets/0c6f83de-cb20-46ce-97d3-86d8873da3aa Fixes #168636 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Renzo Olivares <roliv@google.com> |
||
|
|
336a7ecf7b
|
Add assert for index parameter in IndexedStack. (#167757)
<!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> Closes https://github.com/flutter/flutter/issues/165840 by adding an assert with a more user-friendly message to the IndexedStack. ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [X] I signed the [CLA]. - [X] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [X] I added new tests to check the change I am making, or this PR is [test-exempt]. - [X] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [X] 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/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md |
||
|
|
1acb89f141
|
Tab bar theme and dialog theme documentation cleanup (#168724)
## Description While preparing a PR to normalize `InputDecorationTheme` (part of https://github.com/flutter/flutter/issues/91772), I spotted some typos in tab bar theme and dialog theme documentation: ## Tests Documentation only |
||
|
|
5c80840812
|
Make the barrier panel on the Material Drawer non-dismissible (#164810)
This PR entails making the modal barrier behind the Material Drawer dismissible / non-dismissible via a Scaffold flag named "drawerBarrierDismissible", as in: ``` Scaffold( drawerBarrierDismissible: false, // defaults to true so it behaves as normal .... ) ``` This is so as to force the Drawer to be opened / closed programmatically using either: ``` Scaffold.of(context).openEndDrawer() / openDrawer() ``` or ``` Scaffold.of(Utils.adminNav.currentContext!).closeDrawer() / closeEndDrawer() ``` and the user not closing the Drawer upon tapping on the modal barrier. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. --------- Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com> Co-authored-by: Justin McCandless <justinjmccandless@gmail.com> |