Commit Graph

40 Commits

Author SHA1 Message Date
Nate
fa9992eff6
switch statement cleanup (#148382)
This PR is step 12 in the journey to solve issue #136139 and make the
entire Flutter repo more readable.

Most of it involves implementing switch expressions, and there's also a
few other random things that I wanted to clean up a bit.
2024-05-16 17:16:06 -07:00
Nate
3267fbc07a
Implement switch expressions in dev/ (#139048)
I previously made a PR (#136140) that used `switch` expressions to make some parts of the Flutter codebase easier to understand. It was assigned to the framework team, and @christopherfujino let me know that it was too large to effectively review and recommended breaking it up into smaller pull requests.

Here's a PR that only targets files in the `dev/` directory. Hopefully this will be easier to work with!

(solves issue https://github.com/flutter/flutter/issues/136139)
2023-11-28 23:40:28 +00:00
LongCatIsLooong
ec47148036
[Windows_android channels_integration_test] Column -> ListView (#134836)
This should fix https://github.com/flutter/flutter/issues/134636. 

The column can get really tall, especially when there's line wrapping. This is the layout on a tablet, so on a motor g4 this column is likely going to overflow.

```
     RenderParagraph#66251 relayoutBoundary=up3
│ creator: RichText ← Text-[<'status'>] ← Column ←
│   FutureBuilder<TestStepResult> ← Padding ←
│   KeyedSubtree-[GlobalKey#0f29e] ← _BodyBuilder ← MediaQuery ←
│   LayoutId-[<_ScaffoldSlot.body>] ← CustomMultiChildLayout ←
│   _ActionsScope ← Actions ← ⋯
|  parentData: offset=Offset(0.0, 600.0); flex=null; fit=null
```

![flutter_01](https://github.com/flutter/flutter/assets/31859944/5e700d21-3c5e-4990-bfb5-153f44f1c517)
2023-09-15 19:53:24 +00:00
Michael Goderbauer
34102ca3bb
Migrate channels to pkg:integration _test (#120833)
* migrate to integration_test framework

* Update embedding
2023-02-16 18:55:32 +00:00
gaaclarke
a7166e7a4e
Reland isolate platform channels with conditional compilation (#111712) 2022-09-19 16:52:33 +00:00
gaaclarke
12506ed978
Revert isolate platform channels because of google integration tooling (#111702)
* Revert "turned on background isolate platform channel tests for android (#111279)"

This reverts commit 71b47975a9.

* Revert "Reland: Started handling messages from background isolates. (#111320)"

This reverts commit 1ad2757042.
2022-09-15 16:46:08 -07:00
gaaclarke
1ad2757042
Reland: Started handling messages from background isolates. (#111320) 2022-09-12 17:44:48 +00:00
gaaclarke
c33115943f
Revert "Started handling messages from background isolates." (#111318) 2022-09-09 23:25:17 +00:00
gaaclarke
0d19d46b44
Started handling messages from background isolates. (#109005)
Started handling messages from background isolates.
2022-09-09 15:14:21 -07:00
Michael Goderbauer
10a7c9ba22
Unify analysis options (#108462) 2022-07-28 09:07:49 -07:00
Alexandre Ardhuin
bbdf617034
Export public API types from services/*.dart library (#106316) 2022-06-28 20:26:06 +00:00
Ian Hickson
7b01346c5c
Enable no_default_cases lint (#91530) 2021-10-11 10:23:04 -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 5fd259be24.
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
Michael Goderbauer
c077278431
Migrate integration_tests/channels to null safety (#84145) 2021-06-07 15:29:05 -07:00
Jonah Williams
e6d4b8cf0b
Revert "Migrate channels to null safety (#80641)" (#81050)
This reverts commit f55b2665e9.
2021-04-23 10:18:38 -07:00
Abhishek Ghaskata
f55b2665e9
Migrate channels to null safety (#80641) 2021-04-23 00:09:02 -07:00
Phil Quitslund
61c30c41b2
fix sort_directives violations (#80817) 2021-04-21 13:49:03 -07:00
Sam Rawlins
006638839c
Remove "unnecessary" imports. (#74383) 2021-01-25 19:04:05 -08:00
Alexandre Ardhuin
4f9b6cf017
enable lint prefer_final_in_for_each (#47724) 2020-01-07 16:32:04 +01:00
Alexandre Ardhuin
ec1a015045
implicit-casts:false in dev (#45787) 2019-12-05 22:34:06 +01:00
Ian Hickson
449f4a6673
License update (#45373)
* Update project.pbxproj files to say Flutter rather than Chromium

Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.

* Update the copyright notice checker to require a standard notice on all files

* Update copyrights on Dart files. (This was a mechanical commit.)

* Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.

Some were already marked "The Flutter Authors", not clear why. Their
dates have been normalized. Some were missing the blank line after the
license. Some were randomly different in trivial ways for no apparent
reason (e.g. missing the trailing period).

* Clean up the copyrights in non-Dart files. (Manual edits.)

Also, make sure templates don't have copyrights.

* Fix some more ORGANIZATIONNAMEs
2019-11-27 15:04:02 -08:00
Jonah Williams
83af6f48d6
Adds a type parameter to invokeMethod (and additional utility methods) (#26303) 2019-01-10 13:21:03 -08:00
Alexandre Ardhuin
2ea1d81cdc
sort_constructors_first (#22575) 2018-10-04 07:28:07 +02:00
Alexandre Ardhuin
a07d3719a1
enable lint prefer_generic_function_type_aliases (#21680) 2018-09-14 21:06:19 +02:00
Alexandre Ardhuin
d927c93310
Unnecessary new (#20138)
* enable lint unnecessary_new

* fix tests

* fix tests

* fix tests
2018-09-12 08:29:29 +02:00
Alexandre Ardhuin
eda03e2586
re-re-enable lint unnecessary_const (#20103) 2018-08-02 12:02:32 +02:00
Todd Volkert
00aac68e2d
Revert flutter/flutter#19592 (#19861)
It was causing problems rolling Flutter into Fuchsia
2018-07-27 08:44:39 -07:00
Alexandre Ardhuin
27018359d2
re-enable lint unnecessary_const (#19592)
* re-enable lint unnecessary_const

* remove trailling whitespaces

* remove unnecessary const (after merge)
2018-07-23 08:31:48 +02:00
Ian Hickson
f630f90d6d
Revert "enable lint unnecessary_const (#19342)" (#19423)
This reverts commit cc1cf13eec.
2018-07-16 13:30:27 -07:00
Alexandre Ardhuin
cc1cf13eec
enable lint unnecessary_const (#19342) 2018-07-16 21:43:48 +02:00
Chris Bracken
2ae48845a8
Revert elimination of Dart 1 (#18460)
fuchsia_tester.dart still assumes Dart 1. Previously, it ran tests directly
from source, flutter_platform.dart automatically runs a kernel compile when
operating in Dart 2 mode, but this assumes a functional Dart SDK is available
in the artifacts directly, and fuchsia_tester.dart mocks out the artifacts
directory with an empty temp dir.

Remaining work is:
1. Get the frontend server building as a dependency on Fuchsia.
2. Patch fuchsia_tester.dart to use a valid Dart SDK and frontend server.

This also reverts migration to Dart 2 typedef syntax.

This reverts commit 6c56bb2. (#18362)
This reverts commit 3daebd0. (#18316)
2018-06-13 12:46:39 -07:00
Greg Spencer
6c56bb2420
Update typedef syntax to use Function notation and turn on lint for old notation. (#18362)
Now that Dart 1 is turned off, reapplying my change to turn on the prefer_generic_function_type_aliases analysis option, and fix all the typedefs to Dart 2 preferred syntax.

Also eliminated the unused analysis_options_repo.yaml file and turned on public_member_api_docs in analysys_options.yaml.

No logic changes, just changing the typedef syntax for all typedefs, and updating analysis options.
2018-06-11 15:51:45 -07:00
Greg Spencer
b921fdc58e
Revert "Update typedef syntax to use Function notation and turn on lint for old notation. (#18035)" (#18041)
This reverts commit 3258602073.
2018-05-30 13:51:14 -07:00
Greg Spencer
3258602073
Update typedef syntax to use Function notation and turn on lint for old notation. (#18035)
Fixes #18028

Just changes typedef declarations, no logic changes.
2018-05-30 12:13:58 -07:00
Greg Spencer
3c5a7a3005
Make non-global constants have consistent naming (with just _ instead of _k) (#17584)
Our style guide says the k's are not necessary, and it seems like a good idea to make all the code be consistent on this.

Only naming changes to private vars: no logic changes.
2018-05-17 23:04:41 -07:00
Mikkel Nygaard Ravn
340c68038a
Make standard codecs extensible (#15414) 2018-03-16 16:17:56 +00:00
Alexandre Ardhuin
9b56c1c58c enable always_put_control_body_on_new_line lint (#9950) 2017-05-10 09:41:55 +02:00
Mikkel Nygaard Ravn
70ff50f929 Integration test for channel communication (#9621) 2017-04-27 08:44:28 +02:00