Commit Graph

20 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
Greg Spencer
4ce7fdd92b
Remove 'must be non-null' and 'must not be null' comments from non-framework libraries (#134994)
## Description

This removes all of the comments that are of the form "so-and-so must not be null" or "so-and-so must be non-null" from the cases where those values are defines as non-nullable values.

This PR removes them from the library in the repo that don't have anything to do with the framework.

This was done by hand, since it really didn't lend itself to scripting, so it needs to be more than just spot-checked, I think. I was careful to leave any comment that referred to parameters that were nullable, but I may have missed some.

In addition to being no longer relevant after null safety has been made the default, these comments were largely fragile, in that it was easy for them to get out of date, and not be accurate anymore anyhow.

This did create a number of constructor comments which basically say "Creates a [Foo].", but I don't really know how to avoid that in a large scale change, since there's not much you can really say in a lot of cases.  I think we might consider some leniency for constructors to the "Comment must be meaningful" style guidance (which we de facto have already, since there are a bunch of these).

## Related PRs
- https://github.com/flutter/flutter/pull/134984
- https://github.com/flutter/flutter/pull/134991
- https://github.com/flutter/flutter/pull/134992
- https://github.com/flutter/flutter/pull/134993

## Tests
 - Documentation only change.
2023-09-19 17:26:07 +00:00
Bruno Leroux
af050d95ae
Add a channel to query the engine keyboard state (#122885)
## Description

This PR adds a new channel to query the engine keyboard state.
See https://github.com/flutter/flutter/issues/87391#issuecomment-1228975571 for motivation. 

## Related Issue

Framework side implementation for https://github.com/flutter/flutter/issues/87391.

Once approved the framework will try to query the initial keyboard state from the engine. PRs will be needed on the engine side to answer the framework query.

## Tests

Adds 1 test.
2023-04-28 21:05:20 +00:00
Rexios
bf0bdacb29
[flutter_test] Adds method to mock EventChannels (#124415)
[flutter_test] Adds method to mock EventChannels
2023-04-10 17:02:48 +00:00
Zachary Anderson
2f4a6afd30
Revert "[flutter_test] Adds method to mock EventChannels" (#124401)
Reverts flutter/flutter#123726

Analysis failures on CI
https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20analyze/12890/overview
2023-04-07 10:10:00 -07:00
Rexios
f28eb28f0d
[flutter_test] Adds method to mock EventChannels (#123726)
[flutter_test] Adds method to mock EventChannels
2023-04-07 16:12:27 +00:00
Michael Goderbauer
83720015a4
Remove unnecessary null checks in flutter_test (#118865) 2023-01-20 22:01:13 +00:00
Sam Rawlins
f104be7ae9
Ignore body_might_complete_normally_catch_error violations (#105795) 2022-06-16 23:12:06 +00:00
Pierre-Louis
74cfc3db67
Use curly_braces_in_flow_control_structures for non-flutter packages (#104629)
* Use `curly_braces_in_flow_control_structures` for `packages/flutter_driver`

* Use `curly_braces_in_flow_control_structures` for `packages/flutter_goldens`

* Use `curly_braces_in_flow_control_structures` for `packages/flutter_goldens_client`

* Use `curly_braces_in_flow_control_structures` for `packages/flutter_localizations`

* Use `curly_braces_in_flow_control_structures` for `packages/flutter_test`

* Use `curly_braces_in_flow_control_structures` for `packages/flutter_web_plugins`

* fix comments

* Use `curly_braces_in_flow_control_structures` for `packages/integration_test`

* fix indentation
2022-05-25 20:01:11 +02:00
Sai Sandeep Mutyala
7b580fd5df
Enable TestDefaultBinaryMessenger to intercept all platform channels. (#100049) 2022-04-25 10:44:07 -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
Ian Hickson
5e0cc4cba4
Migrate to ChannelBuffers.push (#82564) 2021-05-21 15:09:03 -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 35ad43f20c.
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 c26ed03c8a.
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