Install Flutter, create a project, understand widgets, and run your first app on a device or emulator.
What you will learn
- Install and doctor-check the Flutter SDK
- Create and run a project
- Compose UI with widgets and basic state
- Use hot reload during development
Prerequisites
- Disk space for SDKs and emulators
- Follow the official install matrix for your OS: Install Flutter
Verify install
flutter doctor
flutter create my_flutter_app
cd my_flutter_app
flutter runFix every issue flutter doctor reports before you chase widget bugs. Emulator/device setup is OS-specific—trust the install guide over random blog posts.
Widget basics
Everything is a widget. Start from MaterialApp + Scaffold, then compose Column, Row, Text, and ElevatedButton.
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: const Text('Flutter starter')),
body: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
const Text('Ship a screen, then add state'),
const SizedBox(height: 12),
ElevatedButton(
onPressed: () {},
child: const Text('Continue'),
),
],
),
),
),
);
}
}Official pathway: Write your first Flutter app.
Stateless vs Stateful
StatelessWidget: UI from configuration onlyStatefulWidget+State: local mutable UI state (setState)
Prefer lifting state up only when two widgets need the same data.
Hot reload vs hot restart
- Hot reload: inject updated source into the running VM—fast UI iteration
- Hot restart: reset app state—use when static fields or main() change
Practice checklist
- Change theme colors in
ThemeData - Convert the button demo into a counter with
StatefulWidget - Add a second route with
Navigator.push - Run once in profile mode:
flutter run --profile
Common pitfalls
- Editing the wrong
main.dartafter renaming packages - Fighting layout with nested unbounded
Column/ListViewwithoutExpanded/ shrinkWrap awareness - Skipping platform tooling setup and blaming Flutter for missing Android licenses
Sources and further reading
Who this guide is for
- Developers evaluating Flutter for a cross-platform application
- Mobile beginners learning Dart and widget composition
- Teams defining a small Flutter delivery standard
Definition of done
A two-screen Flutter application with clear widget boundaries, explicit state ownership, responsive layout, automated checks, profile-mode review, and a documented platform test matrix.
Finishing the commands is not the same as finishing the guide. Keep the result only when another person can reproduce it, inspect the evidence, and understand the remaining risks.
Professional workflow
Phase 1 — Validate the toolchain
Goal: Separate environment issues from application issues.
- Run flutter doctor and resolve target-platform blockers.
- Create the project with deliberate platform targets.
- Commit a clean baseline before adding packages.
Verification: A second developer can run the starter on the intended emulator or device.
Phase 2 — Build a complete feature slice
Goal: Practice composition, state, navigation, and failure states together.
- Separate reusable widgets from screen orchestration.
- Keep state at the nearest shared owner.
- Add loading, empty, error, and success presentations.
Verification: The feature works at narrow and wide constraints without overflow warnings.
Phase 3 — Review release behavior
Goal: Measure the app outside debug-mode assumptions.
- Run static analysis and tests.
- Use profile mode to inspect frame behavior.
- Build and install a release candidate on each target platform.
Verification: The release checklist records build identity, device, OS, performance notes, and rollback owner.
Review questions before you continue
- Which platforms are genuinely required?
- What state must survive navigation or app restart?
- Could a standard widget solve this before adding a package?
- What does a successful release look like on each platform?
If an answer is unknown, record it as an explicit follow-up instead of hiding the uncertainty behind a successful demo.
Troubleshooting decision guide
- Layout overflows: inspect constraints and replace rigid dimensions with flexible composition.
- Hot reload does not apply a change: use hot restart when initialization or static state changed.
- A plugin fails on one platform: verify platform support and native setup in official docs.
- Build environments diverge: pin SDK policy and document platform tooling versions.
Change one variable at a time, preserve the first useful error, and write down the command or condition that fixed it. That turns a private debugging session into team knowledge.
Production-readiness checklist
- Keep dependencies reviewed and minimal.
- Test accessibility, text scaling, localization, and platform conventions.
- Separate configuration from source and never bundle secrets.
- Profile startup, frames, memory, and network-heavy screens.
- Document signing, staged release, monitoring, and rollback.
These checks are intentionally stricter than a beginner demo. Use them to decide whether to continue learning, run a controlled pilot, or request specialist review.
Your next 30 minutes
- Run flutter doctor and save the resolved target matrix.
- Complete one feature with all four data states.
- Test narrow, tablet, and large-text layouts.
- Install a release build on a physical target device.
CTA: Pick the first unchecked step, complete it now, and save the evidence in your project README or decision log. Then open the official documentation linked below before adopting the result in production.