Merge pull request #2147 from abarth/static_arena
Remove PointerRouter and GestureArena arguments
diff --git a/packages/flutter_tools/lib/src/commands/create.dart b/packages/flutter_tools/lib/src/commands/create.dart
index ba97e3f..724ded5 100644
--- a/packages/flutter_tools/lib/src/commands/create.dart
+++ b/packages/flutter_tools/lib/src/commands/create.dart
@@ -80,13 +80,6 @@
printStatus('');
- String message = '''
-All done! To run your application:
-
- \$ cd ${projectDir.path}
- \$ flutter run
-''';
-
if (argResults['pub']) {
int code = await pubGet(directory: projectDir.path);
if (code != 0)
@@ -94,7 +87,32 @@
}
printStatus('');
- printStatus(message);
+
+ // Run doctor; tell the user the next steps.
+ if (doctor.canLaunchAnything) {
+ // Let them know a summary of the state of their tooling.
+ doctor.summary();
+
+ printStatus('''
+All done! In order to run your application, type:
+
+ \$ cd ${projectDir.path}
+ \$ flutter run
+''');
+ } else {
+ printStatus("You'll need to install additional components before you can run "
+ "your Flutter app:");
+ printStatus('');
+
+ // Give the user more detailed analysis.
+ doctor.diagnose();
+ printStatus('');
+ printStatus("After installing components, run 'flutter doctor' in order to "
+ "re-validate your setup.");
+ printStatus("When complete, type 'flutter run' from the '${projectDir.path}' "
+ "directory in order to launch your app.");
+ }
+
return 0;
}
@@ -105,7 +123,7 @@
String projectIdentifier = _createProjectIdentifier(path.basename(dirPath));
String relativeFlutterPackagesDirectory = path.relative(flutterPackagesDirectory, from: dirPath);
- printStatus('Creating ${path.basename(projectName)}...');
+ printStatus('Creating project ${path.basename(projectName)}:');
projectDir.createSync(recursive: true);
@@ -117,7 +135,7 @@
};
if (renderDriverTest)
- templateContext['withDriverTest?'] = {};
+ templateContext['withDriverTest?'] = <String, dynamic>{};
Template createTemplate = new Template.fromName('create');
createTemplate.render(new Directory(dirPath), templateContext,
diff --git a/packages/flutter_tools/lib/src/dart/pub.dart b/packages/flutter_tools/lib/src/dart/pub.dart
index 709d034..b419f8d 100644
--- a/packages/flutter_tools/lib/src/dart/pub.dart
+++ b/packages/flutter_tools/lib/src/dart/pub.dart
@@ -29,7 +29,7 @@
}
if (!pubSpecLock.existsSync() || pubSpecYaml.lastModifiedSync().isAfter(pubSpecLock.lastModifiedSync())) {
- printStatus("Running 'pub get' in '$directory'...");
+ printStatus("Running 'pub get' in $directory${Platform.pathSeparator}...");
int code = await runCommandAndStreamOutput(
<String>[sdkBinaryName('pub'), '--verbosity=warning', 'get'],
workingDirectory: directory
diff --git a/packages/flutter_tools/lib/src/template.dart b/packages/flutter_tools/lib/src/template.dart
index ae40612..6917676 100644
--- a/packages/flutter_tools/lib/src/template.dart
+++ b/packages/flutter_tools/lib/src/template.dart
@@ -38,8 +38,7 @@
return;
}
- List<FileSystemEntity> templateFiles =
- templateSource.listSync(recursive: true);
+ List<FileSystemEntity> templateFiles = templateSource.listSync(recursive: true);
for (FileSystemEntity entity in templateFiles) {
if (entity is! File) {
@@ -67,8 +66,7 @@
String destinationDirPath = destination.absolute.path;
- _templateFilePaths.forEach((String relativeDestPath,
- String absoluteSrcPath) {
+ _templateFilePaths.forEach((String relativeDestPath, String absoluteSrcPath) {
String finalDestinationPath = path
.join(destinationDirPath, relativeDestPath)
.replaceAll(_kCopyTemplateExtension, '')
@@ -83,14 +81,14 @@
if (finalDestinationFile.existsSync()) {
if (overwriteExisting) {
finalDestinationFile.delete(recursive: true);
- printStatus('$relativePathForLogging exists. Overwriting.');
+ printStatus(' $relativePathForLogging (overwritten)');
} else {
// The file exists but we cannot overwrite it, move on.
- printStatus('$relativePathForLogging exists. Skipping.');
+ printStatus(' $relativePathForLogging (existing - skipped)');
return;
}
} else {
- printStatus('$relativePathForLogging created.');
+ printStatus(' $relativePathForLogging');
}
finalDestinationFile.createSync(recursive: true);