Dart is a Strongly Typed programming language. It means, each value you use in your programming language has a type either string or number and must be known when the code is compiled. Here, we are going to discuss the most common basic data types used in the Dart programming language.
| Data Type | Example | Descriptions |
|---|---|---|
| String | String myName = ‘javatpoint’; | It holds text. In this, you can use single or double quotation marks. Once you decide the quotation marks, you should have to be consistent with your choice. |
| num, int, double | int age = 25; double price = 125.50; | The num data type stands for a number. Dart has two types of numbers:Integer (It is a number without a decimal place.)Double (It is a number with a decimal place.) |
| Boolean | bool var_name = true; Or bool var_name = false; | It uses the bool keyword to represents the Boolean value true and false. |
| object | Person = Person() | Generally, everything in Dart is an object (e.g., Integer, String). But an object can also be more complex. |
Leave a Reply