tr method
Dynamically replaces the source string by the corresponding translated string in the current language if available.
if the args
Map si provided, the placeholders beginning with the % character
and named by a key of the map are replaced by the corresponding value in the map.
String birthdayMsg = 'Happy birthday %name, you are %age years old'.tr({name: 'Peter', age: '21'});
// untranslated string value : 'Happy birthday Peter, you are 21 years old'
// french string value : 'Bon anniversaire Peter, tu as 21 ans'
Implementation
String tr([Map<String, dynamic>? args]) => I18nOMatic.instance.tr(this, args);