AnnotationResult class

Container for validation results.

Implemented types
Available extensions

Constructors

AnnotationResult({required List<AnnotationMessage> messages})
Creates a new AnnotationResult.
AnnotationResult.combine(List<AnnotationResult> results)
Combines multiple AnnotationResults into one.
AnnotationResult.empty()
Creates an empty AnnotationResult.

Properties

errorText String?

Available on AnnotationResult, provided by the AnnotationResultExtensions extension

Gets the error message if there are any errors, or null if there are no errors.
no setter
hasErrors bool
Returns true if this result contains any error messages.
no setter
hashCode int
The hash code for this object.
no setterinherited
messages List<AnnotationMessage>
List of messages produced by the validation.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

asAnnotationResult() AnnotationResult
Converts this to an AnnotationResult.
override
buildMessages() List<String>
Resolves all message into a list of strings.
maybeTransform(AnnotationTransformer? func) AnnotationResult

Available on AnnotationResult, provided by the AnnotationResultExtensions extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(String id) AnnotationResult

Available on AnnotationResult, provided by the AnnotationResultExtensions extension

replace(String id, {MessageTransformer? func, String? message}) AnnotationResult

Available on AnnotationResult, provided by the AnnotationResultExtensions extension

toString() String
A string representation of this object.
inherited
translate(DogEngine engine) AnnotationResult
Translates all messages in this result using engine.
withTarget(String target) AnnotationResult
Replaces the target of all messages in this result with target.
withVariables(Map<String, String> variables) AnnotationResult
Replaces all variables in this result with variables.

Operators

operator +(AnnotationResultLike? other) AnnotationResult
Combines this with another AnnotationResultLike.
override
operator ==(Object other) bool
The equality operator.
inherited