diff --git a/lib/features/chat/presentation/pages/chats_screen.dart b/lib/features/chat/presentation/pages/chats_screen.dart index 03c3870a..6c4c2398 100644 --- a/lib/features/chat/presentation/pages/chats_screen.dart +++ b/lib/features/chat/presentation/pages/chats_screen.dart @@ -67,11 +67,16 @@ class _ChatsScreenState extends State { ), ]; }, - body: switch (state.state) { - BaseState.error => DataErrorWidget(onReload: () => context.read().getChatRooms()), - BaseState.success => _buildChatList(context, state), - _ => const Loader(), - }, + body: RefreshIndicator( + child: switch (state.state) { + BaseState.error => DataErrorWidget(onReload: () => context.read().getChatRooms()), + BaseState.success => _buildChatList(context, state), + _ => const Loader(), + }, + onRefresh: () async { + await context.read().getChatRooms(); + }, + ), ), ); },