CopyWithKey class

Use this class as an annotation for describing how specific fields should be treated by the copyWith code generator

Constructors

CopyWithKey({bool? ignoreSynthetic, bool? allowNullable, bool? considerEmptyCollectionAsNull, bool? ignore, bool? includeIfPrivate, bool? avoidConstructor, Object? defaultValue, Function? copyWithFunction})
const

Properties

allowNullable bool?
If true all nullable fields would get the value from copy without any null validation.
final
avoidConstructor bool?
If true the field will not be passed in constructor, otherwise will be set directly. Default: false
final
considerEmptyCollectionAsNull bool?
Indicates that an empty List, Set, Map or Iterable to be considered as a null value when deciding copyWith from newData or keep currentData. Default: true
final
copyWithFunction Function?
A Function to use when copyWith the annotated field.
final
defaultValue Object?
The value to use if the currentData or newData is null.
final
hashCode int
The hash code for this object.
no setterinherited
ignore bool
If true the field will not be taken into account when copyWith Default: false
final
ignoreSynthetic bool?
If true synthetic field will not be taken into account when copyWith. (Synthetic fields are those represented by set and get definitions)
final
includeIfPrivate bool?
If true the field will not be taken into account when copyWith Default: false
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited