Skip to content

Instantly share code, notes, and snippets.

@Keksinautin
Created June 27, 2018 08:28
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 Keksinautin/d27bcac5067771c74f42b5b73b14eb37 to your computer and use it in GitHub Desktop.
Save Keksinautin/d27bcac5067771c74f42b5b73b14eb37 to your computer and use it in GitHub Desktop.
What is the right way here?
void main() {
final a = ['11', '22', '33'];
final m = new Map<String, int>.fromIterable(
a,
key: (String s) => s.substring(1),
value: (String s) => s.codeUnitAt(0),
);
print(m);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment