Lesson#9
Loops are used in any programming language to execute block of statements number of time. In Dart there are two loop structures/statements i.e. for and while.
Lesson#12
void main() { myFunc() { print("I am a function"); } myFunc();}// prints "I…
Lesson#14
A class is a blueprint of an object. Classes are defined with the keyword class in Dart.
void main() { Student st=Student("Ali", "Male", 20); st.show();}class Student { String? name, gender; int? age; Student(String name…
Lesson#10
Conditional execution means execution of block of statement is based on a condition. If a condition comes true then certain statements are executed. It is achieved in dart with the help of if statement and switch statements.
Lesson#11
The 2nd control structure in dart is switch. Switch statement is used for multiple conditions on the single variable.
void main() { var day = 3; switch(day) { case 1: print("Monday"); case 2: print("Tuesday")…
Lesson#13
import 'dart:io';void main() { print("Enter you name: "); String? name; name = stdin.readLineSync(); print("Hello $name");}
Example-2
import 'dart:io';void main() { int a,b,c; print("Enter a…