Per channel skeleton
This commit is contained in:
@@ -4,6 +4,7 @@ import 'package:supabase_flutter/supabase_flutter.dart';
|
||||
import '../models/user_office.dart';
|
||||
import 'supabase_provider.dart';
|
||||
import 'stream_recovery.dart';
|
||||
import 'realtime_controller.dart';
|
||||
|
||||
final userOfficesProvider = StreamProvider<List<UserOffice>>((ref) {
|
||||
final client = ref.watch(supabaseClientProvider);
|
||||
@@ -21,6 +22,8 @@ final userOfficesProvider = StreamProvider<List<UserOffice>>((ref) {
|
||||
return data.map(UserOffice.fromMap).toList();
|
||||
},
|
||||
fromMap: UserOffice.fromMap,
|
||||
channelName: 'user_offices',
|
||||
onStatusChanged: ref.read(realtimeControllerProvider).handleChannelStatus,
|
||||
);
|
||||
|
||||
ref.onDispose(wrapper.dispose);
|
||||
|
||||
Reference in New Issue
Block a user