Skip to content

Instantly share code, notes, and snippets.

@chooyan-eng
Created March 13, 2019 05:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chooyan-eng/831ddf062675e840d452fe6e2f94602a to your computer and use it in GitHub Desktop.
Save chooyan-eng/831ddf062675e840d452fe6e2f94602a to your computer and use it in GitHub Desktop.
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