TomlViewerConfig.copyWith constructor

TomlViewerConfig.copyWith({
  1. bool? expandMode,
  2. Color? valueColor,
  3. Color? typeTextColor,
  4. Color? symbolColor,
  5. Color? nonRootKeyColor,
  6. Color? rootKeyColor,
  7. Color? keyColor,
})

Creates a copy of this configuration with optionally updated fields.

Implementation

factory TomlViewerConfig.copyWith({
  bool? expandMode,
  Color? valueColor,
  Color? typeTextColor,
  Color? symbolColor,
  Color? nonRootKeyColor,
  Color? rootKeyColor,
  Color? keyColor,
}) {
  return TomlViewerConfig(
    expandMode: expandMode ?? true,
    valueColor: valueColor ?? const Color.fromRGBO(255, 68, 68, 1.0),
    typeTextColor: typeTextColor ?? Colors.grey,
    symbolColor: symbolColor ?? Colors.grey,
    nonRootKeyColor: nonRootKeyColor ?? const Color.fromRGBO(0, 51, 153, 1.0),
    rootKeyColor: rootKeyColor ?? const Color.fromRGBO(0, 51, 153, 1.0),
    keyColor: keyColor ?? const Color.fromRGBO(0, 128, 128, 1.0),
  );
}