Canceller class

A class that helps manage the cancellation of asynchronous operations, particularly network requests made using the Dio package.

This class leverages the CancelToken from Dio to manage cancellation states, allowing operations such as HTTP requests to be cancelled when needed. It is useful in scenarios where multiple requests are in progress and you need to cancel certain operations, for example, when the user navigates away from a screen or when you want to stop an unnecessary request from completing.

Constructors

Canceller()
Constructor that initializes the CancelToken instance.

Properties

cancelToken → CancelToken
A getter that allows access to the current _cancelToken.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancel() → void
Cancels the ongoing operation associated with the _cancelToken.
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