Skip to content

Instantly share code, notes, and snippets.

View abdorll's full-sized avatar
🧑‍💻
Coding...

Abdullah Opadeji abdorll

🧑‍💻
Coding...
View GitHub Profile
// WITHIN A SINGLE FILE, IT WON'T WORK
class Employee {
// Private property
var _name;
// Getter method to access private property _name
String getName() {
return _name;
}
class Book {
// Private Properties
String? _title;
String? _author;
double? _price;
// Getter to read the private property _title
String get title => this._title!;
// Setter to update the private property _title
//============Syntax
class ParentClassOrSuperClass {
// Parent class properties and methods
}
class ChildClassOrSubClass extends ParentClassOrSuperClass {
// Child class properties and methods
}
// =================Parent class
void main() {
//polymorphism
}
void main() {
//static
}
void main() {
//enums
}
void main() {
//abstract class
}