reorganize

This commit is contained in:
Henry Hiles 2025-11-19 12:23:35 -05:00
commit b9a2e09e74
No known key found for this signature in database
10 changed files with 12 additions and 12 deletions

32
lib/pages/chat_page.dart Normal file
View file

@ -0,0 +1,32 @@
import "package:flutter/material.dart";
import "package:nexus/widgets/chat/room_chat.dart";
import "package:nexus/widgets/chat/sidebar.dart";
class ChatPage extends StatelessWidget {
const ChatPage({super.key});
@override
Widget build(BuildContext context) => LayoutBuilder(
builder: (context, constraints) {
final isDesktop = constraints.maxWidth > 650;
final showMembersByDefault = constraints.maxWidth > 1000;
return Scaffold(
body: Builder(
builder: (context) => Row(
children: [
if (isDesktop) Sidebar(),
Expanded(
child: RoomChat(
isDesktop: isDesktop,
showMembersByDefault: showMembersByDefault,
),
),
],
),
),
drawer: isDesktop ? null : Sidebar(),
);
},
);
}