mirror of
https://github.com/flutter/flutter
synced 2024-10-14 04:02:56 +00:00
Address review comments from #767
Mostly formating and removing arguments with default values.
This commit is contained in:
parent
5d99f31c04
commit
627b049216
|
@ -106,15 +106,18 @@ class SettingsFragment extends StatefulComponent {
|
|||
onPressed: () { _handleBackupChanged(!(userData.backupMode == BackupMode.enabled)); },
|
||||
child: new Flex([
|
||||
new Flexible(child: new Text('Back up data to the cloud')),
|
||||
new Switch(value: userData.backupMode == BackupMode.enabled, onChanged: _handleBackupChanged)
|
||||
], direction: FlexDirection.horizontal)
|
||||
new Switch(value: userData.backupMode == BackupMode.enabled, onChanged: _handleBackupChanged),
|
||||
])
|
||||
),
|
||||
new DrawerItem(
|
||||
onPressed: () => _handleGoalWeightPressed(),
|
||||
child: new Flex([
|
||||
new Text('Goal Weight'),
|
||||
new Text(goalWeightText, style: Theme.of(this).text.caption),
|
||||
], direction: FlexDirection.vertical, alignItems: FlexAlignItems.start)
|
||||
new Text('Goal Weight'),
|
||||
new Text(goalWeightText, style: Theme.of(this).text.caption),
|
||||
],
|
||||
direction: FlexDirection.vertical,
|
||||
alignItems: FlexAlignItems.start
|
||||
)
|
||||
),
|
||||
])
|
||||
)
|
||||
|
|
|
@ -126,10 +126,12 @@ class StockHome extends StatefulComponent {
|
|||
new DrawerItem(
|
||||
icon: 'action/assessment',
|
||||
selected: true,
|
||||
child: new Text('Stock List')),
|
||||
child: new Text('Stock List')
|
||||
),
|
||||
new DrawerItem(
|
||||
icon: 'action/account_balance',
|
||||
child: new Text('Account Balance')),
|
||||
child: new Text('Account Balance')
|
||||
),
|
||||
new DrawerDivider(),
|
||||
new DrawerItem(
|
||||
icon: 'action/thumb_up',
|
||||
|
@ -137,14 +139,16 @@ class StockHome extends StatefulComponent {
|
|||
child: new Flex([
|
||||
new Flexible(child: new Text('Optimistic')),
|
||||
new Radio(value: StockMode.optimistic, groupValue: stockMode, onChanged: _handleStockModeChange)
|
||||
], direction: FlexDirection.horizontal)),
|
||||
])
|
||||
),
|
||||
new DrawerItem(
|
||||
icon: 'action/thumb_down',
|
||||
onPressed: () => _handleStockModeChange(StockMode.pessimistic),
|
||||
child: new Flex([
|
||||
new Flexible(child: new Text('Pessimistic')),
|
||||
new Radio(value: StockMode.pessimistic, groupValue: stockMode, onChanged: _handleStockModeChange)
|
||||
], direction: FlexDirection.horizontal)),
|
||||
])
|
||||
),
|
||||
new DrawerDivider(),
|
||||
new DrawerItem(
|
||||
icon: 'action/settings',
|
||||
|
|
|
@ -104,16 +104,16 @@ class StockSettings extends StatefulComponent {
|
|||
onPressed: () => _confirmOptimismChange(),
|
||||
child: new Flex([
|
||||
new Flexible(child: new Text('Everything is awesome')),
|
||||
new Checkbox(value: optimism == StockMode.optimistic, onChanged: (_) => _confirmOptimismChange())
|
||||
], direction: FlexDirection.horizontal)
|
||||
new Checkbox(value: optimism == StockMode.optimistic, onChanged: (_) => _confirmOptimismChange()),
|
||||
])
|
||||
),
|
||||
new DrawerItem(
|
||||
icon: 'action/backup',
|
||||
onPressed: () { _handleBackupChanged(!(backup == BackupMode.enabled)); },
|
||||
child: new Flex([
|
||||
new Flexible(child: new Text('Back up stock list to the cloud')),
|
||||
new Switch(value: backup == BackupMode.enabled, onChanged: _handleBackupChanged)
|
||||
], direction: FlexDirection.horizontal)
|
||||
new Switch(value: backup == BackupMode.enabled, onChanged: _handleBackupChanged),
|
||||
])
|
||||
),
|
||||
])
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue