Files
sdk/pkg/dds/example/example.dart
T
Ben Konyi a527411e51 [ package:dds ] Add null safety support
Fixes https://github.com/dart-lang/sdk/issues/45756

TEST=service + DDS tests

Change-Id: I6dd14d7f9fdee479a830c3b053dc3b00aa635202
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199800
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2021-05-14 15:47:38 +00:00

25 lines
809 B
Dart

// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:dds/dds.dart';
import 'package:vm_service/vm_service_io.dart';
import '../test/common/test_helper.dart';
Future<void> main() async {
final process = await spawnDartProcess('../test/smoke.dart');
final dds = await DartDevelopmentService.startDartDevelopmentService(
remoteVmServiceUri,
);
// Connect to the DDS instance and make a request using package:vm_service.
final service = await vmServiceConnectUri(dds.wsUri.toString());
final version = await service.getVersion();
print('Service Version: $version');
await dds.shutdown();
process.kill();
}