Lecture 4
Lecture 4
• Example
String message(bool isValid) {
return isValid ? 'This is valid' : 'This is not valid';
}
The above fu.nction adds two values and produces 7 as the output
IT Industry-Academia Bridge Program
Object Oriented Programming
• Dart is an object-oriented language. It supports object-oriented programming features
like Classes, Objects, Inheritance, Polymorphism, Interfaces, and Abstract classes.
• A class is a blueprint for creating objects. A class definition includes the following:
∙ Fields,
∙ Getters and setters
∙ Constructors
∙ Functions