Json class
decorator used to influence json serialization for fields
Constructors
- Json({String name = "", bool ignore = false, bool includeNull = true, bool required = true, Object? defaultValue})
-
Create a Json
namename overrideignoreif true, this field will not be serializedincludeNullif true, nulls will be serialized.requiredif true, the JSON is expected to have a valuedefaultValuedefault in case of a not supplied json valueconst
Properties
- defaultValue → Object?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- ignore → bool
-
final
- includeNull → bool
-
final
- name → String
-
final
- required → bool
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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