Unverified Commit 10fbbafe authored by Collin Jackson's avatar Collin Jackson Committed by GitHub

[flutter_tools] Use proper project name in templates (#96373)

parent 5840db7d
......@@ -349,7 +349,8 @@ android {
path.join(parent.path, 'hello', 'pubspec.yaml')
);
final String contents = pubspec.readAsStringSync();
final String newContents = contents.replaceFirst('# The following section is specific to Flutter.${platformLineSep}flutter:$platformLineSep', '''
final String newContents = contents.replaceFirst('${platformLineSep}flutter:$platformLineSep', '''
flutter:
assets:
- lib/gallery/example_code.dart
......
......@@ -6,7 +6,7 @@
import 'dart:convert'; // flutter_ignore: dart_convert_import.
import 'dart:io'; // flutter_ignore: dart_io_import.
/// Executes the required flutter tasks for a desktop build.
/// Executes the required Flutter tasks for a desktop build.
Future<void> main(List<String> arguments) async {
final String targetPlatform = arguments[0];
final String buildMode = arguments[1].toLowerCase();
......
......@@ -10,7 +10,7 @@ flutter daemon
It runs a persistent, JSON-RPC based server to communicate with devices. IDEs and other tools can start the flutter tool in this mode and get device addition and removal notifications, as well as being able to programmatically start and stop apps on those devices.
A set of `flutter daemon` commands/events are also exposed via `flutter run --machine` and `flutter attach --machine` which allow IDEs and tools to launch and attach to flutter applications and interact to send commands like Hot Reload. The command and events that are available in these modes are documented at the bottom of this document.
A set of `flutter daemon` commands/events are also exposed via `flutter run --machine` and `flutter attach --machine` which allow IDEs and tools to launch and attach to Flutter applications and interact to send commands like Hot Reload. The command and events that are available in these modes are documented at the bottom of this document.
## Protocol
......
......@@ -436,7 +436,7 @@ Your $application code is in $relativeAppMain.
int generatedCount = 0;
final String description = argResults.wasParsed('description')
? stringArg('description')
: 'A new flutter module project.';
: 'A new Flutter module project.';
templateContext['description'] = description;
generatedCount += await renderTemplate(
globals.fs.path.join('module', 'common'),
......@@ -515,7 +515,7 @@ Your $application code is in $relativeAppMain.
int generatedCount = 0;
final String description = argResults.wasParsed('description')
? stringArg('description')
: 'A new flutter plugin project.';
: 'A new Flutter plugin project.';
templateContext['description'] = description;
generatedCount += await renderMerged(
<String>['plugin', 'plugin_shared'],
......
......@@ -1488,7 +1488,7 @@ class LogMessage {
final StackTrace stackTrace;
}
/// The method by which the flutter app was launched.
/// The method by which the Flutter app was launched.
class LaunchMode {
const LaunchMode._(this._value);
......
......@@ -49,7 +49,7 @@ class UpgradeCommand extends FlutterCommand {
)
..addFlag(
'verify-only',
help: 'Checks for any new flutter updates, without actually fetching them.',
help: 'Checks for any new Flutter updates, without actually fetching them.',
negatable: false,
);
}
......
......@@ -465,7 +465,7 @@ abstract class PollingDeviceDiscovery extends DeviceDiscovery {
String toString() => '$name device discovery';
}
/// A device is a physical hardware that can run a flutter application.
/// A device is a physical hardware that can run a Flutter application.
///
/// This may correspond to a connected iOS or Android device, or represent
/// the host operating system in the case of Flutter Desktop.
......@@ -622,7 +622,7 @@ abstract class Device {
/// Whether this device implements support for hot restart.
bool get supportsHotRestart => true;
/// Whether flutter applications running on this device can be terminated
/// Whether Flutter applications running on this device can be terminated
/// from the VM Service.
bool get supportsFlutterExit => true;
......
......@@ -530,7 +530,7 @@ const String _pluginRegistrantPodspecTemplate = '''
Pod::Spec.new do |s|
s.name = 'FlutterPluginRegistrant'
s.version = '0.0.1'
s.summary = 'Registers plugins with your flutter app'
s.summary = 'Registers plugins with your Flutter app'
s.description = <<-DESC
Depends on all your plugins, and provides a function to register them.
DESC
......
......@@ -297,7 +297,7 @@ Future<XcodeBuildResult> buildXcodeProject({
if (activeArchName != null) {
buildCommands.add('ONLY_ACTIVE_ARCH=YES');
// Setting ARCHS to $activeArchName will break the build if a watchOS companion app exists,
// as it cannot be build for the architecture of the flutter app.
// as it cannot be build for the architecture of the Flutter app.
if (!hasWatchCompanion) {
buildCommands.add('ARCHS=$activeArchName');
}
......
......@@ -709,7 +709,7 @@ class FlutterVmService {
isolateId: isolateId,
);
// A response of `null` indicates that `invokeFlutterExtensionRpcRaw` caught an RPCError
// with a missing method code. This can happen when attempting to quit a flutter app
// with a missing method code. This can happen when attempting to quit a Flutter app
// that never registered the methods in the bindings.
if (result == null) {
return false;
......
......@@ -118,7 +118,7 @@ class IosProject extends XcodeBasedProject {
/// True, if the parent Flutter project is a module project.
bool get isModule => parent.isModule;
/// Whether the flutter application has an iOS project.
/// Whether the Flutter application has an iOS project.
bool get exists => hostAppRoot.existsSync();
/// Put generated files here.
......
......@@ -8,9 +8,9 @@ This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
......@@ -60,7 +60,7 @@ dev_dependencies:
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter.
# The following section is specific to Flutter packages.
flutter:
# The following line ensures that the Material Icons font is
......
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="{{androidIdentifier}}">
<!-- Flutter needs it to communicate with the running application
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
......
......@@ -3,7 +3,7 @@
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
......
......@@ -3,7 +3,7 @@
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
......
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="{{androidIdentifier}}">
<!-- Flutter needs it to communicate with the running application
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
......
// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility that Flutter provides. For example, you can send tap and scroll
// utility in the flutter_test package. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.
......
......@@ -2,7 +2,7 @@
<resources>
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
</resources>
......@@ -4,7 +4,7 @@
## Getting Started
For help getting started with Flutter, view our online
For help getting started with Flutter development, view the online
[documentation](https://flutter.dev/).
For instructions integrating Flutter modules to your existing applications,
......
// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility that Flutter provides. For example, you can send tap and scroll
// utility in the flutter_test package. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.
......
......@@ -19,7 +19,7 @@ dev_dependencies:
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter.
# The following section is specific to Flutter packages.
flutter:
# To add assets to your package, add an assets section, like this:
......
......@@ -9,7 +9,7 @@ This project is a starting point for a Flutter
a specialized package that includes platform-specific implementation code for
Android and/or iOS.
For help getting started with Flutter, view our
For help getting started with Flutter development, view the
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
......
......@@ -31,7 +31,7 @@ dev_dependencies:
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter.
# The following section is specific to Flutter packages.
flutter:
# This section identifies this Flutter project as a plugin project.
# The 'pluginClass' specifies the class (in Java, Kotlin, Swift, Objective-C, etc.)
......
......@@ -8,7 +8,7 @@ This project is a starting point for a Flutter application that follows the
[simple app state management
tutorial](https://flutter.dev/docs/development/data-and-backend/state-mgmt/simple).
For help getting started with Flutter, view our
For help getting started with Flutter development, view the
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
......
// This is an example Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility that Flutter provides. For example, you can send tap and scroll
// utility in the flutter_test package. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.
//
......
......@@ -21,7 +21,7 @@ void main() {
tryToDelete(tempDir);
});
testWithoutContext('flutter app that depends on a non-Android plugin can still build for Android', () {
testWithoutContext('Flutter app that depends on a non-Android plugin can still build for Android', () {
final String flutterRoot = getFlutterRoot();
final String flutterBin = fileSystem.path.join(
flutterRoot,
......
......@@ -549,7 +549,7 @@ class BasicDeferredComponentsConfig extends DeferredComponentsConfig {
<!-- Theme applied to the Android Window while the process is starting -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
......
......@@ -266,7 +266,7 @@ class MultidexProject extends Project {
<!-- Theme applied to the Android Window while the process is starting -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
......
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