Dart Fundamentals
Dart is a client-optimized programming language developed by Google for building mobile, web, and server applications. It features sound null safety, async/await, and compiles to native ARM code or JavaScript, best known as the language behind the Flutter framework.
itProgramming languages | OpenSkills.info
Intro
Dart Fundamentals
Dart is a general-purpose programming language built for applications that run across native and web platforms. It is also the language behind Flutter. You can use Dart without Flutter for command-line tools, servers, libraries, and web applications.
Keep the first mental model small:
Dart source → analyzer and compiler → native or web output → Dart runtime and libraries → application behavior
The language defines syntax, types, and program behavior. The Dart SDK supplies the analyzer, compilers, runtime, package tools, formatter, and other developer tools. Flutter is a separate user-interface framework built on Dart.
Why Dart exists
Dart combines static type checking with type inference. You can state a type when it clarifies a contract, while the analyzer infers many local types from their initial values. Sound null safety makes non-nullable types the default and reports many possible null errors before execution.
Dart also targets different execution environments. Native development uses a virtual machine with just-in-time compilation. Production native applications can use ahead-of-time compilation. Web compilers produce JavaScript or WebAssembly.
These features support fast development and several deployment targets. They do not make every Dart library portable. Platform-specific libraries such as dart:io do not work on every target.
Continue the course
This section is part of the paid course.
See pricing to subscribe, or log in if you already have access.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://dart.dev/overview
Supports
- Dart targets native and web platforms and forms the language and runtime foundation of Flutter
- The Dart SDK supports formatting, analysis, testing, runtime execution, and compilation
- Native development uses a virtual machine with just-in-time compilation and production can use ahead-of-time compilation
- Dart web compilers produce JavaScript or WebAssembly
- The runtime manages memory, enforces runtime type checks, and manages isolates
- https://dart.dev/language
Supports
- Dart is object-oriented and objects include numbers and functions
- Dart is strongly typed and supports type inference
- Functions are first-class objects
- Dart supports generic types and sound null safety
- https://dart.dev/language/variables
Supports
- Variables hold references and can use inferred or explicit types
- Final variables can be set only once
- Const values are compile-time constants
- Late changes initialization and checking behavior
- Non-nullable variables must be initialized before use
- https://dart.dev/language/type-system
Supports
- Dart has a sound static type system
- Type inference assigns static types without requiring every annotation
- Dynamic permits operations through runtime checking while Object retains static restrictions
- Generic type information supports static checking
- https://dart.dev/null-safety/understanding-null-safety
Supports
- Nullability is expressed in Dart types
- Non-nullable types do not accept null and nullable types use a question mark
- Flow analysis can promote a nullable variable after a valid check
- A false null assertion causes a runtime failure
- https://dart.dev/language/functions
Supports
- Functions are first-class objects
- Dart supports positional and named parameters
- Required marks a named parameter as mandatory
- Functions can use block bodies or expression bodies
- https://dart.dev/language/built-in-types
Supports
- Dart has built-in support for numbers, strings, booleans, records, functions, symbols, and collections
- Every variable refers to an object
- String interpolation and raw and multiline strings are language features
- https://dart.dev/language/collections
Supports
- Dart has built-in list, set, and map collections
- Lists are ordered, sets contain unique values, and maps associate keys with values
- Collection literals support spread, conditional, and loop elements
- An untyped empty brace literal creates a map rather than a set
- https://dart.dev/language/classes
Supports
- Classes define objects with fields, methods, and constructors
- Dart supports class inheritance and implicit interfaces
- Identifiers beginning with an underscore are private to their library
- Static and abstract members express class-level and incomplete contracts
- https://dart.dev/language/mixins
Supports
- Mixins provide reusable behavior for multiple class hierarchies
- Classes apply mixins with the with clause
- https://dart.dev/language/extension-methods
Supports
- Extension methods add statically resolved functionality to existing APIs
- Extension members are selected using the static type of an expression
- https://dart.dev/language/records
Supports
- Records are anonymous immutable aggregate types
- Record types have fixed size and typed positional or named fields
- Records can return multiple values from a function
- https://dart.dev/language/patterns
Supports
- Patterns match values and can destructure values into variables
- Patterns work in declarations, assignments, switches, and control flow
- Pattern-based switches can be checked for exhaustiveness
- https://dart.dev/language/generics
Supports
- Generic classes and methods preserve type information
- Type parameters can use bounds
- Built-in collections use generic type arguments
- https://dart.dev/language/error-handling
Supports
- Dart can throw and catch exceptions
- Dart exceptions are unchecked
- Rethrow propagates the current exception
- Finally runs cleanup after success or failure paths
- https://dart.dev/language/async
Supports
- Future represents one asynchronous result and Stream represents asynchronous events
- Async and await support asynchronous functions
- Await for consumes stream events
- Async star functions can produce streams with yield
- https://dart.dev/language/concurrency
Supports
- Each isolate has an event loop and separate memory
- Awaiting permits other queued work while an asynchronous operation is pending
- Isolates communicate with messages rather than shared state
- Dart web supports asynchronous APIs but not isolates in the same way as Dart native
- https://dart.dev/language/isolates
Supports
- Worker isolates suit computations large enough to block other work
- Isolate run executes a callback in a worker and returns a future result
- Isolates can run concurrently without sharing mutable memory
- https://dart.dev/libraries
Supports
- Dart supplies core libraries for collections, asynchronous programming, conversion, math, I/O, and platform integration
- Library availability differs between multi-platform, native, and web targets
- The API reference provides exact library member documentation
- https://dart.dev/tools/dart-tool
Supports
- The dart command is the command-line interface to the SDK
- SDK commands create, format, analyze, test, run, document, and compile Dart projects
- Dart pub subcommands manage packages
- https://dart.dev/tools/pub/packages
Supports
- A package uses a pubspec for metadata and dependencies
- Packages can depend on libraries hosted on pub.dev
- Package imports use package URIs
- https://dart.dev/tools/pub/package-layout
Supports
- Public libraries belong under lib and public command-line tools under bin
- Tests conventionally belong under test and examples under example
- The pubspec sits at the package root
- https://dart.dev/tools/pub/cmd/pub-get
Supports
- Dart pub get resolves direct and transitive dependencies
- The command creates package configuration and lock information
- Pub uses compatible locked versions when possible
- https://api.dart.dev/
Supports
- The Dart API reference documents core libraries, types, members, and platform availability
- https://dart.dev/resources/language/spec
Supports
- The Dart language specification provides formal language syntax and semantics
