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
56ccfc4e
Commit
56ccfc4e
authored
Nov 03, 2015
by
Hans Muller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ToolBar withSizeOffsets() is now withPadding()
parent
24d2e691
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
scaffold.dart
packages/flutter/lib/src/material/scaffold.dart
+4
-4
tool_bar.dart
packages/flutter/lib/src/material/tool_bar.dart
+5
-5
No files found.
packages/flutter/lib/src/material/scaffold.dart
View file @
56ccfc4e
...
...
@@ -48,15 +48,15 @@ class Scaffold extends StatelessComponent {
final
Widget
floatingActionButton
;
Widget
build
(
BuildContext
context
)
{
final
offsetToolBar
=
toolBar
?.
withSizeOffsets
(
new
EdgeDims
.
only
(
top:
ui
.
window
.
padding
.
top
));
final
ToolBar
paddedToolBar
=
toolBar
?.
withPadding
(
new
EdgeDims
.
only
(
top:
ui
.
window
.
padding
.
top
));
final
Widget
materialBody
=
body
!=
null
?
new
Material
(
child:
body
)
:
null
;
Widget
toolBarAndBody
;
if
(
offset
ToolBar
!=
null
&&
materialBody
!=
null
)
toolBarAndBody
=
new
CustomMultiChildLayout
(<
Widget
>[
materialBody
,
offset
ToolBar
],
if
(
padded
ToolBar
!=
null
&&
materialBody
!=
null
)
toolBarAndBody
=
new
CustomMultiChildLayout
(<
Widget
>[
materialBody
,
padded
ToolBar
],
delegate:
_toolBarAndBodyLayout
);
else
toolBarAndBody
=
offset
ToolBar
??
materialBody
;
toolBarAndBody
=
padded
ToolBar
??
materialBody
;
final
List
<
Widget
>
bottomColumnChildren
=
<
Widget
>[];
...
...
packages/flutter/lib/src/material/tool_bar.dart
View file @
56ccfc4e
...
...
@@ -21,7 +21,7 @@ class ToolBar extends StatelessComponent {
this
.
level
:
2
,
this
.
backgroundColor
,
this
.
textTheme
,
this
.
sizeOffsets
:
EdgeDims
.
zero
this
.
padding
:
EdgeDims
.
zero
})
:
super
(
key:
key
);
final
Widget
left
;
...
...
@@ -31,9 +31,9 @@ class ToolBar extends StatelessComponent {
final
int
level
;
final
Color
backgroundColor
;
final
TextTheme
textTheme
;
final
EdgeDims
sizeOffsets
;
final
EdgeDims
padding
;
ToolBar
with
SizeOffsets
(
EdgeDims
offsets
)
{
ToolBar
with
Padding
(
EdgeDims
newPadding
)
{
return
new
ToolBar
(
key:
key
,
left:
left
,
...
...
@@ -43,7 +43,7 @@ class ToolBar extends StatelessComponent {
level:
level
,
backgroundColor:
backgroundColor
,
textTheme:
textTheme
,
sizeOffsets:
offsets
padding:
newPadding
);
}
...
...
@@ -99,7 +99,7 @@ class ToolBar extends StatelessComponent {
),
child:
new
DefaultTextStyle
(
style:
sideStyle
,
child:
new
Container
(
padding:
sizeOffsets
,
child:
new
Column
(
columnChildren
,
justifyContent:
FlexJustifyContent
.
collapse
))
child:
new
Container
(
padding:
padding
,
child:
new
Column
(
columnChildren
,
justifyContent:
FlexJustifyContent
.
collapse
))
)
);
...
...
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