StateError class
The operation was not allowed by the current state of the object.
Should be used when this particular object is currently in a state which doesn't support the requested operation, but other similar objects might, or the object itself can later change its state to one which supports the operation.
Example: Asking for list.first
on a currently empty list.
If the operation is never supported by this object or class,
consider using UnsupportedError instead.
This is a generic error used for a variety of different erroneous actions. The message should be descriptive.
Constructors
- StateError.new(String message)
Properties
- 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
- stackTrace â StackTrace?
-
The stack trace at the point where this error was first thrown.
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
Operators
-
operator ==(
Object other) â bool -
The equality operator.
inherited