Use @required for onPressed and onChanged (#4534)

We now use the `@required` annotation to encourage developers to
explicitly set onPressed and onChanged callbacks to null when that would
disable the widget.

Fixes #287
This commit is contained in:
Adam Barth
2016-06-12 13:25:06 -07:00
committed by GitHub
parent cc44696754
commit 1a3adae101
23 changed files with 133 additions and 101 deletions

View File

@@ -103,7 +103,8 @@ class PageableListAppState extends State<PageableListApp> {
child: new Row(
children: <Widget>[
new Flexible(child: new Text('Scrolling wraps around')),
new Checkbox(value: itemsWrap)
// TODO(abarth): Actually make this checkbox change this value.
new Checkbox(value: itemsWrap, onChanged: null)
]
)
)