mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-07 12:39:31 +01:00
53 lines
1.6 KiB
Dart
53 lines
1.6 KiB
Dart
|
import 'package:famedlysdk/famedlysdk.dart';
|
||
|
import 'package:fluffychat/utils/event_extension.dart';
|
||
|
import 'package:flutter/material.dart';
|
||
|
|
||
|
class ReplyContent extends StatelessWidget {
|
||
|
final Event replyEvent;
|
||
|
final bool lightText;
|
||
|
|
||
|
const ReplyContent(this.replyEvent, {this.lightText = false, Key key})
|
||
|
: super(key: key);
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return Row(
|
||
|
children: <Widget>[
|
||
|
Container(
|
||
|
width: 3,
|
||
|
height: 36,
|
||
|
color: lightText ? Colors.white : Theme.of(context).primaryColor,
|
||
|
),
|
||
|
SizedBox(width: 6),
|
||
|
Expanded(
|
||
|
child: Column(
|
||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||
|
children: <Widget>[
|
||
|
Text(
|
||
|
(replyEvent?.sender?.calcDisplayname() ?? "") + ":",
|
||
|
maxLines: 1,
|
||
|
overflow: TextOverflow.ellipsis,
|
||
|
style: TextStyle(
|
||
|
fontWeight: FontWeight.bold,
|
||
|
color:
|
||
|
lightText ? Colors.white : Theme.of(context).primaryColor,
|
||
|
),
|
||
|
),
|
||
|
Text(
|
||
|
replyEvent?.getLocalizedBody(context,
|
||
|
withSenderNamePrefix: false) ??
|
||
|
"",
|
||
|
overflow: TextOverflow.ellipsis,
|
||
|
maxLines: 1,
|
||
|
style:
|
||
|
TextStyle(color: lightText ? Colors.white : Colors.black),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
);
|
||
|
}
|
||
|
}
|