copyWith method

DRLocale copyWith({
  1. String? language,
  2. Map<String, String>? errors,
  3. String? mutedUntil,
  4. String? deletedUser,
  5. String? unnamedGroup,
  6. String? system,
  7. String? you,
  8. Map<String, String>? summary,
  9. Map<String, String>? recall,
  10. Map<String, String>? tip,
  11. Map<String, String>? call,
})

替换其中的条目:各节的表按键合并(没给的键沿用原来的)。

Implementation

DRLocale copyWith({
  String? language,
  Map<String, String>? errors,
  String? mutedUntil,
  String? deletedUser,
  String? unnamedGroup,
  String? system,
  String? you,
  Map<String, String>? summary,
  Map<String, String>? recall,
  Map<String, String>? tip,
  Map<String, String>? call,
}) =>
    DRLocale(
      language: language ?? this.language,
      errors: errors == null ? this.errors : {...this.errors, ...errors},
      mutedUntil: mutedUntil ?? this.mutedUntil,
      deletedUser: deletedUser ?? this.deletedUser,
      unnamedGroup: unnamedGroup ?? this.unnamedGroup,
      system: system ?? this.system,
      you: you ?? this.you,
      summary: summary == null ? this.summary : {...this.summary, ...summary},
      recall: recall == null ? this.recall : {...this.recall, ...recall},
      tip: tip == null ? this.tip : {...this.tip, ...tip},
      call: call == null ? this.call : {...this.call, ...call},
    );