CopyWith class
Annotation used to indicate that the copyWith
extension should be generated for the given class.
- Annotations
-
- @Target({TargetKind.classType})
Properties
- constructor → String?
-
Set
constructor
if 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
copyWithNull
totrue
if you want to usecopyWithNull
function 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
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- skipFields → bool?
-
Prevent the library from generating
copyWith
functions 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