ValidationResult class
Result of a validation check on a scan payload or result object.
- Annotations
Constructors
- ValidationResult({required bool isValid, required String reason, String? formattedValue, double confidence = 1.0})
-
const
- ValidationResult.invalid({required String reason, double confidence = 0.0})
-
Factory constructor for failed validation.
factory
- ValidationResult.valid({required String formattedValue, String reason = 'Validation passed successfully', double confidence = 1.0})
-
Factory constructor for successful validation.
factory
Properties
- confidence → double
-
Confidence rating from 0.0 to 1.0.
final
- formattedValue → String?
-
Clean, standardized, or formatted output string (if valid).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isValid → bool
-
Whether the scanned item passed validation checks.
final
- reason → String
-
Human-readable explanation of validation outcome or failure reason.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited