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

@@ -52,7 +52,8 @@ class AdaptedGridItem extends StatelessWidget {
child: new Text(name)
),
new IconButton(
icon: Icons.more_vert
icon: Icons.more_vert,
onPressed: null
)
]
)