ValidationResult class
Result of a validation operation.
Constructors
-
ValidationResult({required bool isValid, required List<
String> errors, required ByteConverter size}) -
Creates a validation result.
const
Properties
-
errors
→ List<
String> -
List of validation error messages (empty if valid).
final
- firstError → String?
-
Returns the first error message, or null if valid.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isValid → bool
-
Whether the validation passed.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → ByteConverter
-
The size that was validated.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
throwIfInvalid(
[String? name]) → void - Throws ArgumentError if validation failed.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited