copyWith method

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

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

Implementation

DRLocale copyWith({
  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(
      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},
    );