Freezed class

Flags a class as needing to be processed by Freezed and allows passing options.

Annotations
  • @JsonSerializable(fieldRename: FieldRename.snake, createToJson: false, anyMap: true)

Constructors

Freezed({String? unionKey, FreezedUnionCase? unionValueCase, String? fallbackUnion, bool? copyWith, bool? equal, bool? toStringOverride, bool? fromJson, bool? toJson, FreezedMapOptions? map, FreezedWhenOptions? when, bool? makeCollectionsUnmodifiable, bool addImplicitFinal = true, bool genericArgumentFactories = false})
Flags a class as needing to be processed by Freezed and allows passing options.
const
Freezed.fromJson(Map json)
Decode the options from a build.yaml
factory

Properties

addImplicitFinal bool
Whether to assume that all constructor parameters are marked as final.
final
copyWith bool?
Whether to generate a copyWith or not
final
equal bool?
Whether to generate a ==/hashcode or not
final
fallbackUnion String?
Determines which constructor should be used when there is no matching one through constructor name or using FreezedUnionValue
final
fromJson bool?
Whether to generate a fromJson or not
final
genericArgumentFactories bool
Whether to enable the genericArgumentFactories feature of JsonSerializable
final
hashCode int
The hash code for this object.
no setterinherited
makeCollectionsUnmodifiable bool?
If true, then this converts List, Map and Set into respectively UnmodifiableListView, UnmodifiableMapView or UnmodifiableSetView.
final
map FreezedMapOptions?
Options for customizing the generation of map functions
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
toJson bool?
Whether to generate a toJson or not
final
toStringOverride bool?
Whether to generate a toString or not
final
unionKey String?
Determines what key should be used to de/serialize union types.
final
unionValueCase FreezedUnionCase?
Determines how the value used to de/serialize union types would be renamed.
final
when FreezedWhenOptions?
Options for customizing the generation of when functions
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