Skip to content

Commit 3d124d2

Browse files
migrate host agent (flutter#84755)
1 parent a2fa6d4 commit 3d124d2

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

dev/devicelab/lib/framework/host_agent.dart

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// @dart = 2.8
6-
75
import 'package:file/file.dart';
86
import 'package:file/local.dart';
97
import 'package:meta/meta.dart';
@@ -14,27 +12,27 @@ HostAgent get hostAgent => HostAgent(platform: const LocalPlatform(), fileSystem
1412

1513
/// Host machine running the tests.
1614
class HostAgent {
17-
HostAgent({@required Platform platform, @required FileSystem fileSystem})
15+
HostAgent({required Platform platform, required FileSystem fileSystem})
1816
: _platform = platform,
1917
_fileSystem = fileSystem;
2018

2119
final Platform _platform;
2220
final FileSystem _fileSystem;
2321

2422
/// Creates a directory to dump file artifacts.
25-
Directory/*?*/ get dumpDirectory {
23+
Directory? get dumpDirectory {
2624
if (_dumpDirectory == null) {
2725
// Set in LUCI recipe.
28-
final String directoryPath = _platform.environment['FLUTTER_LOGS_DIR'];
26+
final String? directoryPath = _platform.environment['FLUTTER_LOGS_DIR'];
2927
if (directoryPath != null) {
3028
_dumpDirectory = _fileSystem.directory(directoryPath)..createSync(recursive: true);
31-
print('Found FLUTTER_LOGS_DIR dump directory ${_dumpDirectory.path}');
29+
print('Found FLUTTER_LOGS_DIR dump directory ${_dumpDirectory?.path}');
3230
}
3331
}
3432
return _dumpDirectory;
3533
}
3634

37-
static Directory/*?*/ _dumpDirectory;
35+
static Directory? _dumpDirectory;
3836

3937
@visibleForTesting
4038
void resetDumpDirectory() {

0 commit comments

Comments
 (0)