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
2d0d1645
Commit
2d0d1645
authored
Oct 06, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1503 from abarth/simplify_scaffold
Simplify Scaffold
parents
932626aa
89a09822
Changes
24
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
99 additions
and
258 deletions
+99
-258
main.dart
examples/address_book/lib/main.dart
+1
-1
main.dart
examples/demo_launcher/lib/main.dart
+1
-1
feed.dart
examples/fitness/lib/feed.dart
+1
-1
meal.dart
examples/fitness/lib/meal.dart
+1
-1
measurement.dart
examples/fitness/lib/measurement.dart
+1
-1
settings.dart
examples/fitness/lib/settings.dart
+1
-1
main.dart
examples/mine_digger/lib/main.dart
+1
-1
stock_home.dart
examples/stocks/lib/stock_home.dart
+1
-1
stock_settings.dart
examples/stocks/lib/stock_settings.dart
+1
-1
stock_symbol_viewer.dart
examples/stocks/lib/stock_symbol_viewer.dart
+1
-1
card_collection.dart
examples/widgets/card_collection.dart
+1
-1
date_picker.dart
examples/widgets/date_picker.dart
+1
-1
drag_and_drop.dart
examples/widgets/drag_and_drop.dart
+1
-1
ensure_visible.dart
examples/widgets/ensure_visible.dart
+1
-1
overlay_geometry.dart
examples/widgets/overlay_geometry.dart
+1
-1
pageable_list.dart
examples/widgets/pageable_list.dart
+1
-1
progress_indicator.dart
examples/widgets/progress_indicator.dart
+1
-1
scale.dart
examples/widgets/scale.dart
+1
-1
sector.dart
examples/widgets/sector.dart
+1
-1
styled_text.dart
examples/widgets/styled_text.dart
+1
-1
tabs.dart
examples/widgets/tabs.dart
+1
-1
constants.dart
packages/flutter/lib/src/material/constants.dart
+1
-0
scaffold.dart
packages/flutter/lib/src/widgets/scaffold.dart
+74
-233
snack_bar.dart
packages/flutter/lib/src/widgets/snack_bar.dart
+3
-4
No files found.
examples/address_book/lib/main.dart
View file @
2d0d1645
...
...
@@ -81,7 +81,7 @@ class AddressBookHome extends StatelessComponent {
Widget
build
(
BuildContext
context
)
{
return
new
Scaffold
(
tool
b
ar:
buildToolBar
(
context
),
tool
B
ar:
buildToolBar
(
context
),
body:
buildBody
(
context
),
floatingActionButton:
buildFloatingActionButton
(
context
)
);
...
...
examples/demo_launcher/lib/main.dart
View file @
2d0d1645
...
...
@@ -192,7 +192,7 @@ final ThemeData _theme = new ThemeData(
class
DemoHome
extends
StatelessComponent
{
Widget
build
(
BuildContext
context
)
{
return
new
Scaffold
(
tool
b
ar:
new
ToolBar
(
center:
new
Text
(
'Sky Demos'
)),
tool
B
ar:
new
ToolBar
(
center:
new
Text
(
'Sky Demos'
)),
body:
new
Material
(
type:
MaterialType
.
canvas
,
child:
new
DemoList
()
...
...
examples/fitness/lib/feed.dart
View file @
2d0d1645
...
...
@@ -219,7 +219,7 @@ class FeedFragmentState extends State<FeedFragment> {
Widget
build
(
BuildContext
context
)
{
return
new
Scaffold
(
tool
b
ar:
buildToolBar
(),
tool
B
ar:
buildToolBar
(),
body:
buildBody
(),
snackBar:
new
Placeholder
(
key:
_snackBarPlaceholderKey
),
floatingActionButton:
buildFloatingActionButton
()
...
...
examples/fitness/lib/meal.dart
View file @
2d0d1645
...
...
@@ -105,7 +105,7 @@ class MealFragmentState extends State<MealFragment> {
Widget
build
(
BuildContext
context
)
{
return
new
Scaffold
(
tool
b
ar:
buildToolBar
(),
tool
B
ar:
buildToolBar
(),
body:
buildBody
()
);
}
...
...
examples/fitness/lib/measurement.dart
View file @
2d0d1645
...
...
@@ -200,7 +200,7 @@ class MeasurementFragmentState extends State<MeasurementFragment> {
Widget
build
(
BuildContext
context
)
{
return
new
Scaffold
(
tool
b
ar:
buildToolBar
(),
tool
B
ar:
buildToolBar
(),
body:
buildBody
(
context
),
snackBar:
new
Placeholder
(
key:
_snackBarPlaceholderKey
)
);
...
...
examples/fitness/lib/settings.dart
View file @
2d0d1645
...
...
@@ -122,7 +122,7 @@ class SettingsFragmentState extends State<SettingsFragment> {
Widget
build
(
BuildContext
context
)
{
return
new
Scaffold
(
tool
b
ar:
buildToolBar
(),
tool
B
ar:
buildToolBar
(),
body:
buildSettingsPane
(
context
)
);
}
...
...
examples/mine_digger/lib/main.dart
View file @
2d0d1645
...
...
@@ -182,7 +182,7 @@ class MineDiggerState extends State<MineDigger> {
return
new
Title
(
title:
'Mine Digger'
,
child:
new
Scaffold
(
tool
b
ar:
buildToolBar
(
context
),
tool
B
ar:
buildToolBar
(
context
),
body:
new
Container
(
child:
new
Center
(
child:
board
),
decoration:
new
BoxDecoration
(
backgroundColor:
Colors
.
grey
[
50
])
...
...
examples/stocks/lib/stock_home.dart
View file @
2d0d1645
...
...
@@ -238,7 +238,7 @@ class StockHomeState extends State<StockHome> {
Widget
build
(
BuildContext
context
)
{
return
new
Scaffold
(
tool
b
ar:
_isSearching
?
buildSearchBar
()
:
buildToolBar
(),
tool
B
ar:
_isSearching
?
buildSearchBar
()
:
buildToolBar
(),
body:
buildTabNavigator
(),
snackBar:
new
Placeholder
(
key:
_snackBarPlaceholderKey
),
floatingActionButton:
buildFloatingActionButton
()
...
...
examples/stocks/lib/stock_settings.dart
View file @
2d0d1645
...
...
@@ -119,7 +119,7 @@ class StockSettingsState extends State<StockSettings> {
Widget
build
(
BuildContext
context
)
{
return
new
Scaffold
(
tool
b
ar:
buildToolBar
(
context
),
tool
B
ar:
buildToolBar
(
context
),
body:
buildSettingsPane
(
context
)
);
}
...
...
examples/stocks/lib/stock_symbol_viewer.dart
View file @
2d0d1645
...
...
@@ -25,7 +25,7 @@ class StockSymbolViewerState extends State<StockSymbolViewer> {
TextStyle
headings
=
Theme
.
of
(
context
).
text
.
body2
;
return
new
Scaffold
(
tool
b
ar:
new
ToolBar
(
tool
B
ar:
new
ToolBar
(
left:
new
IconButton
(
icon:
'navigation/arrow_back'
,
onPressed:
config
.
navigator
.
pop
...
...
examples/widgets/card_collection.dart
View file @
2d0d1645
...
...
@@ -342,7 +342,7 @@ class CardCollectionState extends State<CardCollection> {
}
return
new
Scaffold
(
tool
b
ar:
buildToolBar
(),
tool
B
ar:
buildToolBar
(),
body:
body
);
}
...
...
examples/widgets/date_picker.dart
View file @
2d0d1645
...
...
@@ -34,7 +34,7 @@ class DatePickerDemoState extends State<DatePickerDemo> {
),
child:
new
Stack
([
new
Scaffold
(
tool
b
ar:
new
ToolBar
(
center:
new
Text
(
"Date Picker"
)),
tool
B
ar:
new
ToolBar
(
center:
new
Text
(
"Date Picker"
)),
body:
new
Material
(
child:
new
Row
(
[
new
Text
(
_dateTime
.
toString
())],
...
...
examples/widgets/drag_and_drop.dart
View file @
2d0d1645
...
...
@@ -101,7 +101,7 @@ class DragAndDropApp extends StatefulComponent {
class
DragAndDropAppState
extends
State
<
DragAndDropApp
>
{
Widget
build
(
BuildContext
context
)
{
return
new
Scaffold
(
tool
b
ar:
new
ToolBar
(
tool
B
ar:
new
ToolBar
(
center:
new
Text
(
'Drag and Drop Flutter Demo'
)
),
body:
new
Material
(
...
...
examples/widgets/ensure_visible.dart
View file @
2d0d1645
...
...
@@ -89,7 +89,7 @@ class EnsureVisibleApp extends App {
child:
new
Title
(
title:
'Cards'
,
child:
new
Scaffold
(
tool
b
ar:
new
ToolBar
(
center:
new
Text
(
'Tap a Card'
)),
tool
B
ar:
new
ToolBar
(
center:
new
Text
(
'Tap a Card'
)),
body:
cardCollection
)
)
...
...
examples/widgets/overlay_geometry.dart
View file @
2d0d1645
...
...
@@ -138,7 +138,7 @@ class OverlayGeometryAppState extends State<OverlayGeometryApp> {
Widget
build
(
BuildContext
context
)
{
List
<
Widget
>
layers
=
<
Widget
>[
new
Scaffold
(
tool
b
ar:
new
ToolBar
(
center:
new
Text
(
'Tap a Card'
)),
tool
B
ar:
new
ToolBar
(
center:
new
Text
(
'Tap a Card'
)),
body:
new
Container
(
padding:
const
EdgeDims
.
symmetric
(
vertical:
12.0
,
horizontal:
8.0
),
decoration:
new
BoxDecoration
(
backgroundColor:
Theme
.
of
(
context
).
primarySwatch
[
50
]),
...
...
examples/widgets/pageable_list.dart
View file @
2d0d1645
...
...
@@ -149,7 +149,7 @@ class PageableListAppState extends State<PageableListApp> {
return
new
IconTheme
(
data:
const
IconThemeData
(
color:
IconThemeColor
.
white
),
child:
new
Scaffold
(
tool
b
ar:
buildToolBar
(),
tool
B
ar:
buildToolBar
(),
body:
buildBody
(
context
)
)
);
...
...
examples/widgets/progress_indicator.dart
View file @
2d0d1645
...
...
@@ -103,7 +103,7 @@ class ProgressIndicatorAppState extends State<ProgressIndicatorApp> {
child:
new
Title
(
title:
'Progress Indicators'
,
child:
new
Scaffold
(
tool
b
ar:
new
ToolBar
(
center:
new
Text
(
'Progress Indicators'
)),
tool
B
ar:
new
ToolBar
(
center:
new
Text
(
'Progress Indicators'
)),
body:
new
DefaultTextStyle
(
style:
Theme
.
of
(
context
).
text
.
title
,
child:
body
...
...
examples/widgets/scale.dart
View file @
2d0d1645
...
...
@@ -59,7 +59,7 @@ class ScaleAppState extends State<ScaleApp> {
return
new
Theme
(
data:
new
ThemeData
.
dark
(),
child:
new
Scaffold
(
tool
b
ar:
new
ToolBar
(
tool
B
ar:
new
ToolBar
(
center:
new
Text
(
'Scale Demo'
)),
body:
new
Material
(
type:
MaterialType
.
canvas
,
...
...
examples/widgets/sector.dart
View file @
2d0d1645
...
...
@@ -124,7 +124,7 @@ class SectorApp extends App {
child:
new
Title
(
title:
'Sector Layout'
,
child:
new
Scaffold
(
tool
b
ar:
new
ToolBar
(
tool
B
ar:
new
ToolBar
(
center:
new
Text
(
'Sector Layout in a Widget Tree'
)
),
body:
buildBody
()
...
...
examples/widgets/styled_text.dart
View file @
2d0d1645
...
...
@@ -106,7 +106,7 @@ HAL: This mission is too important for me to allow you to jeopardize it.''';
color:
Colors
.
grey
[
50
],
child:
interactiveBody
),
tool
b
ar:
new
ToolBar
(
tool
B
ar:
new
ToolBar
(
center:
new
Text
(
'Hal and Dave'
)
)
)
...
...
examples/widgets/tabs.dart
View file @
2d0d1645
...
...
@@ -131,7 +131,7 @@ class TabbedNavigatorAppState extends State<TabbedNavigatorApp> {
);
return
new
Scaffold
(
tool
b
ar:
toolbar
,
tool
B
ar:
toolbar
,
body:
tabNavigator
);
}
...
...
packages/flutter/lib/src/material/constants.dart
View file @
2d0d1645
...
...
@@ -14,6 +14,7 @@ const double kStatusBarHeight = 50.0;
// Mobile Portrait: 56dp
// Tablet/Desktop: 64dp
const
double
kToolBarHeight
=
56.0
;
const
double
kSnackBarHeight
=
52.0
;
const
double
kMaterialDrawerHeight
=
140.0
;
const
double
kScrollbarSize
=
10.0
;
...
...
packages/flutter/lib/src/widgets/scaffold.dart
View file @
2d0d1645
This diff is collapsed.
Click to expand it.
packages/flutter/lib/src/widgets/snack_bar.dart
View file @
2d0d1645
...
...
@@ -15,7 +15,6 @@ import 'package:sky/src/widgets/placeholder.dart';
import
'package:sky/src/widgets/theme.dart'
;
import
'package:sky/src/widgets/transitions.dart'
;
const
double
_kSnackHeight
=
52.0
;
const
double
_kSideMargins
=
24.0
;
const
double
_kVerticalPadding
=
14.0
;
const
Color
_kSnackBackground
=
const
Color
(
0xFF323232
);
...
...
@@ -72,14 +71,14 @@ class SnackBar extends StatelessComponent {
performance:
performance
,
height:
new
AnimatedValue
<
double
>(
0.0
,
end:
_kSnack
Height
,
end:
kSnackBar
Height
,
curve:
easeIn
,
reverseCurve:
easeOut
),
child:
new
ClipRect
(
child:
new
OverflowBox
(
minHeight:
_kSnack
Height
,
maxHeight:
_kSnack
Height
,
minHeight:
kSnackBar
Height
,
maxHeight:
kSnackBar
Height
,
child:
new
Material
(
level:
2
,
color:
_kSnackBackground
,
...
...
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