List Of All Data Types Available Using Flutter Dart

admin_img Posted By Bajarangi soft , Posted On 05-11-2020

As we all know in every programming language Data types is the main base. Data types is a type of particular defined data holders used to hold a single or multiple type of data in every programming language. In Dart there are basically 6 Types of Data type available.

List Of All Data Types Available Using Flutter Dart

List Of All Data Types Available 
List of All data types in DART :-

  1. Numbers – int, double
  2. String
  3. Boolean
  4. List
  5. Map
  6. Runes
1.Numbers:-
   -  Integer: 
Integer is a type of non fractional number value without. Here non fractional means a value without point. Integer dose not support POINT values. It can only hold pure numeric values. See the example below.

  int tempNum = 123456789;
print(tempNum);
// Output should be : 123456789


- double : Double are basically bigger type of FLOAT values. It can hold fractional decimal values. In dart the double support 64 bit double prescription values. double also represents floating point literals.

 double i = 57.89;
 print(i);
 // Output should be 57.89


2. String :
  - String data type represents a sequence of multiple characters text also known as group of multiple characters. In Dart string is sequence of UTF-16 code units. String can be created using both single quotes and double quotes but both should be same a creation time.

String name1 = 'Flutter';
String name2 = "Examples";
print(name1 + ' ' +name2);
// Output should be Flutter Examples


3. Boolean :
    Boolean data type is used to hold true and false values. Boolean data type uses the ‘bool‘ keyword on declaration time.

bool value1 = true;
bool value2= false; 
print(value1);
print (value2);
// Output should be true & false


4. List : 
    - List is a group of multiple data with same data type like a collection box. We could say List is like an Array
      to hold same type of multiple values
. The store in ordered sequence in List and Like array every single ITEM of List can be accessed via its index number.


 List<int> rollNum = List(6);
  rollNum[0] = 0;  
  rollNum[1] = 9;
  rollNum[2] = 8;
  rollNum[3] = 7;
  rollNum[4] = 6;
  rollNum[5] = 5;

  for (int elements in rollNum) {
    print(elements);
  }

// Output should be :

0
9
8
7
6
5

5. Map:
Same as List data type Map data type is also a type of group of multiple values. In Map the data stored in key:value pairs format. There is no bound for key value they can be in any type. Map date can also have null type of values. Map are like objects with multiple values.

var temp = {
    "roll_number": "123",
    "phoneNumber": "0987654321",
    "name": "Jay",
  };
print(temp);

// Output should be : {roll_number: 123, phoneNumber: 0987654321, name: Jay}



6. Runes : 
    Rune data type in a integer representing of a Unicode data point. We can create different type of shapes that dose supported by Unicode using runes.

var heart = '\u2665';  
print(heart);
Output should be : ♥

Related Post