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
Polina Cherkasova
baf739c8e6
Remove usage of testWidgetsWithLeakTracking. ( #140239 )
2023-12-15 14:13:31 -08:00
Bruno Leroux
e070417afe
Add 'Share' button to the selection toolbar on Android ( #139479 )
...
## Description
This PR adds the 'Share' button to the text selection toolbar on Android.
## Related Issue
Fixes https://github.com/flutter/flutter/issues/138728
## Tests
Refactor a lot of existing tests in order to:
- make them more readable (avoid duplication by introducing helper functions, specify explictly check which buttons are expected).
- make them more accurate (check that expected buttons are visible instead of just checking the number of buttons).
For instance, previous tests contained sections such as:
```dart
// Collapsed toolbar shows 3 buttons.
expect(
find.byType(CupertinoButton),
isContextMenuProvidedByPlatform ? findsNothing : isTargetPlatformIOS ? findsNWidgets(6) : findsNWidgets(3)
);
```
Where the comment is obsolete, the two cases (6 widgets and 3 widgets) are not explicit (which buttons are expected?), and not accurate (will pass if the number of buttons is right but the buttons are the wrong ones).
2023-12-08 15:34:01 +00:00
Polina Cherkasova
a7dbec31f1
Cover more tests with leak tracking. ( #133958 )
2023-09-05 13:45:12 -07:00
Qun Cheng
a5f8b64ef9
Update unit tests in material library for Material 3 ( #128725 )
...
Updates most of the unit tests in the packages/flutter/test/material folder so that they'll pass if ThemeData.useMaterial3 defaults to true.
All of the tests have wired useMaterial3 to false and will need to be updated with a M3 version.
related to #127064
2023-06-13 21:21:13 +00:00
pdblasi-google
0ba64488da
Reland: Updates flutter/test/material to no longer use TestWindow ( #122643 )
...
Reland: Updates `flutter/test/material` to no longer use `TestWindow`
2023-03-15 00:08:18 +00:00
yaakovschectman
46a8106781
Revert "Updates flutter/test/material to no longer use TestWindow ( #122337 )" ( #122636 )
...
This reverts commit b2fc5f97705b033a6a888863c9c78dc30df0f21c.
2023-03-14 17:34:33 -04:00
pdblasi-google
b2fc5f9770
Updates flutter/test/material to no longer use TestWindow ( #122337 )
...
Updates `flutter/test/material` to no longer use `TestWindow`
2023-03-14 21:13:05 +00:00
Ian Hickson
07c548c698
Apply BindingBase.checkInstance to TestDefaultBinaryMessengerBinding ( #116937 )
2023-02-13 23:55:58 +00:00
Ahmed Ashour
c35efdaa68
Remove superfluous words. ( #119008 )
...
* Remove superfluous words.
* Update packages/flutter/lib/src/widgets/slotted_render_object_widget.dart
Co-authored-by: Michael Goderbauer <goderbauer@google.com>
2023-01-24 01:57:00 +00:00
Michael Goderbauer
b308555ed1
Enable dangling_library_doc_comments and library_annotations lints ( #117365 )
2022-12-20 16:03:21 -08:00
Justin McCandless
0b451b6dfd
Context Menus ( #107193 )
...
* Can show context menus anywhere in the app, not just on text.
* Unifies all desktop/mobile context menus to go through one class (ContextMenuController).
* All context menus are now just plain widgets that can be fully customized.
* Existing default context menus can be customized and reused.
2022-10-28 12:40:09 -07:00
takashi kasai
4b4c876fb9
Text selection located wrong position when selecting multiple lines over max lines ( #102747 )
...
Fix for text selection toolbar position in cases with overflowing text.
2022-06-07 10:13:33 -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
616f9bcffa
Add tag support for executing reduced test sets ( #86821 )
2021-08-30 15:41:02 -07:00
Justin McCandless
91ef92d2b2
hasStrings support for eliminating clipboard notifications ( #87678 )
...
Use the hasStrings clipboard method when possible instead of reading the contents of the clipboard.
2021-08-26 17:10:18 -07:00
Darren Austin
5bdc698bb7
Updated skipped tests for material directory. ( #87328 )
2021-08-02 21:15:54 -07:00
Angjie Li
22436cca0e
Revert "Avoid passive clipboard read on Android ( #86791 )" ( #87375 )
2021-08-02 14:40:04 -07:00
Wyte Krongapiradee
221705b6e6
Avoid passive clipboard read on Android ( #86791 )
2021-07-28 20:44:02 -07:00
creativecreatorormaybenot
4465f68809
Make buildHandle onTap optional ( #84806 )
2021-06-18 11:09:02 -07:00
LongCatIsLooong
21273fde8e
[TextSelectionControls] move the tap gesture callback into _TextSelectionHandlePainter, remove _TransparentTapGestureRecognizer. ( #83639 )
2021-06-07 19:14:04 -07:00
Ian Hickson
5e0cc4cba4
Migrate to ChannelBuffers.push ( #82564 )
2021-05-21 15:09:03 -07:00
Hattomo (TomohiroHattori)
08a70e7ac8
Enable avoid_escaping_inner_quotes lint ( #81153 )
2021-05-19 09:54:02 -07:00
Ian Hickson
2ae1e39810
Revert "Migrate to ChannelBuffers.push ( #82057 )" ( #82525 )
2021-05-14 12:09:03 -07:00
Ian Hickson
b86d5c0094
Migrate to ChannelBuffers.push ( #82057 )
2021-05-13 14:34:04 -07:00
Ren You
7f1d1414cc
Revert "Migrate to ChannelBuffers.push ( #81235 )" ( #81829 )
...
This reverts commit 35ad43f20caa71ec051a97bc8bc8fec552fb4452.
2021-05-04 06:17:19 -07:00
Ian Hickson
35ad43f20c
Migrate to ChannelBuffers.push ( #81235 )
2021-05-03 17:14:03 -07:00
Angjie Li
b74df388e1
Revert "Migrate to ChannelBuffers.push ( #76288 )" ( #81226 )
...
This reverts commit c26ed03c8a77810136cc087ae60048ace062842d.
2021-04-26 12:57:17 -07:00
Ian Hickson
c26ed03c8a
Migrate to ChannelBuffers.push ( #76288 )
...
* Migrate to ChannelBuffers.push
* Move TestDefaultBinaryMessenger to its own file
* Apply deprecations and fix usages
2021-04-23 15:39:34 -07:00
Phil Quitslund
61c30c41b2
fix sort_directives violations ( #80817 )
2021-04-21 13:49:03 -07:00
Sam Rawlins
f6640a00f8
Remove "unnecessary" imports in test/material ( #75359 )
2021-02-03 16:16:03 -08:00
Justin McCandless
24e195d918
Mac context menu ( #73882 )
...
A very minimal right-click menu for Mac desktop.
2021-01-20 13:18:25 -08:00
Michael Goderbauer
ed5229e57b
Remove isMaterialAppTheme property ( #71861 )
2020-12-08 09:18:07 -08:00
Justin McCandless
b93f71f9c8
NNDB TextField tests ( #67696 )
...
Just another nnbd conversion PR.
2020-10-12 09:59:05 -07:00
Darren Austin
1f62776935
Reland ##65044 ( #66061 )
...
Turn the opt-in default for ThemeData.useTextSelectionTheme to true so that everything uses the new TextSelectionTheme by default.
2020-09-17 15:55:45 -07:00
Jonah Williams
a3aeab0c83
Revert "TextSelectionTheme support (step 2 of 3) ( #65044 )" ( #66051 )
...
This reverts commit cb92ffc7fa2a3731b98bd4dc7ddfedcc1f50ea6e.
2020-09-17 11:43:28 -07:00
Darren Austin
cb92ffc7fa
TextSelectionTheme support (step 2 of 3) ( #65044 )
2020-09-16 17:22:04 -07:00
Justin McCandless
f6cd2d4b35
Don't access clipboard passively on iOS ( #60316 )
2020-06-29 09:43:03 -07:00
Justin McCandless
339f0363a6
Reland modernize selection menu appearance ( #59617 )
2020-06-18 16:33:03 -07:00
Zachary Anderson
f8a4008e41
Revert "Modernize selection menu appearance ( #59115 )" ( #59561 )
...
This reverts commit b3c237ce5465a8befbf0814d36b7013e34c2abe5.
2020-06-16 08:41:22 -07:00
Justin McCandless
b3c237ce54
Modernize selection menu appearance ( #59115 )
2020-06-15 09:40:04 -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
Darren Austin
012cee2731
Typo fixing sweep through packages/flutter. ( #59219 )
2020-06-11 05:10:01 -07:00
Justin McCandless
53d7f24521
Fix Web asking for clipboard permissions ( #57324 )
2020-05-19 17:57:04 -07:00
nturgut
32547dcc7e
Revert " Bring back paste button hide behavior 3 ( #57139 )" ( #57286 )
...
This reverts commit 8de07d5527bcdc6b02e43e8efed19219a84bf82e.
2020-05-15 10:42:37 -07:00
Justin McCandless
8de07d5527
Bring back paste button hide behavior 3 ( #57139 )
2020-05-14 11:37:02 -07:00