@@ -21,6 +21,7 @@ import '../base/process.dart';
2121import '../build_info.dart' ;
2222import '../cache.dart' ;
2323import '../compile.dart' ;
24+ import '../context/tool_context.dart' ;
2425import '../convert.dart' ;
2526import '../dart/language_version.dart' ;
2627import '../device.dart' ;
@@ -54,29 +55,30 @@ typedef PlatformPluginRegistration = void Function(FlutterPlatform platform);
5455/// (that is, one Dart file with a `*_test.dart` file name and a single `void
5556/// main()`), you can set a VM Service port explicitly.
5657FlutterPlatform installHook ({
57- TestWrapper testWrapper = const TestWrapper (),
58- required String flutterTesterBinPath,
59- required DebuggingOptions debuggingOptions,
6058 required BuildInfo buildInfo,
61- required FileSystem fileSystem,
62- required Logger logger,
63- required ProcessManager processManager,
64- TestWatcher ? watcher,
59+ required DebuggingOptions debuggingOptions,
60+ required String flutterTesterBinPath,
6561 bool enableVmService = false ,
66- bool machine = false ,
67- String ? precompiledDillPath,
68- Map <String , String >? precompiledDillFiles,
69- bool updateGoldens = false ,
70- String ? testAssetDirectory,
71- InternetAddressType serverType = InternetAddressType .IPv4 ,
72- Uri ? projectRootDirectory,
62+ FileSystem ? fileSystem,
7363 FlutterProject ? flutterProject,
7464 String ? icudtlPath,
75- PlatformPluginRegistration ? platformPluginRegistration,
7665 Device ? integrationTestDevice,
7766 String ? integrationTestUserIdentifier,
78- TestTimeRecorder ? testTimeRecorder,
67+ Logger ? logger,
68+ bool machine = false ,
7969 TestCompilerNativeAssetsBuilder ? nativeAssetsBuilder,
70+ PlatformPluginRegistration ? platformPluginRegistration,
71+ Map <String , String >? precompiledDillFiles,
72+ String ? precompiledDillPath,
73+ ProcessManager ? processManager,
74+ Uri ? projectRootDirectory,
75+ InternetAddressType serverType = .IPv4 ,
76+ String ? testAssetDirectory,
77+ TestTimeRecorder ? testTimeRecorder,
78+ TestWrapper testWrapper = const TestWrapper (),
79+ ToolContext ? toolContext,
80+ bool updateGoldens = false ,
81+ TestWatcher ? watcher,
8082}) {
8183 assert (
8284 enableVmService ||
@@ -108,9 +110,9 @@ FlutterPlatform installHook({
108110 testTimeRecorder: testTimeRecorder,
109111 nativeAssetsBuilder: nativeAssetsBuilder,
110112 buildInfo: buildInfo,
111- fileSystem: fileSystem,
112- logger: logger,
113- processManager: processManager,
113+ fileSystem: fileSystem ?? toolContext ! .fs ,
114+ logger: logger ?? toolContext ! .logger ,
115+ processManager: processManager ?? toolContext ! .processManager ,
114116 );
115117 platformPluginRegistration (platform);
116118 return platform;
0 commit comments