Freezed class Null safety

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})
{@template freezed_annotation.freezed}
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 [...]
@JsonKey(defaultValue: true), 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
hashCode int
The hash code for this object. [...]
read-only, inherited
makeCollectionsUnmodifiable bool?
If true, then this converts List, Map and Set into respectively UnmodifiableListView, UnmodifiableMapView or UnmodifiableSetView.
@JsonKey(defaultValue: true), final
map FreezedMapOptions?
Options for customizing the generation of map functions [...]
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
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. [...]
@JsonKey(defaultValue: 'runtimeType'), 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 non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

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