Introduction to Dart
1.1 What is Dart?
A client-optimized, object-oriented, class-based, garbage-collected language developed by Google (first released in 2011, Dart 2 in 2018, Dart 3 in 2023).
Designed for fast apps on any platform: mobile, desktop, web, and server. It's best known as the language of Flutter.
C-style syntax, familiar to Java, C#, JavaScript, and TypeScript developers.
1.2 Key Features
Sound null safety Types are non-nullable by default. Null errors are caught at compile time.
Strong static typing + inference var with full type inference, a sound type system JIT + AOT compilation
JIT for fast development (hot reload). AOT for fast startup and production performance.
Native machine code (ARM/x64/RISC-V), JavaScript, WebAssembly Async built in
Future, Stream, async/await, async* generators Memory-isolated concurrency (no shared-state data races) Modern language features
Records, patterns, sealed classes, extension types, mixins Formatter, analyzer, test runner, pub package manager, DevTools
A generational GC tuned for UI frame budgets
1.3 Where Dart Is Used
Flutter apps (Android, iOS, web, Windows, macOS, Linux, embedded): Google Pay, Google Ads, BMW, Toyota, Alibaba (Xianyu), ByteDance apps, Nubank, eBay Motors.
Server-side: Dart Frog, shelf, Serverpod, Google Cloud Run backends.
CLI tools (native executables), and web apps (Jaspr, package:web, compiled to JS/Wasm).
1.4 Dart vs Other Languages
Static (unsound, erased) Dart VM / AOT / JS / Wasm JVM / Native / JS async + isolates async (single thread) async/await + actors Main UI framework