PollValidationError class sealed
Union representing the possible validation errors while creating a poll.
The errors are used to provide feedback to the user about what went wrong while creating a poll.
- Annotations
-
- @freezed
Constructors
-
PollValidationError.duplicateOptions(List<
PollOption> options) -
Occurs when the poll contains duplicate options.
constfactory
-
PollValidationError.maxVotesAllowed(int maxVotesAllowed, {required Range<
int> range}) -
Occurs when the poll max votes allowed is not within the allowed range.
constfactory
-
PollValidationError.nameRange(String name, {required Range<
int> range}) -
Occurs when the poll question length is not within the allowed range.
constfactory
-
PollValidationError.optionsRange(List<
PollOption> options, {required Range<int> range}) -
Occurs when the poll options count is not within the allowed range.
constfactory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited