使用Overlay来弹出聊天窗口
This commit is contained in:
@@ -27,7 +27,6 @@ class ChatWindowContent extends StatefulWidget {
|
||||
|
||||
class _ChatWindowContentState extends State<ChatWindowContent> {
|
||||
final ScrollController _scrollController = ScrollController();
|
||||
bool _isInitialized = false;
|
||||
int _lastMessageCount = 0;
|
||||
|
||||
@override
|
||||
@@ -36,9 +35,6 @@ class _ChatWindowContentState extends State<ChatWindowContent> {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
final messageService = Provider.of<MessageService>(context, listen: false);
|
||||
messageService.removeNonListeningMessages();
|
||||
setState(() {
|
||||
_isInitialized = true;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -73,10 +69,6 @@ class _ChatWindowContentState extends State<ChatWindowContent> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (!_isInitialized) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
||||
final minHeight = widget.minHeight ?? 0;
|
||||
final maxHeight = widget.maxHeight ?? double.infinity;
|
||||
final chatWidth = widget.chatWidth ?? double.infinity;
|
||||
|
||||
Reference in New Issue
Block a user