Dart Datatypes
Overview
Let’s learn about Dart datatypes in this tutorial. Dart is a statically typed programming language, meaning every variable has a specific type associated with it.
Dart Datatypes
Basic data types in Dart programming language are as follows:
Numbers
int: Represents integer values, such as 9, 15, -7, etc.
double: Represents floating-point values with decimal places, such as 3.14, -0.79, etc.
Strings
String: Represents a sequence of characters, enclosed in single or double quotes, such as “Hello”, ‘TestingDocs’, etc.
Boolean
bool: Represents a boolean value, which can be either true or false.
Lists
List: Represents an ordered collection of objects. Lists in Dart can contain objects of any type.
Map
Map: Represents a collection of key-value pairs. Maps in Dart can have keys and values of any type.
Set
Set: Represents an unordered collection of unique objects. Sets in Dart can contain objects of any type.
Runes
Runes: Represents a sequence of Unicode characters. Runes are used to represent special characters or emoji.
Symbol
Symbol: Represents an identifier that is used internally by Dart to represent operators, declarations, etc.
Additionally, Dart programing language provides support for defining custom classes, enums, and type annotations to create more complex data structures.
—
Dart Tutorials
Dart tutorial on this website can be found at:
https://www.testingdocs.com/dart-tutorials-for-beginners/
More information on Dart: