L top-level property

StringsEn get L

Method A: Simple

No rebuild after locale change. Translation happens during initialization of the widget (call of L). Configurable via 'translate_var'.

Usage: String a = L.someKey.anotherKey; String b = L'someKey.anotherKey'; // Only for edge cases!

Implementation

StringsEn get L => LocaleSettings.instance.currentTranslations;