Data types

 void main()

{
/*1. int
2. Double
3. String
4. Boolean
5. List
6. Map
7. Dynamic*/

// int age = 10;
// print(age);

// double age1 = 10.10;
// print(age1);

// String age2 = "10.10";
// print(age2);

// bool age3 = true;
// print(age3);

// List age4 = [1,2,3,4,5];
// print(age4);

/// There is no restrictions about data types in "List" data type
// List age5 = [1,2, "Vishal", 23.44];
// print(age5);

///Defining data in the form of key-Value in Map data type
// Map arr = {"name": "vishal", "city": "Delhi"};
// print(arr);
// print(arr["city"]);

/// "var" data type, will dynamically identify the data type based on given data
// var arr3 = {"name" : "Aadit", "country" : "India"};
// var arr4 = 10;
// var arr5 = "10.22";
// var arr6 = false;
// print(arr3);
// print(arr4);
// print(arr5);
// print(arr6);

}

Comments

Popular posts from this blog

Second GET API Calling with Bloc simple Example in Flutter

Stack Container Scrollable Card widget UI with Custom Widget

Pagination with Bloc Pattern in Flutter