55 Commits

Author SHA1 Message Date
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
Michael Goderbauer
2530f4c5eb
Fix some issues flagged by unawaited_futures lint (#77844) 2021-03-11 15:55:03 -08:00
Michael Goderbauer
cb867bbedc
Enable unnecessary_await_in_return lint (#77434) 2021-03-05 18:38:15 -08:00
Michael Goderbauer
67edb63d84
Re-land "Toggable Refactor (#76745)" (#77263) 2021-03-04 11:34:04 -08:00
Michael Goderbauer
328a262ed6
Revert "Toggable Refactor (#76745)" (#77068)
This reverts commit 14552a96c105b85027486e7c1fe899b78a7e574c.
2021-03-02 08:10:37 -08:00
Michael Goderbauer
14552a96c1
Toggable Refactor (#76745) 2021-03-01 19:55:02 -08:00
Yash Johri
21b270886e
[Checkbox] Adds shape property (#70171) 2021-02-13 12:06:03 -08:00
Alexandre Ardhuin
d546e1d311
fix for upcoming lint use_named_constants (#74788) 2021-01-27 20:20:44 +01:00
Per Classon
90f08769a3
[Material] Resolve overlay color for pressed/active/inactive states in selection controls (#71569) 2020-12-07 03:33:03 -08:00
MH Johnson
50dc84bc17
[Material] Add support for customizing active + disabled state color for selection controls. (#68831)
* Add new MaterialStateProperty param to selection controls
2020-11-11 12:39:20 -05:00
Per Classon
5434dd59a7
[Material] Add splash radius property to selection controls (#69197) 2020-10-28 11:22:04 -07:00
Darren Austin
3c21775c94
Migrate Material framework tests to null safety (#67556)
Migrate Material framework tests to null safety.
2020-10-07 16:44:00 -07:00
LongCatIsLooong
53e25a61c9
Reland "Prevent material switch from recreating its render object when it becomes disabled (#61398)", reverted in #64062 (#64354) 2020-08-21 14:52:08 -07:00
LongCatIsLooong
90908b0beb
Revert "Prevent material switch from recreating its render object when it becomes disabled (#61398)" (#64062) 2020-08-21 10:34:08 -07:00
LongCatIsLooong
579cab8a86
Prevent material switch from recreating its render object when it becomes disabled (#61398) 2020-08-17 11:36:02 -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
MariaMelnik
7f65c6a8c6
Stopped all animation controllers after toggleable has been detached. (#57809) 2020-06-02 17:58:03 -07:00
Tong Mu
60f1aa25d3
Add mouse cursor API to widgets (phase 1) (#57628)
* Adds default cursor and/or mouseCursor property to a number of widgets.
* Adds `MaterialStateMouseCurrsor`.
2020-05-28 13:16:31 -07:00
Greg Spencer
d57d493507
Reland: Add OrderedFocusTraversalPolicy and FocusTraversalGrou… (#50672)
This re-lands #49235 with the addition of includeSemantics flag on the Focus widget so that the FocusTraversalGroup can create a Focus widget without affecting the semantics tree.

The FocusTraversalGroup uses the Focus widget to create a grouping of descendants for traversal, but doesn't actually participate in focus (canRequestFocus is always false), so we don't want it to add a Semantics widget in that case, since that can cause semantics changes. The canRequestFocus attribute can also be used when a widget is disabled, so we do sometimes want to include Semantics even if that is false, but not in the case where it is always false, as for FocusTraversalGroup.

- Added a test to make sure that FocusTraversalGroup doesn't add any semantics information.
2020-02-12 16:22:01 -08:00
Greg Spencer
c132c0faa9
Revert "Add OrderedFocusTraversalPolicy and FocusTraversalGrou… (#50660)
This reverts commit 8ef5e2f046ed18ca32827e1a715ca5e405c646ac because it breaks some semantics tests.
2020-02-12 13:37:36 -08:00
Greg Spencer
8ef5e2f046
Add OrderedFocusTraversalPolicy and FocusTraversalGroup to all… (#49235)
This change adds a way to provide explicit focus order for a part of the widget tree.

It adds FocusTraversalPolicyGroup, which in many ways is similar to DefaultFocusTraversal, except that it groups a widget subtree together so that those nodes are traversed as a group. DefaultFocusTraversal doesn't work as one would expect: If there is more than one DefaultFocusTraversal inside of a focus scope, the policy can change depending on which node was asked to move "next", which can cause unexpected behavior. The new grouping mechanism doesn't have that problem. I deprecate DefaultFocusTraversal in this PR.

It also adds OrderedFocusTraversalPolicy, which is a policy that can be supplied to FocusTraversalPolicyGroup to set the policy for a sub-tree. It looks for FocusTraversalOrder inherited widgets, which use a FocusOrder to do the sorting. FocusOrder has two subclasses: NumericalFocusOrder (which sorts based on a double), and LexicalFocusOrder, which sorts based on a String.

As part of doing this, I refactored the way FocusTraversalPolicy is implemented so that it has more default implementation methods, and exposes a new protected member: sortDescendants, which makes it easier for developers to make their own policy subclasses: they only need to implement sortDescendants to get a new ordering behavior, but can also still override any of the default implementation behaviors if they need different behavior.

I was able to do this without breaking the API (AFAICT).
2020-02-11 09:18:39 -08:00
Greg Spencer
bc7ed36db5
Add visualDensity to checkbox, radio, icon button, and chip. (#46091)
This adds a visualDensity attribute to checkbox, radio, icon button, and chip.
2019-12-05 17:36:42 -08: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
Greg Spencer
6e10719dc5
FocusableActionDetector widget (#44867)
This adds a FocusableActionDetector, a widget which combines the functionality of Actions, Shortcuts, MouseRegion and a Focus widget to create a detector that defines actions and key bindings, and will notify that the focus or hover highlights should be shown or not. This widget can be used to give a control the required detection modes for focus and hover handling on desktop and web platforms.

I replaced a bunch of similar code in many of our widgets with this widget, and found that pretty much any control that wants to be focusable wants all of these features as well: focus highlights, hover highlights, and actions to activate it.

Also eliminated an extra _hasFocus variable in FocusState that wasn't being used.
2019-11-18 17:23:30 -08:00
Greg Spencer
a1c5e3354b
Re-Land: Add focus nodes, hover, and shortcuts to switches, checkboxes, and radio buttons. (#43657)
This re-lands the change that adds focus nodes, hover, and shortcuts to switches, checkboxes, and radio buttons. (#43213), with fixes for the web tests that weren't enabled in the master that it was synced to when I first landed it.
2019-10-29 17:09:26 -07:00
Greg Spencer
38f2d27685
Revert "Re-Land: Add focus nodes, hover, and shortcuts to switches, checkboxes, and radio buttons. (#43384)" (#43647)
This reverts commit 8017f63b083474d0ba28457e48acbb35d15a727a, since it breaks web tests.
2019-10-28 11:28:09 -07:00
Greg Spencer
8017f63b08
Re-Land: Add focus nodes, hover, and shortcuts to switches, checkboxes, and radio buttons. (#43384)
This re-lands the change that adds focus nodes, hover, and shortcuts to switches, checkboxes, and radio buttons. (#43213)

No changes from original, except for finding the right RenderBox in dev/integration_tests/android_semantics_testing/test_driver/main_test.dart.
2019-10-28 10:55:11 -07:00
Jonah Williams
ed36fe5ddd
Revert "Add focus nodes, hover, and shortcuts to switches, checkboxes, and radio buttons. (#43213)" (#43367)
This reverts commit 900067207e50622c119639e103f77ea6e2da68ad.
2019-10-23 12:29:58 -07:00
Greg Spencer
900067207e
Add focus nodes, hover, and shortcuts to switches, checkboxes, and radio buttons. (#43213)
In order to enable keyboard navigation to more controls, I've added focus nodes to switches, checkboxes, and radio buttons. In addition, this change enables mouse hover over these controls.

- Added tests for focus, hover, and shortcut activation for Checkbox, Radio, and Switch.
2019-10-23 11:22:22 -07:00
Christian Mürtz
f0354b82e6 Add CheckboxListTile checkColor (#37636)
* Add checkColor to CheckboxListTile

* Create second paint for drawing check and dash

* Add activeColor test for Checkbox

Co-Authored-By: Shi-Hao Hong <shihaohong@google.com>
2019-08-09 17:28:02 -04:00
Alexandre Ardhuin
a0d1f93b07
fix block formatting (#29051) 2019-03-09 09:03:11 +01:00
Alexandre Ardhuin
387f885481
Add missing trailing commas (#28673)
* add trailing commas on list/map/parameters

* add trailing commas on Invocation with nb of arg>1

* add commas for widget containing widgets

* add trailing commas if instantiation contains trailing comma

* revert bad change
2019-03-01 08:17:55 +01:00
Sahel Lucas
4e235c0cd8 Add Checkbox checkIcon color parameter #26808
The new parameter defines the color of the checkbox's check mark. Default is (still) white.
2019-02-01 09:01:43 -08:00
Hans Muller
cccddf8a03
Fix tristate checkbox false to null transition, test ALL transitions (#26199) 2019-01-07 17:33:56 -08:00
Jonah Williams
cdf1cec902
add ability to match child semantics data (#22001) 2018-10-05 17:44:26 -07: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
Ian Hickson
53b635817c
Re-enable missing_return (#20844) 2018-08-28 11:22:57 -07: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 cc1cf13eec6752af992d3db0265cf04cc90bfd13.
2018-07-16 13:30:27 -07:00
Alexandre Ardhuin
cc1cf13eec
enable lint unnecessary_const (#19342) 2018-07-16 21:43:48 +02:00
Jonah Williams
41646c9579
Add new matcher and utility methods for testing semanics (#19046) 2018-07-09 15:21:46 -07:00
Jonah Williams
77a528c417
Re-land #18369 (#19082) 2018-07-09 12:05:15 -07:00
Jonah Williams
cabe09a532
Revert "Add flag to ThemeData to expand tap targets of certain material widgets (#18369)" (#19053)
This reverts commit 989f5741da9e4e8a9ae40d2ec9fbe33f11aba177.
2018-07-03 15:26:35 -07:00
Jonah Williams
989f5741da
Add flag to ThemeData to expand tap targets of certain material widgets (#18369) 2018-07-03 10:55:43 -07:00
Jonah Williams
29e0e8b22f
update Tristate checkbox semantics to consider indeterminate as "unchecked" (#18297) 2018-06-15 12:53:45 -07:00
Jonah Williams
b6ceff552b
re-add semantic service events for tap and longPress (#17918) 2018-05-25 18:42:02 -07:00
Hans Muller
6dcb0d62c3
Change kRadialReactionRadius from 24 to 20 (#17620) 2018-05-15 15:06:03 -07:00