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
4728ef5c
Unverified
Commit
4728ef5c
authored
Sep 05, 2019
by
Jonah Williams
Committed by
GitHub
Sep 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle browser refresh (#39776)
parent
06348522
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
web_fs.dart
packages/flutter_tools/lib/src/build_runner/web_fs.dart
+11
-3
No files found.
packages/flutter_tools/lib/src/build_runner/web_fs.dart
View file @
4728ef5c
...
...
@@ -90,6 +90,7 @@ class WebFs {
final
Dwds
_dwds
;
final
Chrome
_chrome
;
final
BuildDaemonClient
_client
;
StreamSubscription
<
void
>
_connectedApps
;
static
const
String
_kHostName
=
'localhost'
;
...
...
@@ -98,13 +99,20 @@ class WebFs {
await
_dwds
.
stop
();
await
_server
.
close
(
force:
true
);
await
_chrome
.
close
();
await
_connectedApps
?.
cancel
();
}
/// Retrieve the [DebugConnection] for the current application.
Future
<
DebugConnection
>
runAndDebug
()
async
{
final
AppConnection
appConnection
=
await
_dwds
.
connectedApps
.
first
;
appConnection
.
runMain
();
return
_dwds
.
debugConnection
(
appConnection
);
final
Completer
<
DebugConnection
>
firstConnection
=
Completer
<
DebugConnection
>();
_connectedApps
=
_dwds
.
connectedApps
.
listen
((
AppConnection
appConnection
)
async
{
appConnection
.
runMain
();
final
DebugConnection
debugConnection
=
await
_dwds
.
debugConnection
(
appConnection
);
if
(!
firstConnection
.
isCompleted
)
{
firstConnection
.
complete
(
debugConnection
);
}
});
return
firstConnection
.
future
;
}
/// Perform a hard refresh of all connected browser tabs.
...
...
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