Flutter Decoded.
esc

Type to search lessons, steps and concepts.

↑ ↓ move · ↵ open · esc close
Support
Language
Made with ♥ by Aman Singh · Support the projectNot affiliated with Google. Flutter and Dart are trademarks of Google LLC. Videos belong to their creators.
Course46 lessons
›01. Dart Foundations0/4
  1. Variables, Types & Null Safety
  2. Functions & Classes
  3. Futures, async/await & Streams
  4. Records, Patterns & Sealed Classes
›02. Flutter Fundamentals0/4
  1. Everything Is a Widget
  2. Stateless vs Stateful Widgets
  3. Widgets, Elements & RenderObjects
  4. Project Structure & Hot Reload
›03. Layout & UI0/6
  1. Constraints Go Down, Sizes Go Up
  2. Rows, Columns & Flex
  3. Stack, Positioned & Layering
  4. Lists, Grids & Slivers
  5. Responsive & Adaptive Design
  6. Theming with Material 3
›04. Interaction & Navigation0/4
  1. Taps, Gestures & Input
  2. Forms & Validation
  3. Navigator & Routes
  4. go_router & Deep Links
›05. State Management0/5
  1. Ephemeral vs App State
  2. InheritedWidget & Provider
  3. Riverpod
  4. The BLoC Pattern
  5. Choosing an Approach
›06. Data & Backend0/6
  1. HTTP & JSON
  2. Dio: Interceptors & Retries
  3. Saving Data Locally
  4. Firebase: Auth & Firestore
  5. Backend Options: Supabase, Appwrite & More
  6. Isolates & Heavy Work
›07. App Architecture0/3
  1. UI Layer & Data Layer
  2. Repositories & Dependency Injection
  3. Clean Architecture & Folder Structure
›08. Motion & Performance0/4
  1. Implicit Animations
  2. Explicit Animations
  3. Custom Painting
  4. Performance & DevTools
›09. Testing & Shipping0/4
  1. Unit, Widget & Integration Tests
  2. Environments & Flavors
  3. CI/CD & Releasing
  4. Flutter on the Web & Desktop
›10. Release Automation & Code Push0/6
  1. Codemagic: Your First Pipeline
  2. Codemagic: Code Signing
  3. Codemagic: Publish to the Stores
  4. Shorebird: Code Push for Flutter
  5. Shorebird: Safe Patching
  6. Shorebird in Codemagic
Progress0 / 46
Browse all videos →
02. Flutter Fundamentals / Lesson 1 / 4

Everything Is a Widget

Build a screen by composing small widgets into a tree, and see what build() really returns.

6 minBeginner5 steps
main.dart
1import 'package:flutter/material.dart';
2
3void main() => runApp(const MyApp());
4
5class MyApp extends StatelessWidget {
6 const MyApp({super.key});
7
8 @override
9 Widget build(BuildContext context) {
10 return MaterialApp(
11 home: Scaffold(
12 appBar: AppBar(title: const Text('Hello')),
13 body: const Center(child: Text('Hello, Flutter!')),
14 ),
15 );
16 }
17}
Live simulatorWidget inspector
iPhone 16 Pro iOS 18.2
9:41
MaterialApp
Scaffold
AppBar
Hello
Center
TextHello, Flutter!
Dashed boxes are widgets. Highlighted ones are this step's focus.
Step 1 / 5

runApp mounts the root widget

runApp() takes a widget and makes it fill the screen. Everything you see from then on is a descendant of that one widget.

You'll learn

  • What runApp does
  • Widgets as immutable descriptions
  • Composition into a widget tree
  • Why const widgets are cheap

Read the official docs

Widgets (Flutter fundamentals) ↗Widget catalog ↗

Watch it built

13:06:23
Flutter Tutorial For Beginners in 13 HoursRivaan Ranawat · 245K views
11:48
My 10 Most Favorite Flutter WidgetsRobert Brunhage · 39K views
Custom Widget in FlutterCodeX · 6.9K views
1 / 5
← → step · Space pause · R replay