From 62ba3929283a572588bcb96bb3518b6693a18324 Mon Sep 17 00:00:00 2001 From: hatem Date: Tue, 26 Oct 2021 21:06:56 +0200 Subject: [PATCH] update .readMe --- README.md | 9 +++++ .../modules/message/views/message_view.dart | 38 ++++++++++--------- .../room/views/widgets/message_with_icon.dart | 30 +++++++++------ 3 files changed, 47 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 9439cd12..3e920baf 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ **Quick Review** ![carbon](https://user-images.githubusercontent.com/37384769/137525753-03155709-c903-4b4d-89bf-ee40e0525d63.png) +### Android

@@ -15,6 +16,14 @@

+### IOS
+

+ + +

+ + + Don't forget to see the example attached to github here V_CHAT_SDK Example
diff --git a/lib/src/modules/message/views/message_view.dart b/lib/src/modules/message/views/message_view.dart index 94bfeb53..04ee3ec9 100644 --- a/lib/src/modules/message/views/message_view.dart +++ b/lib/src/modules/message/views/message_view.dart @@ -92,26 +92,28 @@ class _MessageViewState extends State { const SizedBox( height: 2, ), - Obx(() { - final _room = roomController.rooms.firstWhere( - (element) => element.id == roomController.currentRoomId!); - final bkId = _room.blockerId; - if (bkId != 0) { - if (bkId == controller.myModel!.id) { - // i the blocker - return t.chatHasBeenClosedByMe().text; - } else { - return t.chatHasBeenClosed().text; + SafeArea( + child: Obx(() { + final _room = roomController.rooms.firstWhere( + (element) => element.id == roomController.currentRoomId!); + final bkId = _room.blockerId; + if (bkId != 0) { + if (bkId == controller.myModel!.id) { + // i the blocker + return t.chatHasBeenClosedByMe().text; + } else { + return t.chatHasBeenClosed().text; + } } - } - final res = controller.isRecordWidgetEnable.value; - if (res) { - return const MessageRecordView(); - } else { - return const MessageTextFieldView(); - } - }), + final res = controller.isRecordWidgetEnable.value; + if (res) { + return const MessageRecordView(); + } else { + return const MessageTextFieldView(); + } + }), + ), const SizedBox( height: 10, ), diff --git a/lib/src/modules/room/views/widgets/message_with_icon.dart b/lib/src/modules/room/views/widgets/message_with_icon.dart index 7e61f741..2462408f 100644 --- a/lib/src/modules/room/views/widgets/message_with_icon.dart +++ b/lib/src/modules/room/views/widgets/message_with_icon.dart @@ -50,19 +50,25 @@ class MessageWithIcon extends StatelessWidget { return Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - _room.lastMessage.content.h6 - .maxLine(1) - .size(16.5) - .alignStart - .overflowEllipsis - .black, - Container( - padding: const EdgeInsets.all(5), - decoration: const BoxDecoration( - color: Colors.blueGrey, - shape: BoxShape.circle, + Flexible( + flex: 4, + child: _room.lastMessage.content.h6 + .maxLine(1) + .size(16.5) + .alignStart + .overflowEllipsis + .black, + ), + Flexible( + flex: 1, + child: Container( + padding: const EdgeInsets.all(5), + decoration: const BoxDecoration( + color: Colors.blueGrey, + shape: BoxShape.circle, + ), + child: "1".s2.color(Colors.white), ), - child: "1".s2.color(Colors.white), ) ], );