createConfusedCopy method

TomlViewerConfig createConfusedCopy()

Creates a copy of this configuration with some random or confused properties.

Implementation

TomlViewerConfig createConfusedCopy() {
  final random = Random();

  return TomlViewerConfig(
    expandMode: random.nextBool(),
    valueColor: _randomizeColor(valueColor, random),
    typeTextColor: _randomizeColor(typeTextColor, random),
    symbolColor: _randomizeColor(symbolColor, random),
    nonRootKeyColor: _randomizeColor(nonRootKeyColor, random),
    rootKeyColor: _randomizeColor(rootKeyColor, random),
    keyColor: _randomizeColor(keyColor, random),
  );
}