Skip to content

Instantly share code, notes, and snippets.

@doyle-flutter
Created January 29, 2024 02:34
Show Gist options
  • Save doyle-flutter/229d366f4b0fcd281d1dc3ee4f0a7bdd to your computer and use it in GitHub Desktop.
Save doyle-flutter/229d366f4b0fcd281d1dc3ee4f0a7bdd to your computer and use it in GitHub Desktop.
class01 class & obj
void main() {
new Object();
Object();
Model().a;
Model().func();
Model().func2();
Model().func3();
Model m1 = Model();
m1.func2();
m1.func3();
final m2 = Model();
}
class Object{}
class Model{
int a = 0;
void func(){}
void func2(){
this.a += 1;
}
void func3(){
print(this.a);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment