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
23d38901
Unverified
Commit
23d38901
authored
Feb 12, 2019
by
Jonah Williams
Committed by
GitHub
Feb 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass method used to start flutter application (#27812)
parent
b47da6c2
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
3 deletions
+24
-3
daemon.md
packages/flutter_tools/doc/daemon.md
+1
-1
attach.dart
packages/flutter_tools/lib/src/commands/attach.dart
+1
-0
daemon.dart
packages/flutter_tools/lib/src/commands/daemon.dart
+20
-1
daemon_client.dart
packages/flutter_tools/tool/daemon_client.dart
+2
-1
No files found.
packages/flutter_tools/doc/daemon.md
View file @
23d38901
...
...
@@ -109,7 +109,7 @@ The `stop()` command takes one parameter, `appId`. It returns a `bool` to indica
#### app.start
This is sent when an app is starting. The
`params`
field will be a map with the fields
`appId`
,
`directory`
,
and
`deviceId
`
.
This is sent when an app is starting. The
`params`
field will be a map with the fields
`appId`
,
`directory`
,
`deviceId`
, and
`launchMode
`
.
#### app.debugPort
...
...
packages/flutter_tools/lib/src/commands/attach.dart
View file @
23d38901
...
...
@@ -221,6 +221,7 @@ class AttachCommand extends FlutterCommand {
null
,
true
,
fs
.
currentDirectory
,
LaunchMode
.
attach
,
);
}
catch
(
error
)
{
throwToolExit
(
error
.
toString
());
...
...
packages/flutter_tools/lib/src/commands/daemon.dart
View file @
23d38901
...
...
@@ -400,6 +400,7 @@ class AppDomain extends Domain {
projectDirectory
,
enableHotReload
,
cwd
,
LaunchMode
.
run
,
);
}
...
...
@@ -409,7 +410,8 @@ class AppDomain extends Domain {
Device
device
,
String
projectDirectory
,
bool
enableHotReload
,
Directory
cwd
)
async
{
Directory
cwd
,
LaunchMode
launchMode
)
async
{
final
AppInstance
app
=
AppInstance
(
_getNewAppId
(),
runner:
runner
,
logToStdout:
daemon
.
logToStdout
);
_apps
.
add
(
app
);
...
...
@@ -417,6 +419,7 @@ class AppDomain extends Domain {
'deviceId'
:
device
.
id
,
'directory'
:
projectDirectory
,
'supportsRestart'
:
isRestartSupported
(
enableHotReload
,
device
),
'launchMode'
:
launchMode
.
toString
(),
});
Completer
<
DebugConnectionInfo
>
connectionInfoCompleter
;
...
...
@@ -1021,3 +1024,19 @@ class LogMessage {
final
String
message
;
final
StackTrace
stackTrace
;
}
/// The method by which the flutter app was launched.
class
LaunchMode
{
const
LaunchMode
.
_
(
this
.
_value
);
/// The app was launched via `flutter run`.
static
const
LaunchMode
run
=
LaunchMode
.
_
(
'run'
);
/// The app was launched via `flutter attach`.
static
const
LaunchMode
attach
=
LaunchMode
.
_
(
'attach'
);
final
String
_value
;
@override
String
toString
()
=>
_value
;
}
packages/flutter_tools/tool/daemon_client.dart
View file @
23d38901
...
...
@@ -42,7 +42,8 @@ Future<void> main() async {
'method'
:
'app.start'
,
'params'
:
<
String
,
dynamic
>
{
'deviceId'
:
words
[
1
],
'projectDirectory'
:
words
[
2
]
'projectDirectory'
:
words
[
2
],
'launchMode'
:
words
[
3
],
}
});
}
else
if
(
words
.
first
==
'stop'
)
{
...
...
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