Skip to content
Tutorials Center
My learning

Topics

Flutter Tutorial

Learn Flutter step by step: 73 lessons in 15 chapters with examples, quizzes, diagrams and projects.

Start learning →

of lessons completed

Getting started

  1. 1 What Is Flutter? Learn what Flutter is, why it draws every pixel itself, how Dart and the Impeller engine fit in, and how it compares to native apps and React Native.
  2. 2 Setting Up and Running Your First App Install the Flutter SDK, check it with flutter doctor, create and run an app, learn hot reload versus hot restart, and tour the project folders and pubspec.yaml.

Dart essentials

  1. 3 Dart Basics for Flutter Learn the Dart you need for Flutter: var, final and const, types, string interpolation, operators, control flow, functions, named parameters and arrow syntax.
  2. 4 Null Safety Understand Dart null safety: nullable types, the ?, !, ?? and ?. operators, late variables, flow analysis and the most common null mistakes in Flutter code.
  3. 5 Classes, Constructors and Mixins Learn Dart classes for Flutter: constructors, named, factory and const constructors, inheritance, abstract classes, mixins, extension methods and enums with fields.
  4. 6 Collections and Generics Master Dart collections for Flutter: List, Map and Set, spread, collection if and for, map/where/fold, generics, records, patterns, sealed classes and switch.
  5. 7 More Dart: Comments, Numbers, Input, Enums and Accessors Fill the gaps in your Dart: doc comments, stdin and stdout, BigInt and runes, num methods, bitwise operators, Queue, enums, switch and labels, getters and setters, exit.
  6. 8 Futures, async/await and Streams Learn Dart asynchronous programming for Flutter: the event loop, Future, async/await, Stream, StreamController and isolates, with runnable JavaScript stand-ins.

Widgets and the widget tree

  1. 9 Everything Is a Widget Understand Flutter's core idea: everything is a widget. Learn StatelessWidget, the build method, the widget tree, Text, Container, Center, MaterialApp and Scaffold.
  2. 10 Widget, Element and RenderObject Trees Learn how Flutter stays fast: the widget, element and render object trees, why widgets are cheap, how elements are reused by type and key, and how rebuilds work.
  3. 11 StatefulWidget and setState Learn Flutter StatefulWidget: the State object, how setState marks a widget dirty and triggers a rebuild, and the lifecycle with initState, didUpdateWidget and dispose.
  4. 12 Keys and Widget Identity Learn when Flutter keys matter: how elements match widgets, why reordering a list loses state, and how to use ValueKey, ObjectKey, UniqueKey and GlobalKey correctly.
  5. 13 BuildContext and InheritedWidget Understand BuildContext as a position in the widget tree, how Theme.of and MediaQuery.of work, and how InheritedWidget shares data down the tree and triggers rebuilds.

Layout

  1. 14 Constraints Go Down, Sizes Go Up Understand Flutter's one layout rule: parents pass constraints down, children pick a size and report it up, parents set the position. Fix unbounded errors.
  2. 15 Row, Column, Expanded and Flexible Master Flutter's Row and Column: main and cross axis, MainAxisAlignment, flex factors, Expanded vs Flexible, Spacer, and how to fix overflow stripes.
  3. 16 Stack, Align and Positioned Layer widgets in Flutter with Stack, place them with Align and Positioned, size them with FractionallySizedBox, and learn how clipping and hit testing work.
  4. 17 Padding, SizedBox, Container and ConstrainedBox Learn Flutter's spacing and sizing widgets: Padding, SizedBox, Container with BoxDecoration, margin vs padding, ConstrainedBox, LimitedBox and when to use each.
  5. 18 ListView, GridView and Slivers Build scrolling screens in Flutter: ListView.builder, separated lists, lazy building, GridView, CustomScrollView, SliverAppBar and how a viewport builds only what is visible.
  6. 19 Responsive and Adaptive Layouts Make one Flutter app fit phones, tablets, foldables, desktop and web: MediaQuery, LayoutBuilder, breakpoints, OrientationBuilder, SafeArea and adaptive widgets.

Material, styling and assets

  1. 20 Material 3 Widgets Tour A tour of the Material 3 widgets you use every day in Flutter: AppBar, buttons, Card, dialogs, SnackBar, Chip, bottom sheets and NavigationBar, with working patterns.
  2. 21 Themes, Colors and Dark Mode Style a whole Flutter app from one place: ThemeData, ColorScheme.fromSeed, TextTheme, component themes, ThemeExtension and a light, dark and system theme switch.
  3. 22 Fonts, Images and Assets Declare assets and fonts in pubspec.yaml, show images with Image.asset and Image.network, handle loading and errors, use SVG and icons, and understand image caching.
  4. 23 Tabs: TabBar, TabBarView and PageView Build tabbed screens in Flutter with DefaultTabController, TabBar and TabBarView, swipe between pages with PageView, keep tab state alive, and build carousels.
  5. 24 ExpansionTile, Stepper, DataTable and Table Show collapsible lists with ExpansionTile, guided flows with Stepper, and tabular data with DataTable and Table, including sorting, column widths and scrolling.
  6. 25 RichText, Text.rich and FittedBox Mix styles and tappable links in one paragraph with Text.rich and TextSpan, embed widgets with WidgetSpan, and shrink text to fit with FittedBox.
  7. 26 ClipRRect, ClipPath, ShaderMask and Opacity Round corners with ClipRRect, cut custom shapes with ClipPath, paint gradients over text with ShaderMask, and fade widgets correctly with Opacity and its cheaper cousins.

Navigation

  1. 27 Navigator and Routes Learn Flutter navigation with Navigator: the route stack, push and pop, passing data to a screen, returning results, named routes and the pitfalls around context.
  2. 28 Declarative Routing with go_router Use go_router in Flutter: a route table, path and query parameters, nested and shell routes, redirects for login guards, deep links and the difference from Navigator.

Input and forms

  1. 29 Gestures and Input Handling Handle touch in Flutter with GestureDetector, InkWell, Draggable and Dismissible, and learn how hit testing and the gesture arena decide which widget wins.
  2. 30 Forms and Validation Build Flutter forms with Form, TextFormField and a GlobalKey of FormState. Write validators, use controllers and focus nodes, and pick keyboard types.

State management

  1. 31 Lifting State Up and ValueNotifier Decide where Flutter state should live. Lift it up with callbacks, then use ValueNotifier, ValueListenableBuilder and ChangeNotifier to rebuild only what changed.
  2. 32 State Management with Provider Use the Provider package in Flutter: ChangeNotifierProvider, context.watch, read and select, control rebuild scope, and avoid the classic pitfalls.
  3. 33 Riverpod Learn Riverpod in Flutter: providers, ref.watch and ref.read, Notifier and AsyncNotifier, family, autoDispose, and overriding providers in tests.
  4. 34 BLoC and Cubit Learn the BLoC pattern in Flutter with flutter_bloc: events, states and streams, Cubit versus Bloc, BlocBuilder, BlocListener, and when to choose BLoC.
  5. 35 Choosing State Management and App Architecture Choose a Flutter state management approach and structure your app in layers: MVVM, the repository pattern, dependency injection with get_it, and a comparison.

Networking and data

  1. 36 HTTP Requests and JSON Learn how a Flutter app talks to a server: the http and dio packages, GET and POST, decoding JSON into model classes, json_serializable and error handling.
  2. 37 FutureBuilder, StreamBuilder and Async UI Show loading, error and data states in Flutter with FutureBuilder and StreamBuilder, read AsyncSnapshot correctly, avoid refetching on rebuild and add pull to refresh.
  3. 38 WebSockets and Realtime Data Learn realtime Flutter apps: web_socket_channel, turning a socket into a Stream for the UI, reconnecting with backoff, and Firebase-style snapshot listeners.
  4. 39 Local Storage: SharedPreferences, SQLite and Hive Choose the right way to save data on a Flutter device: SharedPreferences for settings, SQLite with drift or sqflite, Hive and Isar, migrations and secure storage.

Animation and graphics

  1. 40 Implicit Animations Animate Flutter UI with almost no code: AnimatedContainer, TweenAnimationBuilder, AnimatedSwitcher, curves and durations, and how the tween engine works inside.
  2. 41 Explicit Animations and AnimationController Take full control of Flutter animation: AnimationController, vsync and tickers, Tween, CurvedAnimation, AnimatedBuilder and staggered animations with Intervals.
  3. 42 Hero and Page Transitions Learn Flutter Hero animations and custom page transitions: shared elements between routes, PageRouteBuilder, transition builders and the animations package.
  4. 43 CustomPaint and Canvas Draw your own graphics in Flutter with CustomPaint and CustomPainter: Canvas calls, paths, gradients, clipping, shouldRepaint and a simple bar chart.
  5. 44 Charts in Flutter Draw line, bar and pie charts in Flutter with fl_chart, understand how data maps to pixels and axis ticks, add touch tooltips, and know when to paint your own.
  6. 45 Lottie and Rive Animations Add designer-made animations to Flutter with the lottie package and Rive state machines: loading files, controlling playback, inputs, performance and when to choose each.

Platform integration

  1. 46 Platform Channels and Plugins Call native Android, iOS and desktop code from Flutter with MethodChannel and EventChannel, generate type-safe APIs with Pigeon, use FFI and write a plugin.
  2. 47 Camera, Location, Permissions and Notifications Use device features in Flutter: ask for permissions with permission_handler, pick photos, read location, show local and push notifications, and handle platform differences.
  3. 48 Firebase: Auth, Firestore and Cloud Messaging Connect Flutter to Firebase with FlutterFire: sign-in flows, Firestore reads, writes and queries, security rules and push notifications with Cloud Messaging.
  4. 49 Flutter on Web and Desktop Run one Flutter codebase on the web, Windows, macOS and Linux: renderers, WebAssembly, URL strategy, window sizing, mouse and keyboard input, limits and SEO.
  5. 50 Playing Video and Audio Play video with video_player and Chewie, play sounds and music with audioplayers, handle controller lifecycle, platform setup, and build a progress bar from player state.
  6. 51 Launching URLs, Email, SMS and Phone Calls Use url_launcher to open web pages, compose email with mailto, start SMS and phone calls with sms and tel, handle failures, and configure Android and iOS.
  7. 52 Wakelock, Orientation Lock and System UI Keep the screen awake with wakelock_plus, lock orientation with SystemChrome, hide system bars for immersive mode, style the status bar, and restore settings safely.
  8. 53 Generating and Previewing PDFs, File Pickers Generate PDFs with the pdf package, preview and share them with printing, save files with path_provider, pick files with file_picker, and paginate tables correctly.

Quality and performance

  1. 54 Unit and Widget Testing Learn Flutter testing with flutter_test: unit tests, testWidgets, pump and finders, mocking with mocktail and golden tests, plus a mini test harness you can run.
  2. 55 Integration Tests and CI Run Flutter integration tests on real devices with integration_test, learn what Patrol adds, use device farms, and automate tests and coverage in GitHub Actions.
  3. 56 Performance and DevTools Make Flutter apps smooth: the 16 ms frame budget, const widgets, rebuild profiling, jank, Impeller and shader compilation, memory leaks and Flutter DevTools.
  4. 57 Accessibility and Internationalization Make Flutter apps usable by everyone: Semantics and screen readers, text scaling, contrast, and localization with intl, ARB files, plurals and right-to-left layouts.
  5. 58 Error Handling, Logging and Crash Reporting Catch every Flutter error: try/catch, FlutterError.onError, PlatformDispatcher.onError, custom error widgets, log levels, and Crashlytics or Sentry crash reports.
  6. 59 Security in Flutter Apps Secure your Flutter app: why secrets in the binary are not secret, obfuscation limits, secure storage, certificate pinning, token handling and input validation.

Publishing

  1. 60 Build Flavors, Environments and Config Run one Flutter codebase as dev, staging and production apps: dart-define, Android and iOS flavors, app icons, splash screens and version numbers.
  2. 61 Publishing to Google Play and the App Store Sign and ship a Flutter app: Android keystores and app bundles, Xcode archives, store listings, review pitfalls and a release checklist.
  3. 62 CI/CD and Releases Automate Flutter builds and releases with GitHub Actions, Fastlane and Codemagic, and learn the tradeoffs of over-the-air updates and staged rollouts.

Projects

  1. 63 Project: Todo App with Persistence Build a Flutter todo app step by step: a model, a repository with local storage, a ChangeNotifier, a list UI and tests, with live logic stand-ins.
  2. 64 Project: Weather App Build a Flutter weather app: an API client, sealed loading and error states, debounced city search, a small cache and friendly error UI.
  3. 65 Project: Realtime Chat App Build a Flutter chat app: a message stream from Firestore or a WebSocket, sign-in, a message list and optimistic sends with retry on failure.
  4. 66 Project: Shopping App with Cart and Navigation Build a Flutter shopping app: a product grid, a detail page with a Hero image, cart state with ChangeNotifier, go_router navigation and a validated checkout form.
  5. 67 Project: A Simple 2D Game Build a small Flutter game: a Ticker game loop with delta time, a CustomPainter, drag input, rectangle collision and a score, with a canvas stand-in you can play.
  6. 68 Projects: Calculator, BMI, Tic-Tac-Toe, Quiz and Magic 8 Ball Five small Flutter projects with real Dart code: a calculator, a BMI app, tic-tac-toe, an API-driven quiz and a magic 8 ball, each with its logic separated and testable.
  7. 69 Projects: Fitness, Event Calendar, Image Compressor, Portfolio Four Flutter projects with real code: a fitness tracker with streaks, an event calendar with table_calendar, an image compressor, and a link-in-bio portfolio page.

Practice and review

  1. 70 Practice Exercises with Solutions Twelve Flutter exercises on layout, state, forms, navigation and async code, each with a hint and a full solution, plus runnable stand-ins for the logic.
  2. 71 Common Flutter Mistakes and How to Fix Them Fix the Flutter errors everyone hits: RenderFlex overflow, unbounded height, setState after dispose, BuildContext across async gaps and rebuild storms.
  3. 72 Flutter Interview Questions Flutter interview questions with clear answers: widgets, the three trees, keys, state management, async Dart, performance and app architecture, with runnable examples.
  4. 73 Flutter and Dart Cheat Sheet A compact Flutter and Dart cheat sheet: CLI commands, common widgets, layout rules, state patterns, navigation, forms and async snippets, with links to lessons.