Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
627b0492
Commit
627b0492
authored
Aug 22, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address review comments from #767
Mostly formating and removing arguments with default values.
parent
5d99f31c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
13 deletions
+20
-13
settings.dart
examples/fitness/lib/settings.dart
+8
-5
stock_home.dart
examples/stocks/lib/stock_home.dart
+8
-4
stock_settings.dart
examples/stocks/lib/stock_settings.dart
+4
-4
No files found.
examples/fitness/lib/settings.dart
View file @
627b0492
...
...
@@ -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
)
),
])
)
...
...
examples/stocks/lib/stock_home.dart
View file @
627b0492
...
...
@@ -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'
,
...
...
examples/stocks/lib/stock_settings.dart
View file @
627b0492
...
...
@@ -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
)
,
])
),
])
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment