Skip to content

Instantly share code, notes, and snippets.

@g123k
Created October 14, 2022 12:03
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 g123k/4587631d90754abe0f1f476a2c84801a to your computer and use it in GitHub Desktop.
Save g123k/4587631d90754abe0f1f476a2c84801a to your computer and use it in GitHub Desktop.
Code Flutter Digest #95
class Cow {
void moo() {
print('moo');
}
}
class Ranch {
Ranch([Cow? cow])
: _cow = cow ?? Cow()
..moo();
late final Cow _cow;
}
void main() {
Ranch();
Ranch(Cow());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment