forked from firka/flutter
More const immutable classes (#9544)
* more widget const constructors * prefer const constructors * address review comments
This commit is contained in:
committed by
GitHub
parent
054c937917
commit
83fce211a3
@@ -176,9 +176,9 @@ class FancyImageItem extends StatelessWidget {
|
||||
new ItemDescription(),
|
||||
new ItemImageBox(),
|
||||
new InfoBar(),
|
||||
new Padding(
|
||||
const Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
||||
child: new Divider()
|
||||
child: const Divider()
|
||||
),
|
||||
new IconBar(),
|
||||
new FatDivider()
|
||||
@@ -198,9 +198,9 @@ class FancyGalleryItem extends StatelessWidget {
|
||||
const UserHeader('Ali Connors'),
|
||||
new ItemGalleryBox(index),
|
||||
new InfoBar(),
|
||||
new Padding(
|
||||
const Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
||||
child: new Divider()
|
||||
child: const Divider()
|
||||
),
|
||||
new IconBar(),
|
||||
new FatDivider()
|
||||
@@ -599,7 +599,7 @@ class GalleryDrawer extends StatelessWidget {
|
||||
onChanged: (bool value) { _changeTheme(context, value); },
|
||||
),
|
||||
),
|
||||
new Divider(),
|
||||
const Divider(),
|
||||
new ListTile(
|
||||
leading: const Icon(Icons.hourglass_empty),
|
||||
title: const Text('Animate Slowly'),
|
||||
|
||||
@@ -93,20 +93,20 @@ class CardCollectionState extends State<CardCollection> {
|
||||
buildDrawerCheckbox("Fixed size cards", _fixedSizeCards, _toggleFixedSizeCards),
|
||||
buildDrawerCheckbox("Let the sun shine", _sunshine, _toggleSunshine),
|
||||
buildDrawerCheckbox("Vary font sizes", _varyFontSizes, _toggleVaryFontSizes, enabled: !_editable),
|
||||
new Divider(),
|
||||
const Divider(),
|
||||
buildDrawerColorRadioItem("Deep Purple", Colors.deepPurple, _primaryColor, _selectColor),
|
||||
buildDrawerColorRadioItem("Green", Colors.green, _primaryColor, _selectColor),
|
||||
buildDrawerColorRadioItem("Amber", Colors.amber, _primaryColor, _selectColor),
|
||||
buildDrawerColorRadioItem("Teal", Colors.teal, _primaryColor, _selectColor),
|
||||
new Divider(),
|
||||
const Divider(),
|
||||
buildDrawerDirectionRadioItem("Dismiss horizontally", DismissDirection.horizontal, _dismissDirection, _changeDismissDirection, icon: Icons.code),
|
||||
buildDrawerDirectionRadioItem("Dismiss left", DismissDirection.endToStart, _dismissDirection, _changeDismissDirection, icon: Icons.arrow_back),
|
||||
buildDrawerDirectionRadioItem("Dismiss right", DismissDirection.startToEnd, _dismissDirection, _changeDismissDirection, icon: Icons.arrow_forward),
|
||||
new Divider(),
|
||||
const Divider(),
|
||||
buildFontRadioItem("Left-align text", TextAlign.left, _textAlign, _changeTextAlign, icon: Icons.format_align_left, enabled: !_editable),
|
||||
buildFontRadioItem("Center-align text", TextAlign.center, _textAlign, _changeTextAlign, icon: Icons.format_align_center, enabled: !_editable),
|
||||
buildFontRadioItem("Right-align text", TextAlign.right, _textAlign, _changeTextAlign, icon: Icons.format_align_right, enabled: !_editable),
|
||||
new Divider(),
|
||||
const Divider(),
|
||||
new ListTile(
|
||||
leading: const Icon(Icons.dvr),
|
||||
onTap: () { debugDumpApp(); debugDumpRenderTree(); },
|
||||
|
||||
Reference in New Issue
Block a user