Translator constructor

Translator(
  1. Map? map,
  2. String key, {
  3. required Locale locale,
  4. int? count,
  5. InterpolationOptions? interpolation,
  6. List<String>? fallbackKeys,
  7. String? defaultValue,
  8. Map<String, dynamic>? params,
})

Implementation

Translator(
  Map<dynamic, dynamic>? map,
  String key, {
  required this.locale,
  this.count,
  InterpolationOptions? interpolation,
  List<String>? fallbackKeys,
  String? defaultValue,
  Map<String, dynamic>? params,
})  : this._map = map ?? {},
      this._keys = [...(fallbackKeys ?? []), key],
      this._defaultValue = defaultValue ?? key,
      this._params = (params ?? {})..['count'] = count,
      this._interpolation = interpolation ?? InterpolationOptions();