DataClass class
Enable and customize data class generation.
Use build.yaml
file to set these settings globally
- Annotations
-
- @Target({TargetKind.classType})
Constructors
Properties
- buildable → bool?
-
Create a build class function and
*Builder
class. Default:false
final - changeable → bool?
-
Adds the
change
andtoChanges
method to the class. Default:false
final - changesVisible → bool?
-
Makes public the
*Changes
classes generated when changeable is enabled. Default:false
final - comparable → bool?
-
Overrides Object.== and Object.hashCode methods.
Default:
true
final - copyable → bool?
-
Adds the
copyWith
method to the class. Default:false
final - createFieldsClass → bool?
-
Create a class with all the field names of the class
Default:
false
final -
equalities
→ List<
Equality> -
This equality is used in the following methods Object.== and Object.hashCode.
final
- fieldsClassVisible → bool?
-
Makes public the
*Fields
classes generated when createFieldsClass is enabled. Default:true
final - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
Overrides Object.toString method.
Default:
true
Insertingstringify_type: fields
in the yaml file, the toString method will use all the fieldsfinal
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