Created
January 29, 2024 02:34
-
-
Save doyle-flutter/229d366f4b0fcd281d1dc3ee4f0a7bdd to your computer and use it in GitHub Desktop.
class01 class & obj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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