I'm using flutter_localizations to internationalize my app. So i have this class
final Article article;
ArticleViewModel({required this.article});
String get name {
return article.name;
}
String get isGood {
return article.isGoods ? 'Goods' : 'Services';
}
}
Inside the isGood getter, i need to return "Goods" or "Services" translated depending on the language
but i don't have the context to call Applocalization.of(context)
I need a good approach to achieve this wihthout passing a BuildContext as parameter.