localize method
Tries to localize text by given key
.
Enable/Disable debug mode to show/hide missing localizations.
Implementation
String localize(String key) {
if (_data.containsKey(key)) {
return _data[key];
}
return debug ? '${key}_$_locale' : '';
}