forked from eatvio/eatvio_app
feat(order info): added order info screen
This commit is contained in:
@@ -8,7 +8,7 @@ import 'package:go_router/go_router.dart';
|
||||
class ChatEntryWidget extends StatefulWidget {
|
||||
final ChatRoom chatRoom;
|
||||
|
||||
ChatEntryWidget({
|
||||
const ChatEntryWidget({
|
||||
required this.chatRoom,
|
||||
super.key,
|
||||
});
|
||||
@@ -29,10 +29,10 @@ class _ChatEntryWidgetState extends State<ChatEntryWidget> {
|
||||
},
|
||||
),
|
||||
child: Ink(
|
||||
padding: EdgeInsets.all(12),
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
color: Color(0xFFF6FAFF),
|
||||
color: const Color(0xFFF6FAFF),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@@ -52,10 +52,10 @@ class _ChatEntryWidgetState extends State<ChatEntryWidget> {
|
||||
Text(
|
||||
widget.chatRoom.users.toChatUser.name.length <= 20
|
||||
? widget.chatRoom.users.toChatUser.name
|
||||
: widget.chatRoom.users.toChatUser.name.substring(0, 20) + '...',
|
||||
: '${widget.chatRoom.users.toChatUser.name.substring(0, 20)}...',
|
||||
style: theme.textTheme.titleMedium,
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
const SizedBox(height: 8),
|
||||
if (widget.chatRoom.lastMessage != null)
|
||||
SizedBox(
|
||||
width: MediaQuery.sizeOf(context).width * 0.5,
|
||||
@@ -68,22 +68,22 @@ class _ChatEntryWidgetState extends State<ChatEntryWidget> {
|
||||
),
|
||||
],
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
if (widget.chatRoom.lastMessage != null)
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 8),
|
||||
padding: const EdgeInsets.only(left: 8),
|
||||
child: Text(
|
||||
widget.chatRoom.lastMessage!.updatedAt.format('dd MMM', 'ru'),
|
||||
style: theme.textTheme.bodyMedium,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 4),
|
||||
const SizedBox(height: 4),
|
||||
if (widget.chatRoom.unreadMessagesCount > 0)
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 6),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 6),
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: appTheme.blueA400,
|
||||
|
||||
Reference in New Issue
Block a user