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
f0b8c866
Commit
f0b8c866
authored
Nov 14, 2016
by
Hans Muller
Committed by
GitHub
Nov 14, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix gallery demo body centering (#6841)
parent
e384c0d9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
77 additions
and
69 deletions
+77
-69
bottom_navigation_demo.dart
...ples/flutter_gallery/lib/demo/bottom_navigation_demo.dart
+4
-2
date_picker_demo.dart
examples/flutter_gallery/lib/demo/date_picker_demo.dart
+12
-10
slider_demo.dart
examples/flutter_gallery/lib/demo/slider_demo.dart
+48
-46
time_picker_demo.dart
examples/flutter_gallery/lib/demo/time_picker_demo.dart
+13
-11
No files found.
examples/flutter_gallery/lib/demo/bottom_navigation_demo.dart
View file @
f0b8c866
...
...
@@ -119,7 +119,7 @@ class _BottomNavigationDemoState extends State<BottomNavigationDemo>
});
}
Widget
_build
Body
()
{
Widget
_build
TransitionsStack
()
{
final
List
<
FadeTransition
>
transitions
=
<
FadeTransition
>[];
for
(
NavigationIconView
view
in
_navigationViews
)
...
...
@@ -175,7 +175,9 @@ class _BottomNavigationDemoState extends State<BottomNavigationDemo>
)
],
),
body:
_buildBody
(),
body:
new
Center
(
child:
_buildTransitionsStack
()
),
bottomNavigationBar:
botNavBar
,
);
}
...
...
examples/flutter_gallery/lib/demo/date_picker_demo.dart
View file @
f0b8c866
...
...
@@ -36,16 +36,18 @@ class _DatePickerDemoState extends State<DatePickerDemo> {
return
new
Scaffold
(
appBar:
new
AppBar
(
title:
new
Text
(
'Date picker'
)),
body:
new
Column
(
children:
<
Widget
>[
new
Text
(
new
DateFormat
.
yMMMd
().
format
(
_selectedDate
)),
new
SizedBox
(
height:
20.0
),
new
RaisedButton
(
onPressed:
_handleSelectDate
,
child:
new
Text
(
'SELECT DATE'
)
),
],
mainAxisAlignment:
MainAxisAlignment
.
center
body:
new
Center
(
child:
new
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
<
Widget
>[
new
Text
(
new
DateFormat
.
yMMMd
().
format
(
_selectedDate
)),
new
SizedBox
(
height:
20.0
),
new
RaisedButton
(
onPressed:
_handleSelectDate
,
child:
new
Text
(
'SELECT DATE'
)
),
],
),
)
);
}
...
...
examples/flutter_gallery/lib/demo/slider_demo.dart
View file @
f0b8c866
...
...
@@ -19,52 +19,54 @@ class _SliderDemoState extends State<SliderDemo> {
Widget
build
(
BuildContext
context
)
{
return
new
Scaffold
(
appBar:
new
AppBar
(
title:
new
Text
(
'Sliders'
)),
body:
new
Column
(
mainAxisAlignment:
MainAxisAlignment
.
spaceAround
,
children:
<
Widget
>[
new
Column
(
mainAxisSize:
MainAxisSize
.
min
,
children:
<
Widget
>
[
new
Slider
(
value:
_value
,
min:
0.0
,
max:
100.0
,
onChanged:
(
double
value
)
{
setState
(()
{
_value
=
value
;
});
}
),
new
Text
(
'Continuous'
),
]
),
new
Column
(
mainAxisSize:
MainAxisSize
.
min
,
children:
<
Widget
>
[
new
Slider
(
value:
0.25
,
onChanged:
null
),
new
Text
(
'Disabled'
),
]
),
new
Column
(
mainAxisSize:
MainAxisSize
.
min
,
children:
<
Widget
>
[
new
Slider
(
value:
_discreteValue
,
min:
0.0
,
max:
100.0
,
divisions:
5
,
label:
'
${_discreteValue.round()}
'
,
onChanged:
(
double
value
)
{
setState
(()
{
_discreteValue
=
value
;
});
}
),
new
Text
(
'Discrete'
),
]
),
]
)
body:
new
Center
(
child:
new
Column
(
mainAxisAlignment:
MainAxisAlignment
.
spaceAround
,
children:
<
Widget
>[
new
Column
(
mainAxisSize:
MainAxisSize
.
min
,
children:
<
Widget
>
[
new
Slider
(
value:
_value
,
min:
0.0
,
max:
100.0
,
onChanged:
(
double
value
)
{
setState
(()
{
_value
=
value
;
});
}
),
new
Text
(
'Continuous'
),
]
),
new
Column
(
mainAxisSize:
MainAxisSize
.
min
,
children:
<
Widget
>
[
new
Slider
(
value:
0.25
,
onChanged:
null
),
new
Text
(
'Disabled'
),
]
),
new
Column
(
mainAxisSize:
MainAxisSize
.
min
,
children:
<
Widget
>
[
new
Slider
(
value:
_discreteValue
,
min:
0.0
,
max:
100.0
,
divisions:
5
,
label:
'
${_discreteValue.round()}
'
,
onChanged:
(
double
value
)
{
setState
(()
{
_discreteValue
=
value
;
});
}
),
new
Text
(
'Discrete'
),
],
),
],
),
),
);
}
}
examples/flutter_gallery/lib/demo/time_picker_demo.dart
View file @
f0b8c866
...
...
@@ -32,17 +32,19 @@ class _TimePickerDemoState extends State<TimePickerDemo> {
Widget
build
(
BuildContext
context
)
{
return
new
Scaffold
(
appBar:
new
AppBar
(
title:
new
Text
(
'Time picker'
)),
body:
new
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
<
Widget
>[
new
Text
(
'
$_selectedTime
'
),
new
SizedBox
(
height:
20.0
),
new
RaisedButton
(
onPressed:
_handleSelectTime
,
child:
new
Text
(
'SELECT TIME'
)
),
]
)
body:
new
Center
(
child:
new
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
<
Widget
>[
new
Text
(
'
$_selectedTime
'
),
new
SizedBox
(
height:
20.0
),
new
RaisedButton
(
onPressed:
_handleSelectTime
,
child:
new
Text
(
'SELECT TIME'
)
),
],
),
),
);
}
}
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