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
c13a03fa
Commit
c13a03fa
authored
Aug 09, 2016
by
John McCutchan
Committed by
GitHub
Aug 09, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add analytics for hot reload events (#5300)
parent
8a58410b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
run.dart
packages/flutter_tools/lib/src/commands/run.dart
+4
-2
hot.dart
packages/flutter_tools/lib/src/hot.dart
+4
-0
No files found.
packages/flutter_tools/lib/src/commands/run.dart
View file @
c13a03fa
...
@@ -87,11 +87,13 @@ class RunCommand extends RunCommandBase {
...
@@ -87,11 +87,13 @@ class RunCommand extends RunCommandBase {
String
get
usagePath
{
String
get
usagePath
{
Device
device
=
deviceForCommand
;
Device
device
=
deviceForCommand
;
String
command
=
argResults
[
'hot'
]
?
'hotrun'
:
name
;
if
(
device
==
null
)
if
(
device
==
null
)
return
name
;
return
command
;
// Return 'run/ios'.
// Return 'run/ios'.
return
'
$
name
/
${getNameForTargetPlatform(device.platform)}
'
;
return
'
$
command
/
${getNameForTargetPlatform(device.platform)}
'
;
}
}
@override
@override
...
...
packages/flutter_tools/lib/src/hot.dart
View file @
c13a03fa
...
@@ -342,6 +342,7 @@ class HotRunner extends ResidentRunner {
...
@@ -342,6 +342,7 @@ class HotRunner extends ResidentRunner {
await
_launchFromDevFS
(
_package
,
_mainPath
);
await
_launchFromDevFS
(
_package
,
_mainPath
);
restartStatus
.
stop
(
showElapsedTime:
true
);
restartStatus
.
stop
(
showElapsedTime:
true
);
}
}
flutterUsage
.
sendEvent
(
'hot'
,
'restart'
);
}
}
/// Returns [true] if the reload was successful.
/// Returns [true] if the reload was successful.
...
@@ -373,7 +374,10 @@ class HotRunner extends ResidentRunner {
...
@@ -373,7 +374,10 @@ class HotRunner extends ResidentRunner {
reloadStatus
.
stop
(
showElapsedTime:
true
);
reloadStatus
.
stop
(
showElapsedTime:
true
);
if
(!
_printReloadReport
(
reloadReport
))
{
if
(!
_printReloadReport
(
reloadReport
))
{
// Reload failed.
// Reload failed.
flutterUsage
.
sendEvent
(
'hot'
,
'reload-reject'
);
return
false
;
return
false
;
}
else
{
flutterUsage
.
sendEvent
(
'hot'
,
'reload'
);
}
}
}
catch
(
errorMessage
)
{
}
catch
(
errorMessage
)
{
reloadStatus
.
stop
(
showElapsedTime:
true
);
reloadStatus
.
stop
(
showElapsedTime:
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