trAsync function
Future<String>
trAsync(
- BuildContext context,
- StringLocale string, {
- Map<
String, Object?> args = const {},
Implementation
Future<String> trAsync(BuildContext context, sl.StringLocale string,
{Map<String, Object?> args = const {}}) {
final scope = StringLocaleScope._inherited(context);
return scope.bundle.has(string.id)
? scope.bundle.resolveAsync(scope.locale, string.id, args)
: Future.value(string.resolve(locale: scope.locale, args: args));
}