CopyWith class
Annotation used to indicate that the copyWith extension should be generated for the given class.
- Annotations
-
- @Target.new({TargetKind.classType})
Constructors
Properties
- constructor → String?
-
Set
constructorif you want to use a named constructor. The generated fields will be derived from this constructor. If not set, the unnamed constructor is used.final - copyWithNull → bool?
-
Set
copyWithNulltotrueif you want to usecopyWithNullfunction that allows you to nullify the fields. E.g.myInstance.copyWithNull(id: true, name: true). Default isfalse.final - hashCode → int
-
The hash code for this object.
no setterinherited
- immutableFields → bool?
-
Treats all fields as immutable by default when set to
true. Fields can still opt out using@CopyWithField(immutable: false). Defaults tofalse.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- skipFields → bool?
-
Prevent the library from generating
copyWithfunctions for individual fields e.g.instance.copyWith.id("123"). If you want to use only copyWith(...) function. Default isfalse.final
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