From cce2d7099d795dadbe0d264b34f596c1f6e12dda Mon Sep 17 00:00:00 2001 From: MhdZiadHirati Date: Thu, 26 Oct 2023 13:23:13 +0300 Subject: [PATCH] messages notification bug fixed --- .../account/presentation_layer/screens/account.dart | 4 +++- .../card/presentation_layer/screens/card_details.dart | 7 +++++-- .../home/presentation_layer/screens/super_home.dart | 4 +++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/features/account/presentation_layer/screens/account.dart b/lib/features/account/presentation_layer/screens/account.dart index a71151f..da41cae 100644 --- a/lib/features/account/presentation_layer/screens/account.dart +++ b/lib/features/account/presentation_layer/screens/account.dart @@ -215,7 +215,9 @@ class AccountScreen extends StatelessWidget { } await chatController.checkSupportRoomStatus(onSuccess: (room) { room?.type = RoomType.support; - RoutingManager.to(RouteName.chatDetails, arguments: room); + RoutingManager.to(RouteName.chatDetails, arguments: { + "room": room, + }); }, onError: (err) { Toast.showToast(err.toString().tr); }); diff --git a/lib/features/card/presentation_layer/screens/card_details.dart b/lib/features/card/presentation_layer/screens/card_details.dart index 8615e0d..892755f 100644 --- a/lib/features/card/presentation_layer/screens/card_details.dart +++ b/lib/features/card/presentation_layer/screens/card_details.dart @@ -331,7 +331,10 @@ class CardDetailsScreen extends StatelessWidget { chatController.createRoom( chatUserId: cardModel.user.chatUserId, onSuccess: (room) { - RoutingManager.to(RouteName.chatDetails); + RoutingManager.to(RouteName.chatDetails, + arguments: { + "room": room, + }); }); } else { Toast.showToast( @@ -444,7 +447,7 @@ class CardDetailsScreen extends StatelessWidget { chatUserId: cardModel.user.chatUserId, onSuccess: (room) { RoutingManager.to(RouteName.chatDetails, - arguments: room); + arguments: {"room": room}); }); } else { Toast.showToast('you_have_no_internet_connection'.tr); diff --git a/lib/features/home/presentation_layer/screens/super_home.dart b/lib/features/home/presentation_layer/screens/super_home.dart index 32b645f..e3ac512 100644 --- a/lib/features/home/presentation_layer/screens/super_home.dart +++ b/lib/features/home/presentation_layer/screens/super_home.dart @@ -52,7 +52,9 @@ class SuperHome extends StatelessWidget { Room room = chatController.getRoomById(message.roomId)!; chatController.setCurrentRoom(room); - RoutingManager.to(RouteName.chatDetails, arguments: room); + RoutingManager.to(RouteName.chatDetails, arguments: { + "room": room, + }); }, backgroundColor: Colors.white, icon: const Icon(Icons.inbox),