copyWith method

TomlViewerColors copyWith({
  1. Color? value,
  2. Color? type,
  3. Color? symbol,
  4. Color? nonRootKey,
  5. Color? rootKey,
  6. Color? tableKey,
  7. Color? arrayIndex,
  8. Color? arrayExpandable,
  9. Color? errorHighlight,
  10. Color? errorText,
  11. Color? searchHighlight,
  12. Color? lineNumber,
})

Creates a copy with optionally updated colours.

Implementation

TomlViewerColors copyWith({
  Color? value,
  Color? type,
  Color? symbol,
  Color? nonRootKey,
  Color? rootKey,
  Color? tableKey,
  Color? arrayIndex,
  Color? arrayExpandable,
  Color? errorHighlight,
  Color? errorText,
  Color? searchHighlight,
  Color? lineNumber,
}) {
  return TomlViewerColors(
    value: value ?? this.value,
    type: type ?? this.type,
    symbol: symbol ?? this.symbol,
    nonRootKey: nonRootKey ?? this.nonRootKey,
    rootKey: rootKey ?? this.rootKey,
    tableKey: tableKey ?? this.tableKey,
    arrayIndex: arrayIndex ?? this.arrayIndex,
    arrayExpandable: arrayExpandable ?? this.arrayExpandable,
    errorHighlight: errorHighlight ?? this.errorHighlight,
    errorText: errorText ?? this.errorText,
    searchHighlight: searchHighlight ?? this.searchHighlight,
    lineNumber: lineNumber ?? this.lineNumber,
  );
}