Reputation: 1
I use localization 2.1.0 (https://pub.dev/packages/localization). I have a file en_US.json:
"home": {
"welcome text": "This text is in english",
"my page": "My page"
}
How to call "welcome text".i18n() from "home" ?
String text = 'welcome text'.i18n(); // home?
print(text) // prints 'This text is in english'
Thanks
Upvotes: 0
Views: 200