Created
September 13, 2019 18:14
-
-
Save jodinathan/38692eb9a3df223ac600a4890922abda to your computer and use it in GitHub Desktop.
checking named parameters
This file contains hidden or 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 foo({String bar = 'hi'}) { | |
print(bar); | |
} | |
void main() async { | |
bool s = true; | |
foo(bar: s ? 'hello' : null); | |
s = false; | |
foo(bar: s ? 'hello' : null); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment