Section 1: Flutter and Dart basics
Installing Flutter and running the first app
Go to the Flutter website and follow the install guide for your operating system. The current recommended path is to install the Flutter SDK, then Android Studio for the Android SDK and emulator, and VS Code with the Flutter extension as your editor. On a Mac, install Xcode from the App Store if you want to target iOS.
Check your setup
Flutter includes a diagnostic command:
flutter doctor
It lists each part of your toolchain with a tick or a cross. Fix the crosses one by one. The most common ones are accepting Android licences (flutter doctor --android-licenses) and installing the Android command line tools from Android Studio's SDK Manager. You do not need every item ticked. If you only target Android, an iOS warning is fine.
Create and run a project
flutter create streak
cd streak
flutter run
Before flutter run, start an emulator from Android Studio's Device Manager, or plug in an Android phone with USB debugging enabled. flutter devices shows everything Flutter can see.
The default app is a counter. Tap the button and the number goes up. Now open lib/main.dart, change the title text and save. With the app still running from VS Code, the change appears almost instantly. That is hot reload.
Project structure
lib/holds your Dart code. Everything we write goes here.pubspec.yamllists dependencies, assets and the app version.android/andios/contain native project files. You will touch them only for things like app icons and permissions.test/holds tests.
Hot reload versus hot restart
Hot reload keeps state, so if you change how state is initialised, you may not see the change. Use hot restart (Shift+R in the terminal, or the restart button in VS Code) to reset state while keeping the app installed. A full rebuild is needed only after changing native files or adding some plugins.
Replace the counter code with a single Text('Streak') inside a MaterialApp and Scaffold, and you are ready for Dart.