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
86fbdd7d
Commit
86fbdd7d
authored
Dec 07, 2015
by
Ian Hickson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #793 from Hixie/performance-debugging
Debugging aids for overlays, performances
parents
f0ce2de9
7138a372
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
7 deletions
+55
-7
performance.dart
packages/flutter/lib/src/animation/performance.dart
+46
-6
overlay.dart
packages/flutter/lib/src/widgets/overlay.dart
+7
-0
transitions.dart
packages/flutter/lib/src/widgets/transitions.dart
+2
-1
No files found.
packages/flutter/lib/src/animation/performance.dart
View file @
86fbdd7d
...
...
@@ -53,6 +53,45 @@ abstract class PerformanceView {
/// Whether this animation is stopped at the end
bool
get
isCompleted
=>
status
==
PerformanceStatus
.
completed
;
String
toString
()
{
return
'
$runtimeType
(
${toStringDetails()}
)'
;
}
String
toStringDetails
()
{
assert
(
status
!=
null
);
assert
(
direction
!=
null
);
String
icon
;
switch
(
status
)
{
case
PerformanceStatus
.
forward
:
icon
=
'
\
u25B6'
;
// >
break
;
case
PerformanceStatus
.
reverse
:
icon
=
'
\
u25C0'
;
// <
break
;
case
PerformanceStatus
.
completed
:
switch
(
direction
)
{
case
AnimationDirection
.
forward
:
icon
=
'
\
u23ED'
;
// >>|
break
;
case
AnimationDirection
.
reverse
:
icon
=
'
\
u29CF'
;
// <|
break
;
}
break
;
case
PerformanceStatus
.
dismissed
:
switch
(
direction
)
{
case
AnimationDirection
.
forward
:
icon
=
'
\
u29D0'
;
// |>
break
;
case
AnimationDirection
.
reverse
:
icon
=
'
\
u23EE'
;
// |<<
break
;
}
break
;
}
assert
(
icon
!=
null
);
return
'
$icon
${progress.toStringAsFixed(3)}
'
;
}
}
class
AlwaysCompletePerformance
extends
PerformanceView
{
...
...
@@ -512,9 +551,9 @@ class Performance extends PerformanceView
SimulationStepper
_timeline
;
AnimationDirection
get
direction
=>
_direction
;
AnimationDirection
_direction
;
AnimationDirection
_direction
=
AnimationDirection
.
forward
;
AnimationDirection
get
curveDirection
=>
_curveDirection
;
AnimationDirection
_curveDirection
;
AnimationDirection
_curveDirection
=
AnimationDirection
.
forward
;
/// The progress of this performance along the timeline
///
...
...
@@ -624,10 +663,11 @@ class Performance extends PerformanceView
_checkStatusChanged
();
}
String
toString
()
{
if
(
debugLabel
!=
null
)
return
'
$runtimeType
at
$progress
for
$debugLabel
'
;
return
'
$runtimeType
at
$progress
'
;
String
toStringDetails
()
{
String
paused
=
_timeline
.
isAnimating
?
''
:
'; paused'
;
String
label
=
debugLabel
==
null
?
''
:
'; for
$debugLabel
'
;
String
more
=
super
.
toStringDetails
();
return
'
$more$paused$label
'
;
}
}
...
...
packages/flutter/lib/src/widgets/overlay.dart
View file @
86fbdd7d
...
...
@@ -34,6 +34,8 @@ class OverlayEntry {
// TODO(ianh): find a way to make this not rebuild the entire overlay
_state
?.
setState
(()
{});
}
String
toString
()
=>
'
$runtimeType
@
$hashCode
(opaque:
$opaque
)'
;
}
class
Overlay
extends
StatefulComponent
{
...
...
@@ -120,4 +122,9 @@ class OverlayState extends State<Overlay> {
return
new
Stack
(
backwardsChildren
.
reversed
.
toList
(
growable:
false
));
}
void
debugFillDescription
(
List
<
String
>
description
)
{
super
.
debugFillDescription
(
description
);
description
.
add
(
'entries:
$_entries
'
);
}
}
packages/flutter/lib/src/widgets/transitions.dart
View file @
86fbdd7d
...
...
@@ -209,7 +209,8 @@ class AlignTransition extends TransitionWithChild {
alignment:
alignment
?.
value
,
widthFactor:
widthFactor
?.
value
,
heightFactor:
heightFactor
?.
value
,
child:
child
);
child:
child
);
}
}
...
...
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