AnnotationMessage class
A single message produced by a validator.
- Implemented types
- Annotations
Constructors
-
AnnotationMessage({required String id, required String message, String? target, Map<
String, String> variables = const {}}) - Creates a new AnnotationMessage.
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- id → String
-
Identifier for the type of the message, like "missing-field".
Multiple messages in a result set may have the same id.
final
- message → String
-
The message itself.
The engine may translate this message using the id.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- target → String?
-
Defines where the message is targeted at.
This must confront to a field name of the referenced structure or may be
null if not applicable to any individual field or if applicable to the
whole structure.
final
-
variables
→ Map<
String, String> -
Variables used in the message.
final
Methods
-
asAnnotationResult(
) → AnnotationResult -
Converts this to an AnnotationResult.
override
-
buildMessage(
) → String - Builds the message.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
translate(
DogEngine engine) → AnnotationMessage -
Translates this message using
engine. -
withMessage(
String message) → AnnotationMessage -
Replaces the string message with
message. -
withTarget(
String target) → AnnotationMessage -
Replaces the target of this message with
target. -
withVariables(
Map< String, String> variables) → AnnotationMessage -
Replaces all variables in this message with
variables.
Operators
-
operator +(
AnnotationResultLike? other) → AnnotationResult -
Combines this with another AnnotationResultLike.
override
-
operator ==(
Object other) → bool -
The equality operator.
override