Skip to content

Instantly share code, notes, and snippets.

@Sfshaza
Last active December 10, 2016 00:31
Show Gist options
  • Save Sfshaza/d988cfce0a54c6853799 to your computer and use it in GitHub Desktop.
Save Sfshaza/d988cfce0a54c6853799 to your computer and use it in GitHub Desktop.
ch02
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);
}
@kwalrath
Copy link

I've filed dart-lang/site-www#189 about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment