CrystallisData constructor

const CrystallisData({
  1. bool mutable = true,
  2. bool toString = true,
  3. bool equals = true,
  4. bool hashCode = true,
  5. bool useDeepEquality = false,
  6. bool copyWith = true,
  7. bool useDeepCopy = false,
  8. bool deserialize = true,
  9. Crystallis? config,
})

Annotation to configure data class behavior. Allows specifying whether the generated data class is mutable.

Implementation

const CrystallisData({
  this.mutable = true,
  // these are being redirected due to shorter naming
  bool toString = true,
  bool equals = true,
  bool hashCode = true,
  this.useDeepEquality = false,
  bool copyWith = true,
  this.useDeepCopy = false,
  bool deserialize = true,

  /// (see [config])
  Crystallis? config,
})  : enableToString = toString,
      enableEquals = equals,
      enableHashCode = hashCode,
      enableCopyWith = copyWith,
      enableDeserialize = deserialize,
      _config = config;