Category: 2. Data Types
-
Enumeratio
An enumeration is a set of values called as elements, members, etc. This is essential when we carried out the operation with the limited set of values available for variable. For example – you can think of the days of the month can only be one of the seven days – Sun, Mon, Tue, Wed,…
-
Runes
As we discussed earlier, Dart String is a sequence of characters, letters, numbers, and unique characters. It is the sequence of UTF – 16 Unicode characters where Dart Runes are the sequence UTF – 32 Unicode code points. It is a UTF-32 string which is used to print the special symbol. For example – The…
-
Symbol
Symbol object is used to specify an operator or identifier declared in a Dart programming language. Generally, we do not need to use symbols while Dart programming, but they are helpful for APIs. It usually refers to identifiers by name, because identifier names can vary but not identifier symbols. Dart symbols are dynamic string name…
-
Map
Dart Map is an object that stores data in the form of a key-value pair. Each value is associated with its key, and it is used to access its corresponding value. Both keys and values can be any type. In Dart Map, each key must be unique, but the same value can occur multiple times.…
-
Sets
The Dart Set is the unordered collection of the different values of the same type. It has much functionality, which is the same as an array, but it is unordered. Set doesn’t allow storing the duplicate values. The set must contain unique values. It plays an essential role when we want to store the distinct…
-
Lists
Dart List is similar to an array, which is the ordered collection of the objects. The array is the most popular and commonly used collection in any other programming language. The Dart list looks like the JavaScript array literals. The syntax of declaring the list is given below. The Dart list is defined by storing…
-
String
Dart String is a sequence of the character or UTF-16 code units. It is used to store the text value. The string can be created using single quotes or double-quotes. The multiline string can be created using the triple-quotes. Strings are immutable; it means you cannot modify it after creation. In Dart, The String keyword can be…
-
Number
The Number is the data type that is used to hold the numeric value. In Dart, It can be two types – Dart integer – Integer numbers are the whole numbers means that can be written without a fractional component. For example – 20, 30, -3215, 0, etc. An integer number can be signed or unsigned.…
-
Constants
Dart Constant is defined as an immutable object, which means it can’t be changed or modified during the execution of the program. Once we initialize the value to the constant variable, it cannot be reassigned later. Defining/Initializing Constant in Dart The Dart constant can be defined in the following two ways. It is beneficial when…