ContainsRule<T> class

Ensures that value contains given element.

Works with nulls by always throwing validation error. Works with Iterables (List, Set). Works with String when element is a Pattern. Works with Map assuming that element is a key or when element is a MapEntry it checks for value equality at the given MapEntry key.

Inheritance

Constructors

ContainsRule(T element, String message)

Properties

element → T
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
toString() String
A string representation of this object.
override
validate(dynamic value) ValidationError?
override

Operators

operator ==(Object other) bool
The equality operator.
inherited