SupabaseResponse class
A simulated response from Supabase. This class is designed to DRY responses when used with the SupabaseMockServer. For example:
final resp = SupabaseResponse([
await mock.serialize(MyModel(name: 'Demo 1', id: '1')),
await mock.serialize(MyModel(name: 'Demo 2', id: '2')),
]);
Constructors
-
SupabaseResponse.new(dynamic data, {Map<
String, String> ? headers, List<SupabaseResponse> realtimeSubsequentReplies = const [], Duration realtimeSubsequentReplyDelay = const Duration(milliseconds: 30)}) -
A simulated response from Supabase. This class is designed to DRY responses
when used with the SupabaseMockServer. For example:
const
Properties
- data → dynamic
-
The payload that Supabase would have returned. This can be a map or a list of decoded JSON objects
final
-
flattenedResponses
→ List<
SupabaseResponse> -
All recursively-discovered realtimeSubsequentReplies
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ Map<
String, String> ? -
Additional headers that should be included in the response.
Supabase's client sometimes requires header values to properly parse the result
such as
{'content-range': '*/1'}
final -
realtimeSubsequentReplies
→ List<
SupabaseResponse> -
Additional replies sent after this instance's data.
Replies will be staggered by realtimeSubsequentReplyDelay.
final
- realtimeSubsequentReplyDelay → Duration
-
Amount of time to delay each realtimeSubsequentReplies
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.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited