everything but chat

This commit is contained in:
Christien Rioux 2024-01-30 19:47:22 -05:00
parent ba73123702
commit 2e4deb2038
6 changed files with 23 additions and 65 deletions

View file

@ -1,10 +1,7 @@
import 'package:awesome_extensions/awesome_extensions.dart';
import 'package:fast_immutable_collections/fast_immutable_collections.dart';
import 'package:flutter/material.dart';
import '../../../../proto/proto.dart' as proto;
import '../../../account_manager/account_manager.dart';
import '../../../tools/tools.dart';
import '../../../../chat_list/chat_list.dart';
class ChatsPage extends StatefulWidget {
const ChatsPage({super.key});
@ -30,16 +27,8 @@ class ChatsPageState extends State<ChatsPage> {
@override
// ignore: prefer_expression_function_bodies
Widget build(BuildContext context) {
final contactList = ref.watch(fetchContactListProvider).asData?.value ??
const IListConst([]);
final chatList =
ref.watch(fetchChatListProvider).asData?.value ?? const IListConst([]);
return Column(children: <Widget>[
if (chatList.isNotEmpty)
ChatSingleContactListWidget(
contactList: contactList, chatList: chatList)
.expanded(),
if (chatList.isEmpty) const EmptyChatListWidget().expanded(),
const ChatSingleContactListWidget().expanded(),
]);
}
}