SupabaseResponse constructor

const SupabaseResponse(
  1. dynamic data, {
  2. Map<String, String>? headers,
  3. List<SupabaseResponse> realtimeSubsequentReplies = const [],
  4. 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:

final resp = SupabaseResponse([
  await mock.serialize(MyModel(name: 'Demo 1', id: '1')),
  await mock.serialize(MyModel(name: 'Demo 2', id: '2')),
]);

Implementation

const SupabaseResponse(
  this.data, {
  this.headers,
  this.realtimeSubsequentReplies = const [],
  this.realtimeSubsequentReplyDelay = const Duration(milliseconds: 30),
});