later method

  1. @Deprecated('Replace with get, count, gender or translate')
String later(
  1. String text, [
  2. Map<String, dynamic>? map,
  3. Map<String, MustacheFilter>? filters
])

Return the string using map and filters to replace the mustache-like variables. Useful to later translate the strings using proper keys. Intentionally marked as deprecated to generate a linter hint.

Implementation

@Deprecated('Replace with get, count, gender or translate')
String later(
  String text, [
  Map<String, dynamic>? map,
  Map<String, MustacheFilter>? filters,
]) {
  if (map == null) {
    return text;
  }

  final mustache = Mustache(
    map: map,
    filters: filters ?? const <String, MustacheFilter>{},
  );
  return mustache.convert(text);
}