Kate Lovett
9d96df2364
Modernize framework lints ( #179089 )
...
WIP
Commits separated as follows:
- Update lints in analysis_options files
- Run `dart fix --apply`
- Clean up leftover analysis issues
- Run `dart format .` in the right places.
Local analysis and testing passes. Checking CI now.
Part of https://github.com/flutter/flutter/issues/178827
- Adoption of flutter_lints in examples/api coming in a separate change
(cc @loic-sharma)
## 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].
**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code ).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.
<!-- 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
2025-11-26 01:10:39 +00:00
Kate Lovett
a04fb324be
Bump Dart to 3.8 and reformat ( #171703 )
...
Bumps the Dart version to 3.8 across the repo (excluding
engine/src/flutter/third_party) and applies formatting updates from Dart
3.8.
## 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 `///`).
- [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
2025-07-07 17:58:32 +00:00
Sangam Shrestha
d261411b4c
Remove redundant useMaterial3: true ( #163376 )
...
<!--
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
-->
This PR removes redundant useMaterial3: true as described in
https://github.com/flutter/flutter/issues/162818
*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/162818
## 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.
- [ ] 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: Qun Cheng <36861262+QuncCccccc@users.noreply.github.com>
2025-03-14 17:50:20 +00:00
Michael Goderbauer
5491c8c146
Auto-format Framework ( #160545 )
...
This auto-formats all *.dart files in the repository outside of the
`engine` subdirectory and enforces that these files stay formatted with
a presubmit check.
**Reviewers:** Please carefully review all the commits except for the
one titled "formatted". The "formatted" commit was auto-generated by
running `dev/tools/format.sh -a -f`. The other commits were hand-crafted
to prepare the repo for the formatting change. I recommend reviewing the
commits one-by-one via the "Commits" tab and avoiding Github's "Files
changed" tab as it will likely slow down your browser because of the
size of this PR.
---------
Co-authored-by: Kate Lovett <katelovett@google.com>
Co-authored-by: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com>
2024-12-19 20:06:21 +00:00
David Iglesias
0c2ee845fc
[web] Notify engine of handled PointerScrollEvents. ( #145500 )
...
Notifies the engine when `PointerSignalEvents` have been ignored by the framework, through the `ui.PointerData.respond` method.
This allows the web to "preventDefault" (or not) on `wheel` events.
## Issues
* Fixes (partially): https://github.com/flutter/flutter/issues/139263
## Tests
* Added tests to ensure `respond` is called at the right time, with the right value.
## Demo
* https://dit-multiview-scroll.web.app
<details>
<summary>
## Previous versions
</summary>
1. Modified `PointerScrollEvent`, not shippable.
2. Modified when events were handled, instead of the opposite.
</details>
2024-06-10 17:52:58 +00:00
Amir Panahandeh
b176bce22b
Add configurable hitTestBehavior to Scrollable ( #146403 )
...
This PR adds `hitTestBehavior` to Scrollable as a configurable member.
- https://github.com/flutter/flutter/issues/146401
2024-04-29 22:46:06 +00:00
Polina Cherkasova
baf739c8e6
Remove usage of testWidgetsWithLeakTracking. ( #140239 )
2023-12-15 14:13:31 -08:00
xubaolin
c3f4524061
Reland [SingleChildScrollView] Correct the offset pixels if it is out of range during layout ( #136871 )
...
Reland https://github.com/flutter/flutter/pull/136239 which was reverted by https://github.com/flutter/flutter/pull/136744
Fixes https://github.com/flutter/flutter/issues/105733
FIxes https://github.com/flutter/flutter/issues/135865
Do not merge before the customer finish the migration. @Piinks
2023-11-15 01:06:23 +00:00
Kate Lovett
0cc2eff204
Revert "[SingleChildScrollView] Correct the offset pixels if it is out of range during layout" ( #136744 )
2023-10-17 14:19:24 -05:00
xubaolin
3f722c1442
[SingleChildScrollView] Correct the offset pixels if it is out of range during layout ( #136239 )
...
Fixes https://github.com/flutter/flutter/issues/105733
FIxes https://github.com/flutter/flutter/issues/135865
The above two issues will not occur on the `ListView` widget, so after analyzing their differences, it was found that the `SingleChildScrollView` pixels were not corrected according to the content dimensions during layout.
### ListView correct the pixels codes
5dfd78c2e3/packages/flutter/lib/src/rendering/viewport.dart (L1462-L1465)
We should correct the pixels to prevent the physics ballistic simulations.
This change makes them have the same behavior.
2023-10-12 21:25:09 +00:00
Kostia Sokolovskyi
95eae5f967
Cover more test/widgets tests with leak tracking #12 . ( #135385 )
2023-09-29 17:47:04 -07:00
Polina Cherkasova
49e16867a3
TabController should dispatch creation in constructor. ( #133952 )
2023-09-22 15:27:05 -07:00
Kostia Sokolovskyi
98ebab58ee
Cover more test/widgets tests with leak tracking #8 ( #135045 )
2023-09-20 07:34:41 -07:00
Chinmoy
f1d04a46cb
Update Scrollable on ScrollBehaviour change. ( #131164 )
...
Fixes : #130793
2023-08-17 18:48:57 +00:00
Hans Muller
0d4b5ae122
Dev, examples/api, etc updated for Material 3 by default ( #129683 )
...
Updated tests in dev, examples/api, and tests/widgets to ensure that
they continue to pass when the default for `ThemeData.useMaterial3` is
changed to true.
This is the final set of changes required for
https://github.com/flutter/flutter/issues/127064 .
2023-06-28 09:41:58 -07:00
Tomasz Gucio
99c7e9f088
Add spaces after flow control statements ( #126320 )
2023-05-15 11:07:30 +02:00
Kate Lovett
53a1823f0e
Relocate some tests from scrollable_test.dart ( #122426 )
...
Relocate some tests from scrollable_test.dart
2023-03-13 17:45:51 +00:00
Kate Lovett
7ce88694c5
Clean up scrollable.dart for 2D ( #122357 )
...
Clean up scrollable.dart for 2D
2023-03-10 21:39:45 +00:00
Greg Price
e13677450c
Make ClampingScrollSimulation ballistic and more like Android ( #120420 )
...
Make ClampingScrollSimulation ballistic and more like Android
2023-02-28 17:38:29 +00:00
Lioness100
26b6c1bedd
Fix typos ( #121171 )
...
* Fix typos
* lowercase animated & opacity
* Undo typo fix
---------
Co-authored-by: Michael Goderbauer <goderbauer@google.com>
2023-02-23 19:43:21 +00:00
chunhtai
1daa0be4f9
Fix scrollable to clear inner semantics node if it does not use two p… ( #120996 )
...
* Fix scrollable to clear inner semantics node if it does not use two panel
* g
* add more check
2023-02-17 22:33:15 +00:00
xubaolin
778b3fa322
support updating dragDecices at runtime ( #120336 )
2023-02-13 21:38:27 +00:00
Kate Lovett
e69ea6dee4
Support flipping mouse scrolling axes through modifier keys ( #115610 )
...
* Maybe maybe
* Nit
* One more nit
* ++
* Fix test
* REview feedback
* Add comment about ios
* ++
* Doc nit
* Handle trackpads
* Review feedback
2023-01-30 19:34:48 +00:00
chunhtai
23a2fa31d2
Reland "Adds API in semanticsconfiguration to decide how to merge chi… ( #116895 )
...
* Reland "Adds API in semanticsconfiguration to decide how to merge child semanticsConfigurations (#110730 )"
This reverts commit 7549925c8c44dea92c7bc75be676c17b7613f87f.
* makes markNeedsSemanticsUpdate more robust
* address comment
2022-12-16 17:20:20 +00:00
Casey Hillers
7549925c8c
Revert "Adds API in semanticsconfiguration to decide how to merge child semanticsConfigurations ( #110730 )" ( #116839 )
...
This reverts commit 352ad3a9efccc8c54deb72eb0d7164bfb42b2a49.
2022-12-11 02:23:40 +00:00
chunhtai
352ad3a9ef
Adds API in semanticsconfiguration to decide how to merge child semanticsConfigurations ( #110730 )
...
* Adds semantics merger API and fix input decorator
* addressing comments
* abstractnode to object
* feature complete
* addressing comments
* fix comments
* conditionally add sort order
* fix bool
* fix test
* more fix
* fix tests
2022-12-07 16:59:16 +00:00
Greg Spencer
37b72342b0
Add maybeOf for all the cases where of returns nullable. ( #114120 )
2022-10-31 23:09:09 +00:00
Callum Moffat
70b19ff987
Add macOS-specific scroll physics ( #108298 )
2022-09-19 20:08:03 +00:00
Kate Lovett
5f2d730f1f
Revert Ballistic & Clamping simulation updates ( #111201 )
2022-09-08 17:43:54 +00:00
Kate Lovett
b6f7289b18
Update Ballistic animation & ClampingScrollSimulation ( #107735 )
2022-08-19 17:24:03 +00:00
Callum Moffat
22f51c34c6
Scroll inertia cancel [framework] ( #106891 )
2022-07-21 20:13:05 +00:00
Pierre-Louis
2aa348b940
Use curly_braces_in_flow_control_structures for widgets ( #104609 )
...
* Use `curly_braces_in_flow_control_structures` for `widgets`
* fix comments
* fix comments
2022-05-26 09:48:09 +02:00
Alexandre Ardhuin
07f1c20474
add missing trailing commas in list/set/map literals ( #102585 )
2022-04-27 09:15:35 +02:00
Michael Goderbauer
51bcdb9407
super parameters for framework ( #100905 )
2022-04-13 22:38:40 -07:00
chunhtai
8f2aaa99ab
Reland "Allow unknown device kind to scroll scrollables ( #100800 )" ( #101301 )
...
This reverts commit baa45a1718e732d0df317766f879f3e7d1b8de2a.
2022-04-04 10:52:06 -07:00
chunhtai
baa45a1718
Revert "Allow unknown device kind to scroll scrollables ( #100800 )" ( #101129 )
...
This reverts commit 000f4d1590322cc229072a6e9616051cab074286.
2022-03-31 10:45:41 -07:00
chunhtai
000f4d1590
Allow unknown device kind to scroll scrollables ( #100800 )
2022-03-29 13:05:09 -07:00
Ian Hickson
61a0add286
Enable avoid_redundant_argument_values lint ( #91409 ) ( #91462 )
2021-10-08 09:25:14 -07:00
Zachary Anderson
b9d2177da0
Revert "Enable avoid_redundant_argument_values lint ( #91409 )" ( #91461 )
...
This reverts commit 5fd259be244244e14ff87fee9b6a721625f952cd.
2021-10-07 21:11:07 -07:00
Ian Hickson
5fd259be24
Enable avoid_redundant_argument_values lint ( #91409 )
2021-10-07 20:13:02 -07:00
Kate Lovett
4ec75580fb
Revert clamping scroll simulation changes ( #89885 )
2021-09-10 16:02:02 -07:00
chunhtai
93a1484ae0
Add a hook for scroll position to notify scrolling context when dimen… ( #87076 )
2021-08-23 15:39:18 -07:00
Tong Mu
caf876cf40
Reland: Keyboard events ( #87174 )
2021-07-29 14:24:03 -07:00
Tong Mu
2f4f170dd2
Revert "Keyboard events ( #83752 )" ( #87171 )
...
This reverts commit 5f792ba17088b356bf0d030844ab09fd7f2b812e.
2021-07-28 02:32:08 -07:00
Tong Mu
5f792ba170
Keyboard events ( #83752 )
2021-07-26 12:28:05 -07:00
Jonah Williams
fff8ecfb94
[flutter] reject mouse drags by default in scrollables ( #81569 )
2021-05-03 16:54:02 -07:00
Alexandre Ardhuin
1a3af88ced
add missing trailing commas ( #81362 )
2021-04-28 10:54:05 -07:00
Trym Nilsen
ee921e6313
Apply carriedVelocity unless substantially different ( #79382 )
2021-04-02 14:44:03 -07:00
Kate Lovett
e40610d67e
Automatically applying Scrollbars on desktop platforms with configurable ScrollBehaviors ( #78588 )
2021-04-02 16:40:17 -05:00
Alexandre Ardhuin
8de7020a5f
remove unnecessary trailing commas ( #79562 )
2021-04-01 21:52:35 +02:00