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
54d76518
Commit
54d76518
authored
Nov 06, 2016
by
Jason Simmons
Committed by
Devon Carew
Nov 06, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Continue showing status messages after a startProgress completes (#6720)
parent
34fdc44b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
logger.dart
packages/flutter_tools/lib/src/base/logger.dart
+9
-2
No files found.
packages/flutter_tools/lib/src/base/logger.dart
View file @
54d76518
...
...
@@ -41,6 +41,8 @@ class Status {
void
cancel
()
{
}
}
typedef
void
_FinishCallback
(
);
class
StdoutLogger
extends
Logger
{
Status
_status
;
...
...
@@ -78,7 +80,7 @@ class StdoutLogger extends Logger {
return
new
Status
();
}
else
{
if
(
supportsColor
)
{
_status
=
new
_AnsiStatus
(
message
);
_status
=
new
_AnsiStatus
(
message
,
()
{
_status
=
null
;
}
);
return
_status
;
}
else
{
printStatus
(
message
);
...
...
@@ -223,7 +225,7 @@ class AnsiTerminal {
}
class
_AnsiStatus
extends
Status
{
_AnsiStatus
(
this
.
message
)
{
_AnsiStatus
(
this
.
message
,
this
.
onFinish
)
{
stopwatch
=
new
Stopwatch
()..
start
();
stdout
.
write
(
'
${message.padRight(51)}
'
);
...
...
@@ -235,6 +237,7 @@ class _AnsiStatus extends Status {
static
final
List
<
String
>
_progress
=
<
String
>[
'-'
,
r'\'
,
'|'
,
r'/'
,
'-'
,
r'\'
,
'|'
,
'/'
];
final
String
message
;
final
_FinishCallback
onFinish
;
Stopwatch
stopwatch
;
Timer
timer
;
int
index
=
1
;
...
...
@@ -247,6 +250,8 @@ class _AnsiStatus extends Status {
@override
void
stop
({
bool
showElapsedTime:
true
})
{
onFinish
();
if
(!
live
)
return
;
live
=
false
;
...
...
@@ -262,6 +267,8 @@ class _AnsiStatus extends Status {
@override
void
cancel
()
{
onFinish
();
if
(!
live
)
return
;
live
=
false
;
...
...
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