Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void main() {
- print('My first Dart App');
- // int, double, String, bool
- // variable name should not start with 0 - 9
- // variable name should not start with special characters (_,$)
- // vriable should not be a keyboard
- // case sensitive
- // comments
- // 1) to understand
- // 2) to prevent the code compilation
- /**
- * sasa
- * sa
- * sa
- * s
- * as
- * a
- * sa
- * s\sasa
- *
- * sasa
- */
- double price = 89.78;
- String name = "Dart Classes";
- String myDetails = """adadnanjknalfnafnn kdnklalknfanlfamdma
- sasas
- asasa
- s""";
- String collegeName = 'VITS';
- bool isAvaible = true;
- bool isNotAvaible = false;
- // datatype variableName = value;
- int Age = 30;
- var role = "Sr Software Developer";
- var salary = true;
- final myAge = 25; // final = var + final
- print("before $myAge");
- // myAge = 37;
- // print("after $myAge");
- // myAge = 89;
- // print("after $myAge");
- bool myGroup; // false
- // default value is null for every data type
- print(myGroup);
- // print("My age is $age and\n college is $collegeName");
- // print("college is $myDetails");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement