FakeSupabaseHandler class
In-memory SupabaseHandler double for unit-testing repositories and
cubits without the Supabase SDK. Mirrors FakeNetworkHandler from
package:simple_network_handler/testing.dart — see it for usage.
- Inheritance
-
- Object
- SupabaseHandler
- FakeSupabaseHandler
Constructors
- FakeSupabaseHandler({Result? defaultResult})
Properties
- callCount ↔ int
-
Number of
safeCallinvocations so far.getter/setter pair - defaultResult ↔ Result?
-
Returned when the queue is empty;
nullmeans an empty queue throws.getter/setter pair - enableDebugLogging ↔ bool
-
Whether caught errors are logged with
debugPrint.getter/setter pairinherited - errorRegistry → SupabaseErrorRegistry
-
The registry consulted for every mapping decision of this handler.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- onFailure ↔ FailureObserver?
-
Called for every Err this handler produces from a caught exception
(see FailureObserver). Exceptions thrown by the observer itself are
swallowed — observability must never break error propagation.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
enqueue(
Result result) → void -
Queues
resultfor the next call. -
enqueueErr(
Failure failure) → void - Queues a failure.
-
enqueueOk(
Object? value) → void -
Queues a success carrying
value. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
safeCall<
T> (Future< T> request(), {Result<T> ? onError(Object error)?}) → Future<Result< T> > -
Safely executes a Supabase operation and returns a Result.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited