mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Remove unnecessary variables. (#86444)
This commit is contained in:
parent
497fc10656
commit
f25e4fea18
@ -411,8 +411,6 @@ known, it can be explicitly provided to attach via the command-line, e.g.
|
|||||||
|
|
||||||
final FlutterDevice flutterDevice = await FlutterDevice.create(
|
final FlutterDevice flutterDevice = await FlutterDevice.create(
|
||||||
device,
|
device,
|
||||||
fileSystemRoots: stringsArg(FlutterOptions.kFileSystemRoot),
|
|
||||||
fileSystemScheme: stringArg(FlutterOptions.kFileSystemScheme),
|
|
||||||
target: targetFile,
|
target: targetFile,
|
||||||
targetModel: TargetModel(stringArg('target-model')),
|
targetModel: TargetModel(stringArg('target-model')),
|
||||||
buildInfo: buildInfo,
|
buildInfo: buildInfo,
|
||||||
|
@ -616,8 +616,6 @@ class RunCommand extends RunCommandBase {
|
|||||||
for (final Device device in devices)
|
for (final Device device in devices)
|
||||||
await FlutterDevice.create(
|
await FlutterDevice.create(
|
||||||
device,
|
device,
|
||||||
fileSystemRoots: fileSystemRoots,
|
|
||||||
fileSystemScheme: fileSystemScheme,
|
|
||||||
experimentalFlags: expFlags,
|
experimentalFlags: expFlags,
|
||||||
target: targetFile,
|
target: targetFile,
|
||||||
buildInfo: buildInfo,
|
buildInfo: buildInfo,
|
||||||
|
@ -542,7 +542,7 @@ class DefaultResidentCompiler implements ResidentCompiler {
|
|||||||
this.testCompilation = false,
|
this.testCompilation = false,
|
||||||
this.trackWidgetCreation = true,
|
this.trackWidgetCreation = true,
|
||||||
this.packagesPath,
|
this.packagesPath,
|
||||||
this.fileSystemRoots = const <String>[],
|
List<String> fileSystemRoots = const <String>[],
|
||||||
this.fileSystemScheme,
|
this.fileSystemScheme,
|
||||||
this.initializeFromDill,
|
this.initializeFromDill,
|
||||||
this.targetModel = TargetModel.flutter,
|
this.targetModel = TargetModel.flutter,
|
||||||
@ -560,7 +560,9 @@ class DefaultResidentCompiler implements ResidentCompiler {
|
|||||||
_platform = platform,
|
_platform = platform,
|
||||||
dartDefines = dartDefines ?? const <String>[],
|
dartDefines = dartDefines ?? const <String>[],
|
||||||
// This is a URI, not a file path, so the forward slash is correct even on Windows.
|
// This is a URI, not a file path, so the forward slash is correct even on Windows.
|
||||||
sdkRoot = sdkRoot.endsWith('/') ? sdkRoot : '$sdkRoot/';
|
sdkRoot = sdkRoot.endsWith('/') ? sdkRoot : '$sdkRoot/',
|
||||||
|
// Make a copy, we might need to modify it later.
|
||||||
|
fileSystemRoots = List<String>.from(fileSystemRoots);
|
||||||
|
|
||||||
final Logger _logger;
|
final Logger _logger;
|
||||||
final ProcessManager _processManager;
|
final ProcessManager _processManager;
|
||||||
|
@ -47,8 +47,6 @@ class FlutterDevice {
|
|||||||
FlutterDevice(
|
FlutterDevice(
|
||||||
this.device, {
|
this.device, {
|
||||||
@required this.buildInfo,
|
@required this.buildInfo,
|
||||||
this.fileSystemRoots,
|
|
||||||
this.fileSystemScheme,
|
|
||||||
TargetModel targetModel = TargetModel.flutter,
|
TargetModel targetModel = TargetModel.flutter,
|
||||||
this.targetPlatform,
|
this.targetPlatform,
|
||||||
ResidentCompiler generator,
|
ResidentCompiler generator,
|
||||||
@ -62,8 +60,8 @@ class FlutterDevice {
|
|||||||
),
|
),
|
||||||
buildMode: buildInfo.mode,
|
buildMode: buildInfo.mode,
|
||||||
trackWidgetCreation: buildInfo.trackWidgetCreation,
|
trackWidgetCreation: buildInfo.trackWidgetCreation,
|
||||||
fileSystemRoots: fileSystemRoots ?? <String>[],
|
fileSystemRoots: buildInfo.fileSystemRoots ?? <String>[],
|
||||||
fileSystemScheme: fileSystemScheme,
|
fileSystemScheme: buildInfo.fileSystemScheme,
|
||||||
targetModel: targetModel,
|
targetModel: targetModel,
|
||||||
dartDefines: buildInfo.dartDefines,
|
dartDefines: buildInfo.dartDefines,
|
||||||
packagesPath: buildInfo.packagesPath,
|
packagesPath: buildInfo.packagesPath,
|
||||||
@ -81,8 +79,6 @@ class FlutterDevice {
|
|||||||
@required String target,
|
@required String target,
|
||||||
@required BuildInfo buildInfo,
|
@required BuildInfo buildInfo,
|
||||||
@required Platform platform,
|
@required Platform platform,
|
||||||
List<String> fileSystemRoots,
|
|
||||||
String fileSystemScheme,
|
|
||||||
TargetModel targetModel = TargetModel.flutter,
|
TargetModel targetModel = TargetModel.flutter,
|
||||||
List<String> experimentalFlags,
|
List<String> experimentalFlags,
|
||||||
ResidentCompiler generator,
|
ResidentCompiler generator,
|
||||||
@ -121,7 +117,7 @@ class FlutterDevice {
|
|||||||
globals.artifacts.getHostArtifact(HostArtifact.flutterWebSdk).path,
|
globals.artifacts.getHostArtifact(HostArtifact.flutterWebSdk).path,
|
||||||
buildMode: buildInfo.mode,
|
buildMode: buildInfo.mode,
|
||||||
trackWidgetCreation: buildInfo.trackWidgetCreation,
|
trackWidgetCreation: buildInfo.trackWidgetCreation,
|
||||||
fileSystemRoots: fileSystemRoots ?? <String>[],
|
fileSystemRoots: buildInfo.fileSystemRoots ?? <String>[],
|
||||||
// Override the filesystem scheme so that the frontend_server can find
|
// Override the filesystem scheme so that the frontend_server can find
|
||||||
// the generated entrypoint code.
|
// the generated entrypoint code.
|
||||||
fileSystemScheme: 'org-dartlang-app',
|
fileSystemScheme: 'org-dartlang-app',
|
||||||
@ -162,8 +158,8 @@ class FlutterDevice {
|
|||||||
),
|
),
|
||||||
buildMode: buildInfo.mode,
|
buildMode: buildInfo.mode,
|
||||||
trackWidgetCreation: buildInfo.trackWidgetCreation,
|
trackWidgetCreation: buildInfo.trackWidgetCreation,
|
||||||
fileSystemRoots: fileSystemRoots,
|
fileSystemRoots: buildInfo.fileSystemRoots,
|
||||||
fileSystemScheme: fileSystemScheme,
|
fileSystemScheme: buildInfo.fileSystemScheme,
|
||||||
targetModel: targetModel,
|
targetModel: targetModel,
|
||||||
dartDefines: buildInfo.dartDefines,
|
dartDefines: buildInfo.dartDefines,
|
||||||
extraFrontEndOptions: extraFrontEndOptions,
|
extraFrontEndOptions: extraFrontEndOptions,
|
||||||
@ -183,8 +179,6 @@ class FlutterDevice {
|
|||||||
|
|
||||||
return FlutterDevice(
|
return FlutterDevice(
|
||||||
device,
|
device,
|
||||||
fileSystemRoots: fileSystemRoots,
|
|
||||||
fileSystemScheme:fileSystemScheme,
|
|
||||||
targetModel: targetModel,
|
targetModel: targetModel,
|
||||||
targetPlatform: targetPlatform,
|
targetPlatform: targetPlatform,
|
||||||
generator: generator,
|
generator: generator,
|
||||||
@ -204,8 +198,6 @@ class FlutterDevice {
|
|||||||
FlutterVmService vmService;
|
FlutterVmService vmService;
|
||||||
DevFS devFS;
|
DevFS devFS;
|
||||||
ApplicationPackage package;
|
ApplicationPackage package;
|
||||||
List<String> fileSystemRoots;
|
|
||||||
String fileSystemScheme;
|
|
||||||
StreamSubscription<String> _loggingSubscription;
|
StreamSubscription<String> _loggingSubscription;
|
||||||
bool _isListeningForObservatoryUri;
|
bool _isListeningForObservatoryUri;
|
||||||
|
|
||||||
|
@ -197,8 +197,8 @@ void main() {
|
|||||||
// output dill, filesystem scheme, and filesystem root.
|
// output dill, filesystem scheme, and filesystem root.
|
||||||
final FlutterDevice flutterDevice = hotRunnerFactory.devices.first;
|
final FlutterDevice flutterDevice = hotRunnerFactory.devices.first;
|
||||||
|
|
||||||
expect(flutterDevice.fileSystemScheme, filesystemScheme);
|
expect(flutterDevice.buildInfo.fileSystemScheme, filesystemScheme);
|
||||||
expect(flutterDevice.fileSystemRoots, const <String>[filesystemRoot]);
|
expect(flutterDevice.buildInfo.fileSystemRoots, const <String>[filesystemRoot]);
|
||||||
}, overrides: <Type, Generator>{
|
}, overrides: <Type, Generator>{
|
||||||
FileSystem: () => testFileSystem,
|
FileSystem: () => testFileSystem,
|
||||||
ProcessManager: () => FakeProcessManager.any(),
|
ProcessManager: () => FakeProcessManager.any(),
|
||||||
|
Loading…
Reference in New Issue
Block a user