About

All Flutter Guides

Flutter development guide organized by category

Dart Language

What Is Dart? A Language Built on Null Safety and JIT/AOT

Client-optimized programming language by Google

Dart is an object-oriented language designed by Google for fast, stable apps on all platforms. Everything is an object, with strong typing, Null Safety, and JIT+AOT compilation.

Dart Basic Syntax: var/final/const and the ?, !, ?? Operators

Core Dart syntax, starting from main()

Dart programs start from main(). Covers var/final/const/late/dynamic declarations, string interpolation, Null Safety (?/!/??), and cascade (..) operator.

How Dart's Type System Works: Inference, Casts, and Generics

A statically typed language checked at compile time

Dart is statically typed with compile-time type checking. Covers type inference, is/as casting, type promotion, generics, and typedef.

Dart Classes: extends vs implements vs with

5 constructor types, inheritance, interfaces, Mixin, factory pattern

Dart is fully object-oriented. Design flexible classes with 5 constructor types, extends/implements/with for inheritance, interfaces, Mixins, and factory patterns.

Dart List vs Set vs Map: When to Use Each

Plus spread and collection for/if

Dart's 3 core collections — List (ordered, duplicates), Set (unique, set operations), Map (key-value). Powerful data processing with spread, collection for/if, method chaining.

Dart Async: How to Use Future, Stream, and async/await

Keep the UI responsive during slow work

Handle time-consuming tasks without blocking UI. Future (single result), Stream (continuous events), async/await for sync-like async code.

Dart Exception Handling: Exception vs Error and try-catch

Plus on, rethrow, and async exceptions

Dart distinguishes Exception (recoverable) from Error (unrecoverable). Covers try-catch-finally, on-type handling, rethrow, and async exception handling.

What Are Dart Extensions? Adding Methods to Existing Classes

Examples: capitalize on String, isPrime on int

Extensions add methods, properties, and operators to existing classes without modifying source or inheritance. Add capitalize to String, isPrime to int, distinct to List.

How to Use Dart Records and Pattern Matching

Dart 3.0 — multiple returns, destructuring, switch patterns

Records, introduced in Dart 3.0, are immutable types for grouping values without classes. Combined with pattern matching, switch/if-case can check types and conditions simultaneously.