Unverified Commit 7dbe9e7b authored by Jacob Richman's avatar Jacob Richman Committed by GitHub

Fix cases where previewDart2 and trackWidgetCreation were (#14994)

accidentally missed due to named parameters being omitted.
parent eaa9848f
......@@ -5,6 +5,8 @@
import 'dart:async';
import 'dart:convert';
import 'package:meta/meta.dart';
import '../android/android_device.dart';
import '../base/common.dart';
import '../base/context.dart';
......@@ -333,6 +335,8 @@ class AppDomain extends Domain {
route,
options,
enableHotReload,
previewDart2: _getBoolArg(args, 'preview-dart-2'),
trackWidgetCreation: _getBoolArg(args, 'track-widget-creation'),
);
return <String, dynamic>{
......@@ -347,7 +351,8 @@ class AppDomain extends Domain {
Device device, String projectDirectory, String target, String route,
DebuggingOptions options, bool enableHotReload, {
String applicationBinary,
bool previewDart2: false,
@required bool previewDart2,
@required bool trackWidgetCreation,
String projectRootPath,
String packagesFilePath,
bool ipv6: false,
......@@ -360,7 +365,11 @@ class AppDomain extends Domain {
final Directory cwd = fs.currentDirectory;
fs.currentDirectory = fs.directory(projectDirectory);
final FlutterDevice flutterDevice = new FlutterDevice(device, previewDart2: previewDart2);
final FlutterDevice flutterDevice = new FlutterDevice(
device,
previewDart2: previewDart2,
trackWidgetCreation: trackWidgetCreation,
);
ResidentRunner runner;
......
......@@ -129,7 +129,11 @@ class FuchsiaReloadCommand extends FlutterCommand {
).toList();
final FuchsiaDevice device = new FuchsiaDevice(
fullAddresses[0], name: _address);
final FlutterDevice flutterDevice = new FlutterDevice(device);
final FlutterDevice flutterDevice = new FlutterDevice(
device,
trackWidgetCreation: false,
previewDart2: false,
);
flutterDevice.observatoryUris = observatoryUris;
final HotRunner hotRunner = new HotRunner(
<FlutterDevice>[flutterDevice],
......
......@@ -260,6 +260,7 @@ class RunCommand extends RunCommandBase {
_createDebuggingOptions(), hotMode,
applicationBinary: argResults['use-application-binary'],
previewDart2: argResults['preview-dart-2'],
trackWidgetCreation: argResults['track-widget-creation'],
projectRootPath: argResults['project-root'],
packagesFilePath: globalResults['packages'],
ipv6: ipv6,
......
......@@ -39,8 +39,8 @@ class FlutterDevice {
StreamSubscription<String> _loggingSubscription;
FlutterDevice(this.device, {
bool previewDart2: false,
bool trackWidgetCreation: false,
@required bool previewDart2,
@required bool trackWidgetCreation,
}) {
if (previewDart2) {
generator = new ResidentCompiler(
......
......@@ -51,7 +51,11 @@ void main() {
// Currently the TestRunner is not properly configured to be able to run
// with `previewDart2: true` due to missing resources.
testRunner = new TestRunner(
<FlutterDevice>[new FlutterDevice(new MockDevice())]
<FlutterDevice>[new FlutterDevice(
new MockDevice(),
previewDart2: false,
trackWidgetCreation: false,
)],
);
});
......
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