flutter create
Create a new Flutter project
Options
Name | Description |
---|---|
-h, --help | Print this usage information |
-v, --verbose | Noisy logging, including all shell commands executed. If used with --help, shows hidden options |
-d, --device-id <device id> | Target device id or name (prefixes allowed) |
--suppress-analytics | Suppress analytics reporting when this command runs |
--pub | Run 'flutter pub get' before executing this command |
--no-pub | Don't run 'flutter pub get' before executing this command |
--offline | When "flutter pub get" is run by the create command, this indicates whether to run it in offline mode or not. In offline mode, it will need to have all dependencies already available in the pub cache to succeed |
--no-offline | |
--with-driver-test | (Deprecated) Also add a flutter_driver dependency and generate a sample 'flutter drive' test. This flag has been deprecated, instead see package:integration_test at https://pub.dev/packages/integration_test |
--no-with-driver-test | |
--overwrite | When performing operations, overwrite existing files |
--no-overwrite | |
--description | The description to use for your new Flutter project. This string ends up in the pubspec.yaml file. (defaults to "A new Flutter project.") |
--org | The organization responsible for your new Flutter project, in reverse domain name notation. This string is used in Java package names and as prefix in the iOS bundle identifier. (defaults to "com.example") |
--project-name | The project name for this new Flutter project. This must be a valid dart package name |
-i, --ios-language <arg> | [objc, swift (default)] |
-a, --android-language <arg> | [java, kotlin (default)] |
--platforms <arg> | The platforms supported by this project. This argument only works when the --template is set to app or plugin. Platform folders (e.g. android/) will be generated in the target project. When adding platforms to a plugin project, the pubspec.yaml will be updated with the requested platform. Adding desktop platforms requires the corresponding desktop config setting to be enabled. [ios (default), android (default), windows (default), linux (default), macos (default), web (default)] |
-t, --template <type> | Specify the type of project to create. [app] (default) Generate a Flutter application. [module] Generate a project to add a Flutter module to an existing Android or iOS application. [package] Generate a shareable Flutter project containing modular Dart code. [plugin] Generate a shareable Flutter project containing an API in Dart code with a platform-specific implementation for Android, for iOS code, or for both |
-s, --sample <id> | Specifies the Flutter code sample to use as the main.dart for an application. Implies --template=app. The value should be the sample ID of the desired sample from the API documentation website (http://docs.flutter.dev). An example can be found at https://master-api.flutter.dev/flutter/widgets/SingleChildScrollView-class.html |
--list-samples <file path> | Specifies a JSON output file for a listing of Flutter code samples that can be created with --sample |