Chat shell resizable

This commit is contained in:
LittleSheep 2024-10-14 00:13:01 +08:00
parent 8bbd964026
commit 6e442c144e

View File

@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_resizable_container/flutter_resizable_container.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:gap/gap.dart'; import 'package:gap/gap.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
@ -42,14 +43,20 @@ class ChatListShell extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return RootContainer( return RootContainer(
child: Row( child: ResizableContainer(
direction: Axis.horizontal,
divider: ResizableDivider(
thickness: 0.3,
color: Theme.of(context).dividerColor,
),
children: [ children: [
const SizedBox( const ResizableChild(
width: 360, minSize: 280,
maxSize: 520,
size: ResizableSize.pixels(320),
child: ChatList(), child: ChatList(),
), ),
const VerticalDivider(thickness: 0.3, width: 0.3), ResizableChild(child: child ?? const EmptyPagePlaceholder()),
Expanded(child: child ?? const EmptyPagePlaceholder()),
], ],
), ),
); );