Skip to content

Instantly share code, notes, and snippets.

View XeBastian's full-sized avatar
💻
Working from home

Ernest Sebastian XeBastian

💻
Working from home
View GitHub Profile
@XeBastian
XeBastian / language_repo.dart
Created January 14, 2023 09:46
Localization in flutter and persisting data to local storage
class LanguageRepo {
// contains all the values.
// for readability when the translations are too much, consider moving all translations to their own files like
// en_US.dart and assign the en_US in the following line to the referenced value
static Map<String, String> en_US = {
"hello": "Hello",
"good_morning": "Good Morning",
"i_love_you": "I Love you",
};
static Map<String, String> ny_NY = {