CancelledException class

Exception thrown when a query operation is cancelled.

This exception is caught silently by the query system and does not propagate to error handlers or update query state to error.

Example:

queryFn: (token) async {
  token.throwIfCancelled();
  final result = await fetchData();
  token.throwIfCancelled();
  return result;
}
Implemented types

Constructors

CancelledException([String message = 'Operation was cancelled'])
Creates a CancelledException with the given message.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
message String
A message describing why the operation was cancelled.
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

Operators

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