Created
May 24, 2020 09:25
-
-
Save foxanna/9c9f37240616fd5b3a34658547e529ab to your computer and use it in GitHub Desktop.
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
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