remember chat window last position

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
This commit is contained in:
Sahil Yeole
2023-09-04 01:45:48 +05:30
parent 969eeff636
commit 9cce56caf8
2 changed files with 21 additions and 6 deletions

View File

@@ -72,6 +72,13 @@ class ChatModel with ChangeNotifier {
RxInt mobileUnreadSum = 0.obs;
MessageKey? latestReceivedKey;
Offset chatWindowPosition = Offset(20, 80);
void setChatWindowPosition(Offset position) {
chatWindowPosition = position;
notifyListeners();
}
@override
void dispose() {
textController.dispose();
@@ -210,7 +217,7 @@ class ChatModel with ChangeNotifier {
}
},
child: DraggableChatWindow(
position: chatInitPos ?? Offset(20, 80),
position: chatInitPos ?? chatWindowPosition,
width: 250,
height: 350,
chatModel: this));