MessageModel class

Represents a single message returned as part of validation or processing results. This could be an info, warning, or error message depending on the type field.

Constructors

MessageModel({required String type, required String code, required String category, required String message, required String status})
Constructs a MessageModel with the given values.
MessageModel.fromJson(Map<String, dynamic> json)
Factory method to create a MessageModel instance from a JSON map.
factory

Properties

category → String
A classification or grouping of the message (e.g., "Validation", "BusinessRule").
final
code → String
The unique code identifying this message type or error.
final
hashCode → int
The hash code for this object.
no setterinherited
message → String
The human-readable message content.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
status → String
The status of the message or process this message relates to.
final
type → String
The type of the message (e.g., "INFO", "WARNING", "ERROR").
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts this MessageModel to a JSON map.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited