Build App with SDK
# Build an App using Flutter: First Few Steps
Once your Flutter and Dart plugins are installed, you can start creating your first Flutter app.
- On the Terminal or Powershell, change your directory to where you want to install your app:
cd new-app-directory
-
Create your first app; let's call it "firstapp".
With these commands, the Flutter SDK creates a new project from scratch.flutter create firstapp flutter run
-
Flutter creates your app.
-
Change your directory to your app:
cd firstapp
Note: In your directory, inside your app, there is a lib
folder, which contains a main.dart
file. When you click main.dart
, it opens in your editor. This file contains the Dart code and for your own app, you will need to replace the content of this .dart file with your own code.
Pubspec.yaml File
In your app folder, click the pubspec.yaml
to open it in your editor. The pubspec.yaml
file contains the following information about your app:
- Name of your app
- Description
- Version and build number of your app
- Environment
- Dependencies
Add Dependencies of your app to Pubspec.yaml
Dependencies are any additional packages that your app requires to run smoothly. These dependencies can be automatically updated to the latest version by running the following command:
flutter pub upgrade --major-versions