To create a new Flutter project in the current directory, you can run the flutter create command and use the dot (.) for the path:
flutter create .
Important: The folder name should be all lowercase, with underscores to separate words. Only use underscore, letters from a to z, and digits from 0 to 9 (the name mustn’t start with a number). Uppercase characters, dashes, and other special symbols will cause the error: “… is not a valid Dart package name”.Advertisements
You can also specify your organization with the –org flag (the default value is com.example):
flutter create --org com.kindacode .
The organization string will be used as the prefix for your iOS bundle identifier and Android package name.
In order to set the type for your project, add –template or –t flag (the default value is app):
flutter create --t plugin --org com.kindacode .
AdvertisementsAvailable types:
- app: Initialize a standard app (to release on App Store, Google Play, etc).
- package: Create a shareable project containing modular Dart code.
- plugin: Make a shareable project containing an API in Dart code with one or multiple platform-specific implementations for Android, iOS, Mac, Windows, etc.
Here is my screenshot of creating a project while in a folder called kindacode_example:
ThatÂ’s if. Further reading:
- Dart & Flutter: Convert a Duration to HH:mm:ss format
- Flutter: Creating Transparent/Translucent App Bars
- Flutter StatefulBuilder example
- Text Overflow in Flutter: Tutorial & Examples
- Using Font Awesome Icons in Flutter
- Flutter & Hive Database: CRUD Example
You can also take a tour around our Flutter topic page and Dart topic page to see the latest tutorials and examples.