Always use final (immutable) class attributes and local variables when possible.
Multiplatformní vývoj Flutter aplikací
Dart Language
Make sure you understand the syntax and semantics of the following Dart language constructs:
final
, var
, and const
, and when to use each._
) to manage access to private attributes and methods.!
, ??
, ?.
).List
and Map
, including useful methods and nested control structures (if
, for
)./
, ~/
, %
operators, cascade notation (..
), and null-aware assignment (??=
).
Prefer final