Pass URI converter from context to DDS (#106840)

* Pass URI converter from context to DDS

* Match change that will be merged

* Revert SDK web change
This commit is contained in:
Helin Shiah
2022-07-07 10:10:04 -07:00
committed by GitHub
parent b1410c2ce7
commit 118248bcc5
2 changed files with 44 additions and 3 deletions

View File

@@ -8,6 +8,7 @@ import 'package:dds/dds.dart' as dds;
import 'package:meta/meta.dart';
import 'common.dart';
import 'context.dart';
import 'io.dart' as io;
import 'logger.dart';
@@ -18,6 +19,7 @@ Future<dds.DartDevelopmentService> Function(
bool ipv6,
Uri? serviceUri,
List<String> cachedUserTags,
dds.UriConverter? uriConverter,
}) ddsLauncherCallback = dds.DartDevelopmentService.startDartDevelopmentService;
/// Helper class to launch a [dds.DartDevelopmentService]. Allows for us to
@@ -56,6 +58,7 @@ class DartDevelopmentService {
ipv6: ipv6 ?? false,
// Enables caching of CPU samples collected during application startup.
cachedUserTags: cacheStartupProfile ? const <String>['AppStartUp'] : const <String>[],
uriConverter: context.get<dds.UriConverter>(),
);
unawaited(_ddsInstance?.done.whenComplete(() {
if (!_completer.isCompleted) {