Flutter Framework: Data Types in Dart
Flutter is a multi-platform framework using the Dart Programming Language. Here is the list of built-in data types that can be used in Flutter:
- Numbers
int, double
- Booleans
bool
- Lists
List, also known as arrays
- Sets
Set
- Strings
String
- Maps
Map
- Runes
Runes; often replaced by the characters API
- Symbols
Symbol
- The value null
Null
- Object, the superclass of all Dart classes
Object
Future
and Stream
are used in asynchrony support.Iterable
is used in loop iterations. Never
it is often used to express the return value for functions that always throw an exception.dynamic
allows you to disable static checking. void
indicates that a value is never used and is often used as a return type.late
is used to define non-nullable variables that initialize after its declaration. Is basically lazily initializing a variable.- Use
final
for variables that won’t change their value. Value of a final variable can only be set once. const
is used to declare compile-time constants.