Created
March 13, 2019 05:49
-
-
Save chooyan-eng/831ddf062675e840d452fe6e2f94602a to your computer and use it in GitHub Desktop.
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() { | |
var clazz = MyClass(); | |
clazz..printNum() // -> 1 | |
..increment(1) | |
..printNum(); // -> 2 | |
} | |
class MyClass { | |
var num = 1; | |
printNum() { | |
print(num); | |
} | |
increment(int i) { | |
num += i; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment