From d5179d5e3d3c04f5f361d42e692e89d6c714da86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20M=C3=BCller?= Date: Tue, 21 Feb 2023 14:31:46 +0100 Subject: [PATCH] Added "pull to refresh" to Talk Roomlist --- lib/screen/pages/talk/chatList.dart | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/screen/pages/talk/chatList.dart b/lib/screen/pages/talk/chatList.dart index 88358f7..c3f52e7 100644 --- a/lib/screen/pages/talk/chatList.dart +++ b/lib/screen/pages/talk/chatList.dart @@ -90,7 +90,14 @@ class _ChatListState extends State { )); } - return ListView(children: chats); + return RefreshIndicator( + color: Theme.of(context).primaryColor, + onRefresh: () { + Provider.of(context, listen: false).run(); + return Future.delayed(const Duration(seconds: 3)); + }, + child: ListView(children: chats), + ); }, ); }