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
3572a7e8
Unverified
Commit
3572a7e8
authored
Aug 17, 2021
by
Zachary Anderson
Committed by
GitHub
Aug 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "feat: migrate base/dds.dart to null-safety (#88015)" (#88367)
parent
9e3de9a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
dds.dart
packages/flutter_tools/lib/src/base/dds.dart
+9
-7
No files found.
packages/flutter_tools/lib/src/base/dds.dart
View file @
3572a7e8
...
...
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.8
import
'dart:async'
;
import
'package:dds/dds.dart'
as
dds
;
...
...
@@ -22,10 +24,10 @@ Future<dds.DartDevelopmentService> Function(
/// Helper class to launch a [dds.DartDevelopmentService]. Allows for us to
/// mock out this functionality for testing purposes.
class
DartDevelopmentService
{
dds
.
DartDevelopmentService
?
_ddsInstance
;
dds
.
DartDevelopmentService
_ddsInstance
;
Uri
?
get
uri
=>
_ddsInstance
?.
uri
??
_existingDdsUri
;
Uri
?
_existingDdsUri
;
Uri
get
uri
=>
_ddsInstance
?.
uri
??
_existingDdsUri
;
Uri
_existingDdsUri
;
Future
<
void
>
get
done
=>
_completer
.
future
;
final
Completer
<
void
>
_completer
=
Completer
<
void
>();
...
...
@@ -35,7 +37,7 @@ class DartDevelopmentService {
int
hostPort
,
bool
ipv6
,
bool
disableServiceAuthCodes
,
{
required
Logger
logger
,
@
required
Logger
logger
,
})
async
{
final
Uri
ddsUri
=
Uri
(
scheme:
'http'
,
...
...
@@ -43,7 +45,7 @@ class DartDevelopmentService {
io
.
InternetAddress
.
loopbackIPv6
:
io
.
InternetAddress
.
loopbackIPv4
).
host
,
port:
hostPort
,
port:
hostPort
??
0
,
);
logger
.
printTrace
(
'Launching a Dart Developer Service (DDS) instance at
$ddsUri
, '
...
...
@@ -56,12 +58,12 @@ class DartDevelopmentService {
enableAuthCodes:
!
disableServiceAuthCodes
,
ipv6:
ipv6
,
);
unawaited
(
_ddsInstance
?
.
done
.
whenComplete
(()
{
unawaited
(
_ddsInstance
.
done
.
whenComplete
(()
{
if
(!
_completer
.
isCompleted
)
{
_completer
.
complete
();
}
}));
logger
.
printTrace
(
'DDS is listening at
${_ddsInstance
?
.uri}
.'
);
logger
.
printTrace
(
'DDS is listening at
${_ddsInstance.uri}
.'
);
}
on
dds
.
DartDevelopmentServiceException
catch
(
e
)
{
logger
.
printTrace
(
'Warning: Failed to start DDS:
${e.message}
'
);
if
(
e
.
errorCode
==
dds
.
DartDevelopmentServiceException
.
existingDdsInstanceError
)
{
...
...
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