Skip to content

Instantly share code, notes, and snippets.

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 foxanna/9c9f37240616fd5b3a34658547e529ab to your computer and use it in GitHub Desktop.
Save foxanna/9c9f37240616fd5b3a34658547e529ab to your computer and use it in GitHub Desktop.
class Translations implements i69n.I69nMessageBundle {
const Translations();
String get greetings => "Hello, world!";
Object operator [](String key) {
switch (key) {
case 'greetings':
return greetings;
default:
throw Exception('Message $key doesn\'t exist in $this');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment