JsonModel class abstract
An abstract class representing a JSON model.
This class provides methods for handling JSON serialization and deserialization, managing fields, and handling errors, warnings, and informational messages.
- Mixed-in types
- Implementers
Constructors
Properties
- error → String?
-
Gets the first general error message.
no setter
-
errors
↔ Map<
String, String?> -
Map of field-specific errors.
getter/setter pair
-
fields
→ List<
JsonField> -
List of JSON fields representing the model attributes.
no setter
-
generalErrors
↔ List<
String> -
List of general errors.
getter/setter pair
-
generalInformations
↔ List<
String> -
List of general informational messages.
getter/setter pair
-
generalWarnings
↔ List<
String> -
List of general warnings.
getter/setter pair
- hasError → bool
-
Checks if the model has any errors.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasInformation → bool
-
Checks if the model has any informational messages.
no setter
- hasWarning → bool
-
Checks if the model has any warnings.
no setter
- information → String?
-
Gets the first general informational message.
no setter
-
informations
↔ Map<
String, String?> -
Map of field-specific informational messages.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- warning → String?
-
Gets the first general warning message.
no setter
-
warnings
↔ Map<
String, String?> -
Map of field-specific warnings.
getter/setter pair
Methods
-
fromJSON(
dynamic json) → void -
Deserializes the JSON data to the model.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJSON(
) → Map< String, dynamic> -
Serializes the model to JSON.
override
-
toString(
) → String -
Converts the model to a JSON string.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
String name) → dynamic - Gets the value of a field by name.
-
operator []=(
String name, dynamic value) → void - Sets the value of a field by name.