Add const non-null asserts where required (#9945)

Also includes minor doc fixes.
This commit is contained in:
Chris Bracken
2017-05-09 21:15:42 -07:00
committed by GitHub
parent 0b2fb13269
commit 60f5ae8e77
14 changed files with 92 additions and 52 deletions

View File

@@ -93,10 +93,10 @@ class _DrawerDemoState extends State<DrawerDemo> with TickerProviderStateMixin {
new UserAccountsDrawerHeader(
accountName: const Text('Zach Widget'),
accountEmail: const Text('zach.widget@example.com'),
currentAccountPicture: new CircleAvatar(backgroundImage: new AssetImage(_kAsset0)),
otherAccountsPictures: <Widget>[
new CircleAvatar(backgroundImage: new AssetImage(_kAsset1)),
new CircleAvatar(backgroundImage: new AssetImage(_kAsset2)),
currentAccountPicture: const CircleAvatar(backgroundImage: const AssetImage(_kAsset0)),
otherAccountsPictures: const <Widget>[
const CircleAvatar(backgroundImage: const AssetImage(_kAsset1)),
const CircleAvatar(backgroundImage: const AssetImage(_kAsset2)),
],
onDetailsPressed: () {
_showDrawerContents = !_showDrawerContents;
@@ -164,10 +164,10 @@ class _DrawerDemoState extends State<DrawerDemo> with TickerProviderStateMixin {
new Container(
width: 100.0,
height: 100.0,
decoration: new BoxDecoration(
decoration: const BoxDecoration(
shape: BoxShape.circle,
image: new DecorationImage(
image: new AssetImage(_kAsset0),
image: const DecorationImage(
image: const AssetImage(_kAsset0),
),
),
),