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
9209d132
Commit
9209d132
authored
Jan 27, 2016
by
Ian Hickson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1405 from Hixie/spin-bug
Resurrect spinning_mixed.
parents
b5470df8
a309cea1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
28 deletions
+32
-28
spinning_mixed.dart
examples/widgets/spinning_mixed.dart
+24
-23
debug.dart
packages/flutter/lib/src/material/debug.dart
+8
-5
No files found.
examples/widgets/spinning_mixed.dart
View file @
9209d132
...
...
@@ -40,27 +40,28 @@ void attachWidgetTreeToRenderTree(RenderProxyBox container) {
child:
new
Column
(
children:
<
Widget
>[
new
Rectangle
(
const
Color
(
0xFF00FFFF
)),
new
Container
(
padding:
new
EdgeDims
.
all
(
10.0
),
margin:
new
EdgeDims
.
all
(
10.0
),
decoration:
new
BoxDecoration
(
backgroundColor:
const
Color
(
0xFFCCCCCC
)),
child:
new
Row
(
children:
<
Widget
>[
new
RaisedButton
(
child:
new
Row
(
children:
<
Widget
>[
new
NetworkImage
(
src:
"http://flutter.io/favicon.ico"
),
new
Text
(
'PRESS ME'
),
]
new
Material
(
child:
new
Container
(
padding:
new
EdgeDims
.
all
(
10.0
),
margin:
new
EdgeDims
.
all
(
10.0
),
child:
new
Row
(
children:
<
Widget
>[
new
RaisedButton
(
child:
new
Row
(
children:
<
Widget
>[
new
NetworkImage
(
src:
"http://flutter.io/favicon.ico"
),
new
Text
(
'PRESS ME'
),
]
),
onPressed:
()
{
value
=
value
==
null
?
0.1
:
(
value
+
0.1
)
%
1.0
;
attachWidgetTreeToRenderTree
(
container
);
}
),
onPressed:
()
{
value
=
value
==
null
?
0.1
:
(
value
+
0.1
)
%
1.0
;
attachWidgetTreeToRenderTree
(
container
);
}
),
new
CircularProgressIndicator
(
value:
value
),
],
justifyContent:
FlexJustifyContent
.
spaceAround
new
CircularProgressIndicator
(
value:
value
),
],
justifyContent:
FlexJustifyContent
.
spaceAround
)
)
),
new
Rectangle
(
const
Color
(
0xFFFFFF00
)),
...
...
@@ -86,6 +87,7 @@ void rotate(Duration timeStamp) {
}
void
main
(
)
{
WidgetFlutterBinding
.
ensureInitialized
();
RenderProxyBox
proxy
=
new
RenderProxyBox
();
attachWidgetTreeToRenderTree
(
proxy
);
...
...
@@ -97,7 +99,6 @@ void main() {
transformBox
=
new
RenderTransform
(
child:
flexRoot
,
transform:
new
Matrix4
.
identity
());
RenderPadding
root
=
new
RenderPadding
(
padding:
new
EdgeDims
.
all
(
80.0
),
child:
transformBox
);
WidgetFlutterBinding
.
ensureInitialized
()
..
renderView
.
child
=
root
..
addPersistentFrameCallback
(
rotate
);
WidgetFlutterBinding
.
instance
.
renderView
.
child
=
root
;
WidgetFlutterBinding
.
instance
.
addPersistentFrameCallback
(
rotate
);
}
packages/flutter/lib/src/material/debug.dart
View file @
9209d132
...
...
@@ -8,11 +8,14 @@ import 'material.dart';
bool
debugCheckHasMaterial
(
BuildContext
context
)
{
assert
(()
{
if
(
context
.
widget
is
Material
||
context
.
ancestorWidgetOfExactType
(
Material
)
!=
null
)
return
true
;
Element
element
=
context
;
debugPrint
(
'
${context.widget}
needs to be placed inside a Material widget. Ownership chain:
\n
${element.debugGetOwnershipChain(10)}
'
);
return
false
;
if
(
context
.
widget
is
!
Material
&&
context
.
ancestorWidgetOfExactType
(
Material
)
==
null
)
{
Element
element
=
context
;
throw
new
WidgetError
(
'Missing Material widget.'
,
'
${context.widget}
needs to be placed inside a Material widget. Ownership chain:
\n
${element.debugGetOwnershipChain(10)}
'
);
}
return
true
;
});
return
true
;
}
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