Last active
December 10, 2016 00:31
-
-
Save Sfshaza/d988cfce0a54c6853799 to your computer and use it in GitHub Desktop.
ch02
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
doStuff({List<int> list: const[1, 2, 3], | |
Map<String, String> gifts: const{'first': 'paper', | |
'second': 'cotton', | |
'third': 'leather'}}) { | |
print('list: $list'); | |
print('gifts: $gifts'); | |
} | |
main() { | |
// Use the default values for both parameters. | |
doStuff(); | |
// Use the default values for the "gifts" parameter. | |
doStuff(list:[4,5,6]); | |
// Don't use the default values for either parameter. | |
doStuff(list: null, gifts: null); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you ever need to update to Optional positional parameters in response to this milestone: dart-lang/site-www#180