ConstraintError class
Represents an error that occurred due to a violated constraint.
It holds the constraint that failed, a descriptive message, and optional context providing more details about the failure.
- Annotations
-
- @immutable
Constructors
-
ConstraintError({required Constraint constraint, required String message, Map<
String, Object?> ? context}) -
const
Properties
- constraint → Constraint
-
final
- constraintKey → String
-
The unique key of the constraint that failed.
no setter
-
context
→ Map<
String, Object?> ? -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- message → String
-
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
-
toMap(
) → Map< String, Object?> - Serializes this error to a map.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited