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