Skip to content

Instantly share code, notes, and snippets.

Created October 8, 2016 17:44
Show Gist options
  • Save anonymous/0c4c2cf678c9ff67eafc259432624afb to your computer and use it in GitHub Desktop.
Save anonymous/0c4c2cf678c9ff67eafc259432624afb to your computer and use it in GitHub Desktop.
jolly-boat-2677
// positional parameters by fatdragon2
say({String from,
String msg : "good morning america",
String device,
String version : '7'})
{
var result = '$from says $msg';
if (device != null) {
result = '$result with a $device ${version != null ? version : ""}';
}
print(result);
}
void main() {
say(from: 'tom', msg: 'hello world', device: 'iPhone', version: '7');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment