mirror of
https://github.com/flutter/samples.git
synced 2026-04-07 04:02:13 +00:00
Removed redundant "const" and "new" assignments & Formatted code. (#58)
This commit is contained in:
committed by
Andrew Brogdon
parent
be35972637
commit
8fe2999ee8
@@ -14,7 +14,7 @@ import 'package:veggieseasons/widgets/veggie_card.dart';
|
||||
|
||||
class ListScreen extends StatelessWidget {
|
||||
List<Widget> _generateVeggieRows(List<Veggie> veggies, Preferences prefs) {
|
||||
final cards = new List<Widget>();
|
||||
final cards = List<Widget>();
|
||||
|
||||
for (Veggie veggie in veggies) {
|
||||
cards.add(Padding(
|
||||
|
||||
@@ -118,7 +118,7 @@ abstract class Styles {
|
||||
Season.autumn: Color(0xff724913),
|
||||
};
|
||||
|
||||
static const seasonBorder = const Border(
|
||||
static const seasonBorder = Border(
|
||||
top: BorderSide(color: Color(0xff606060)),
|
||||
left: BorderSide(color: Color(0xff606060)),
|
||||
bottom: BorderSide(color: Color(0xff606060)),
|
||||
|
||||
@@ -86,7 +86,7 @@ class CloseButton extends StatefulWidget {
|
||||
|
||||
@override
|
||||
CloseButtonState createState() {
|
||||
return new CloseButtonState();
|
||||
return CloseButtonState();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import 'package:veggieseasons/styles.dart';
|
||||
//
|
||||
// See https://github.com/flutter/flutter/projects/29 for more info.
|
||||
|
||||
typedef FutureOr<void> SettingsItemCallback();
|
||||
typedef SettingsItemCallback = FutureOr<void> Function();
|
||||
|
||||
class SettingsNavigationIndicator extends StatelessWidget {
|
||||
const SettingsNavigationIndicator({Key key}) : super(key: key);
|
||||
@@ -77,7 +77,7 @@ class SettingsItem extends StatefulWidget {
|
||||
final SettingsItemCallback onPress;
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => new SettingsItemState();
|
||||
State<StatefulWidget> createState() => SettingsItemState();
|
||||
}
|
||||
|
||||
class SettingsItemState extends State<SettingsItem> {
|
||||
|
||||
Reference in New Issue
Block a user