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:
@@ -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)
|
||||
]
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user