trArgs method

String trArgs([
  1. List<String> args = const <String>[]
])

Returns a translated string with arguments replaced.

args is a list of strings representing arguments to be replaced in the translated string.

Implementation

String trArgs([List<String> args = const <String>[]]) {
  String key = tr;
  if (args.isNotEmpty) {
    for (final String arg in args) {
      key = key.replaceFirst(RegExp("%s"), arg);
    }
  }
  return key;
}