Solian/lib/widgets/chat/chat_event_action_log.dart

43 lines
919 B
Dart
Raw Normal View History

2024-06-27 16:59:11 +00:00
import 'package:flutter/material.dart';
import 'package:get/get.dart';
class ChatEventMessageActionLog extends StatelessWidget {
final Widget icon;
final String text;
2024-06-27 18:49:28 +00:00
final bool isQuote;
2024-06-27 16:59:11 +00:00
final bool isMerged;
final bool isHasMerged;
const ChatEventMessageActionLog({
super.key,
required this.icon,
required this.text,
this.isMerged = false,
this.isHasMerged = false,
2024-06-27 18:49:28 +00:00
this.isQuote = false,
2024-06-27 16:59:11 +00:00
});
@override
Widget build(BuildContext context) {
return Opacity(
opacity: 0.75,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
icon,
const SizedBox(width: 4),
Text(text),
],
).paddingOnly(
2024-06-27 18:49:28 +00:00
left: isQuote ? 0 : (isMerged ? 64 : 12),
2024-06-27 16:59:11 +00:00
top: 2,
2024-08-06 12:00:13 +00:00
bottom: isQuote
? 0
: isHasMerged
? 2
: 0,
2024-06-27 16:59:11 +00:00
),
);
}
}