Unverified Commit 05d557b9 authored by Chris Bracken's avatar Chris Bracken Committed by GitHub

Make FlutterDevice.generator final (#21555)

Now that Dart 1 support has been eliminated, generator should always be
populated to a kernel compiler instance.

Also moves the constructor to the top of the class, and orders final
fields before non-final fields, as dictated by the style guide.
parent 5ab9e707
...@@ -29,32 +29,28 @@ import 'run_hot.dart'; ...@@ -29,32 +29,28 @@ import 'run_hot.dart';
import 'vmservice.dart'; import 'vmservice.dart';
class FlutterDevice { class FlutterDevice {
FlutterDevice(this.device, {
@required bool trackWidgetCreation,
this.dillOutputPath,
this.fileSystemRoots,
this.fileSystemScheme,
ResidentCompiler generator,
}) : this.generator = generator ?? new ResidentCompiler(
artifacts.getArtifactPath(Artifact.flutterPatchedSdkPath),
trackWidgetCreation: trackWidgetCreation,
fileSystemRoots: fileSystemRoots, fileSystemScheme: fileSystemScheme
);
final Device device; final Device device;
final ResidentCompiler generator;
List<Uri> observatoryUris; List<Uri> observatoryUris;
List<VMService> vmServices; List<VMService> vmServices;
DevFS devFS; DevFS devFS;
ApplicationPackage package; ApplicationPackage package;
ResidentCompiler generator;
String dillOutputPath; String dillOutputPath;
List<String> fileSystemRoots; List<String> fileSystemRoots;
String fileSystemScheme; String fileSystemScheme;
StreamSubscription<String> _loggingSubscription; StreamSubscription<String> _loggingSubscription;
FlutterDevice(this.device, {
@required bool trackWidgetCreation,
this.dillOutputPath,
this.fileSystemRoots,
this.fileSystemScheme,
ResidentCompiler generator,
}) {
this.generator = generator ?? new ResidentCompiler(
artifacts.getArtifactPath(Artifact.flutterPatchedSdkPath),
trackWidgetCreation: trackWidgetCreation,
fileSystemRoots: fileSystemRoots, fileSystemScheme: fileSystemScheme
);
}
String viewFilter; String viewFilter;
/// If the [reloadSources] parameter is not null the 'reloadSources' service /// If the [reloadSources] parameter is not null the 'reloadSources' service
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment