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
f7d50102
Commit
f7d50102
authored
Sep 27, 2016
by
Devon Carew
Committed by
GitHub
Sep 27, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
share a common default for enabling hot reload (#6081)
parent
c5567a5f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
daemon.dart
packages/flutter_tools/lib/src/commands/daemon.dart
+3
-3
run.dart
packages/flutter_tools/lib/src/commands/run.dart
+1
-1
hot.dart
packages/flutter_tools/lib/src/hot.dart
+2
-0
No files found.
packages/flutter_tools/lib/src/commands/daemon.dart
View file @
f7d50102
...
...
@@ -293,7 +293,7 @@ class AppDomain extends Domain {
String
route
=
_getStringArg
(
args
,
'route'
);
String
mode
=
_getStringArg
(
args
,
'mode'
);
String
target
=
_getStringArg
(
args
,
'target'
);
bool
hotMode
=
_getBoolArg
(
args
,
'hot'
)
??
false
;
bool
enableHotReload
=
_getBoolArg
(
args
,
'hot'
)
??
kHotReloadDefault
;
Device
device
=
daemon
.
deviceDomain
.
_getOrLocateDevice
(
deviceId
);
if
(
device
==
null
)
...
...
@@ -323,7 +323,7 @@ class AppDomain extends Domain {
ResidentRunner
runner
;
if
(
hotMode
)
{
if
(
enableHotReload
)
{
runner
=
new
HotRunner
(
device
,
target:
target
,
...
...
@@ -339,7 +339,7 @@ class AppDomain extends Domain {
);
}
bool
supportsRestart
=
hotMode
?
device
.
supportsHotMode
:
device
.
supportsRestart
;
bool
supportsRestart
=
enableHotReload
?
device
.
supportsHotMode
:
device
.
supportsRestart
;
AppInstance
app
=
new
AppInstance
(
_getNextAppId
(),
runner
);
_apps
.
add
(
app
);
...
...
packages/flutter_tools/lib/src/commands/run.dart
View file @
f7d50102
...
...
@@ -66,7 +66,7 @@ class RunCommand extends RunCommandBase {
// Option to enable hot reloading.
argParser
.
addFlag
(
'hot'
,
negatable:
true
,
defaultsTo:
true
,
defaultsTo:
kHotReloadDefault
,
help:
'Run with support for hot reloading.'
);
// Option to write the pid to a file.
...
...
packages/flutter_tools/lib/src/hot.dart
View file @
f7d50102
...
...
@@ -25,6 +25,8 @@ import 'vmservice.dart';
import
'resident_runner.dart'
;
import
'toolchain.dart'
;
const
bool
kHotReloadDefault
=
true
;
String
getDevFSLoaderScript
(
)
{
return
path
.
absolute
(
path
.
join
(
Cache
.
flutterRoot
,
'packages'
,
...
...
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