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
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
Nate Wilson
360e42c7af
Factor out Container objects ( #153619 )
...
This pull request follows up on [a PR from 4 months ago](https://github.com/flutter/flutter/pull/147432 ) that aimed to reduce the number of `Container` objects in the framework.
I feel like now's a good time to wrap it up!
(especially since I've gained a grasp of how "rebase" vs. "merge commit" can [affect test results](https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#using-git ) ð)
<br>
resolves #147431
2024-09-11 23:59:53 +00:00
Polina Cherkasova
baf739c8e6
Remove usage of testWidgetsWithLeakTracking. ( #140239 )
2023-12-15 14:13:31 -08:00
Kostia Sokolovskyi
7cd8b4074f
Cover more test/widgets tests with leak tracking #4 ( #134663 )
2023-09-13 09:54:19 -07:00
Jonathan Green
28605398ec
Interactive viewer doesn't appear to respect the trackpadScrollCausesScale parameter ( #127114 )
...
Fix a bug when using InteractiveViewer.trackpadScrollCausesScale
2023-05-26 10:45:56 -07:00
pdblasi-google
7ba1d5ec1b
Updates flutter/test/widgets to no longer reference TestWindow ( #122354 )
...
Updates `flutter/test/widgets` to no longer reference `TestWindow`
2023-03-14 18:19:17 +00:00
Callum Moffat
7ddf42eae5
InteractiveViewer parameter to return to pre-3.3 trackpad/Magic Mouse behaviour ( #114280 )
...
* trackpadPanShouldActAsZoom
* Address feedback
* Move constant, add blank lines
2023-01-06 22:44:44 +00:00
Michael Goderbauer
fa3777bd3e
Enable sized_box_shrink_expand lint ( #117371 )
...
* Enable lint
* note about discarded_futures
* note about use_decorated_box
* update note on require_trailing_commas
2022-12-20 19:07:15 +00:00
Callum Moffat
601f48cd95
InteractiveViewer discrete trackpad panning ( #112171 )
...
* InteractiveViewer web trackpad panning
* Address feedback
2022-12-12 22:34:24 +00:00
Pedro Massango
e1adc96d5e
feat: provide a way to set the initial child's alignment ( #114745 )
...
InteractiveViewer.alignment parameter
2022-11-07 12:08:22 -08:00
Callum Moffat
850f3b37d4
Add PointerScaleEvent and use in InteractiveViewer ( #112172 )
...
Enables pinch-to-zoom in InteractiveViewer on web via PointerScaleEvent.
2022-10-05 13:23:46 -07:00
Frank Hinkel
4aea2f9933
Add friction coefficient to InteractiveViewer ( #109443 )
2022-09-20 20:57:23 +00:00
Nazareno Cavazzon
0ad0a56e86
panningDirection parameter added to InteractiveViewer ( #109014 )
2022-09-16 17:22:12 +00:00
Alexandre Ardhuin
ccd33631e3
enable combinators_ordering ( #107847 )
2022-07-18 22:04:07 +00:00
xubaolin
18575321bb
Revert "fix a Scaffold extendBodyBehindAppBar update bug" ( #106396 )
2022-06-22 17:01:07 +00:00
xubaolin
ea28f287f1
fix a Scaffold extendBodyBehindAppBar update bug ( #104958 )
2022-06-15 18:33:06 -07:00
Tong Mu
23bc3d64eb
[Mouse] Remove all pointers at the end of tests ( #102694 )
2022-05-19 17:48:10 -07:00
Taha Tesser
c504797c42
Remove clipBehavior == Clip.none conditions ( #98503 )
2022-02-18 01:29:16 -08:00
Justin McCandless
bb65333c10
InteractiveViewer scaleFactor ( #95224 )
...
New parameter for InteractiveViewer: scaleFactor, which allows control over the speed of zooming.
2022-01-07 10:40:45 -08: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
Justin McCandless
7d368dcf0c
InteractiveViewer with a child of zero size ( #90012 )
...
Asserts that the InteractiveViewer child can't have zero size.
2021-09-14 12:39:19 -07:00
Ahmed Ashour
a3dc90c4f5
Add space before curly parentheses. ( #85306 )
2021-07-01 13:51:05 -07:00
Alexandre Ardhuin
1a3af88ced
add missing trailing commas ( #81362 )
2021-04-28 10:54:05 -07:00
Justin McCandless
a8e41f8206
Fix InteractiveViewer.builder for custom RenderBox parents ( #80166 )
2021-04-26 21:09:02 -07:00
Angjie Li
c0c231be3b
Revert "Reland InteractiveViewer.builder ( #79287 )" ( #80305 )
...
This reverts commit 0fd75528de3f8d5225ce721e8be27041b8f6e2b6.
2021-04-13 10:58:50 -07:00
Justin McCandless
0fd75528de
Reland InteractiveViewer.builder ( #79287 )
2021-04-08 15:29:05 -07:00
Justin McCandless
4982a7f185
InteractiveViewer should call onInteractionUpdate even when gesture is disabled ( #78990 )
2021-03-31 14:14:04 -07:00
Ren You
b921a2443f
Revert "InteractiveViewer.builder ( #77414 )" ( #78867 )
...
This reverts commit 2c2c8a7561fabbd8a841cc64fff2f98a8373bea4.
2021-03-23 08:11:58 -07:00
Justin McCandless
2c2c8a7561
InteractiveViewer.builder ( #77414 )
2021-03-22 09:41:03 -07:00
Greg Spencer
c6ef4c75d9
Turn on sized_box_for_whitespace lint, fix instances. ( #77099 )
2021-03-03 17:29:02 -08:00
Sam Rawlins
d69845b17f
Remove "unnecessary" imports in test/widgets ( #75949 )
2021-02-16 13:56:04 -08:00
Alexandre Ardhuin
d546e1d311
fix for upcoming lint use_named_constants ( #74788 )
2021-01-27 20:20:44 +01:00
RomanJos
2a2e0cf100
Add clipBehavior to InteractiveViewer ( #73281 )
...
More intuitive control over whether the child can overflow out of InteractiveViewer, deterring a lot of confusion we were seeing.
2021-01-20 11:57:37 -08:00
Justin McCandless
4e3b01152e
InteractiveViewer Scale Jump ( #71497 )
2020-12-21 16:14:05 -08:00
RomanJos
a3971153f6
[Proposal] Make mouseWheel zoom in % instead of pixels value ( #71266 )
...
InteractiveViewer scale gesture feel improvement.
2020-12-16 10:36:53 -08:00
Darren Austin
f7ee440207
Migrate yet even more widget framework tests to null safety. ( #67941 )
...
Migrate yet even more widget framework tests to null safety.
2020-10-15 11:12:02 -07:00
Justin McCandless
2c163e6e95
InteractiveViewer onInteractionUpdate focalPoint ( #66065 )
2020-09-19 11:17:04 -07:00
TerrenceAddison
e122238c7a
Bug fix where MouseScrollWheel zoom in flutter-web does not execute onInteraction functions ( #65313 )
2020-09-11 15:30:03 -07:00
Justin McCandless
f78b27e41a
Fix InteractiveViewer minScale bug ( #65432 )
2020-09-11 14:45:03 -07:00
Chris Bracken
c0ea00ed3f
Prefer moreOrLessEquals over closeTo ( #64915 )
...
Flutter's `moreOrLessEquals` has a few advantages over `closeTo` from
the `matcher` package:
* It emits the epsilon value in the test result on failure.
* It uses a named parameter for epsilon, which improves readability
at the call site.
* It has a reasonable default for epsilon in cases where something
more specific isn't required.
Using it also has the nice property that it aids in its own discovery
when when people go looking for such functionality in new tests.
This change also includes a couple unrelated whitespace formatting cleanups.
2020-08-30 22:20:16 -07:00
Justin McCandless
441d7f3fb8
InteractiveViewer scale interpretation improvement ( #63543 )
2020-08-12 15:31:09 -07:00
Justin McCandless
a82005a9dc
InteractiveViewer pan axis locking ( #61019 )
2020-07-08 09:51:02 -07:00
Justin McCandless
84fc52e1e9
InteractiveViewer with a changing screen size ( #60532 )
2020-07-01 22:43:03 -07:00
Justin McCandless
8ab513a0c9
InteractiveViewer scroll direction ( #60523 )
2020-06-30 16:23:01 -07:00
Justin McCandless
b429ec1e8f
InteractiveViewer mouse scale bug ( #59478 )
2020-06-16 10:30:06 -07:00
Alexandre Ardhuin
4d7525f05c
Opt out nnbd in packages/flutter ( #59186 )
...
* add language version 2.8 in packages/flutter
* enable non-nullable analyzer flag
2020-06-11 14:11:30 +02:00