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
8382ca2c
Commit
8382ca2c
authored
Oct 19, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix analyzer warnings in examples
parent
734240db
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
6 deletions
+12
-6
flex.dart
examples/rendering/flex.dart
+2
-1
interactive_flex.dart
examples/rendering/interactive_flex.dart
+4
-2
render_paragraph.dart
examples/rendering/render_paragraph.dart
+4
-2
spinning_flex.dart
examples/rendering/spinning_flex.dart
+2
-1
No files found.
examples/rendering/flex.dart
View file @
8382ca2c
...
...
@@ -18,7 +18,8 @@ RenderBox buildFlexExample() {
void
addFlexChildSolidColor
(
RenderFlex
parent
,
ui
.
Color
backgroundColor
,
{
int
flex:
0
})
{
RenderSolidColorBox
child
=
new
RenderSolidColorBox
(
backgroundColor
);
parent
.
add
(
child
);
child
.
parentData
.
flex
=
flex
;
final
FlexParentData
childParentData
=
child
.
parentData
;
childParentData
.
flex
=
flex
;
}
// Yellow bar at top
...
...
examples/rendering/interactive_flex.dart
View file @
8382ca2c
...
...
@@ -49,7 +49,8 @@ void main() {
void
addFlexChildSolidColor
(
RenderFlex
parent
,
Color
backgroundColor
,
{
int
flex:
0
})
{
RenderSolidColorBox
child
=
new
RenderSolidColorBox
(
backgroundColor
);
parent
.
add
(
child
);
child
.
parentData
.
flex
=
flex
;
final
FlexParentData
childParentData
=
child
.
parentData
;
childParentData
.
flex
=
flex
;
}
var
row
=
new
RenderFlex
(
direction:
FlexDirection
.
horizontal
);
...
...
@@ -90,7 +91,8 @@ Pancetta meatball tongue tenderloin rump tail jowl boudin.""";
addFlexChildSolidColor
(
column
,
const
Color
(
0xFF0081C6
),
flex:
2
);
row
.
add
(
column
);
column
.
parentData
.
flex
=
8
;
final
FlexParentData
childParentData
=
column
.
parentData
;
childParentData
.
flex
=
8
;
RenderDecoratedBox
root
=
new
RenderDecoratedBox
(
decoration:
new
BoxDecoration
(
backgroundColor:
const
Color
(
0xFFFFFFFF
)),
...
...
examples/rendering/render_paragraph.dart
View file @
8382ca2c
...
...
@@ -16,7 +16,8 @@ void main() {
RenderObject
child
=
new
RenderSolidColorBox
(
const
Color
(
0xFFFFFF00
));
flexRoot
.
add
(
child
);
child
.
parentData
.
flex
=
2
;
FlexParentData
childParentData
=
child
.
parentData
;
childParentData
.
flex
=
2
;
// The internet is a beautiful place. https://baconipsum.com/
String
meatyString
=
"""Bacon ipsum dolor amet ham fatback tri-tip, prosciutto
...
...
@@ -33,7 +34,8 @@ Pancetta meatball tongue tenderloin rump tail jowl boudin.""";
child:
new
RenderParagraph
(
text
)
);
flexRoot
.
add
(
child
);
child
.
parentData
.
flex
=
1
;
childParentData
=
child
.
parentData
;
childParentData
.
flex
=
1
;
new
FlutterBinding
(
root:
root
);
}
examples/rendering/spinning_flex.dart
View file @
8382ca2c
...
...
@@ -18,7 +18,8 @@ void main() {
void
addFlexChildSolidColor
(
RenderFlex
parent
,
ui
.
Color
backgroundColor
,
{
int
flex:
0
})
{
RenderSolidColorBox
child
=
new
RenderSolidColorBox
(
backgroundColor
);
parent
.
add
(
child
);
child
.
parentData
.
flex
=
flex
;
final
FlexParentData
childParentData
=
child
.
parentData
;
childParentData
.
flex
=
flex
;
}
addFlexChildSolidColor
(
flexRoot
,
const
ui
.
Color
(
0xFFFF00FF
),
flex:
1
);
...
...
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