Use the presence of handler to determine 'enabled'

Instread of an explicit 'enabled' bool, this uses the presence of the
event handler to determine if a widget is enabled or not. This means
that if you've not passed a handler, your widget will be disabled, which
makes sense, since it wouldn't work anyway.

Adds this feature to checkbox, and ports raised button, flat button, and
radio buttons to this new model.

Adds a checkbox to card_collection that can be disabled.

Hide a (basically bogus) hint from the (soon to be disabled) strong hint
mode in the analyzer that this reveals.
This commit is contained in:
Hixie
2015-10-26 14:51:05 -07:00
parent ddd4ea81ec
commit d11acc41eb
10 changed files with 78 additions and 70 deletions

View File

@@ -26,9 +26,7 @@ class ContainerApp extends StatelessComponent {
onPressed: () => print("Hello World")
),
new RaisedButton(
child: new Text('DISABLED'),
onPressed: () => print("Hello World"),
enabled: false
child: new Text('DISABLED')
)
])
),