senderTextMessageWidget method
Implementation
Widget senderTextMessageWidget(BuildContext context, String text) {
final isDark = Theme.of(context).brightness == Brightness.dark;
return Container(
padding: const EdgeInsets.only(left: 10, right: 10, top: 5, bottom: 5),
decoration: BoxDecoration(
color: isDark ? const Color(0xff876969) : Colors.tealAccent,
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(17),
bottomLeft: Radius.circular(17),
topRight: Radius.circular(17),
),
border: Border.all(color: Colors.black12),
),
child: AutoDirection(
text: text,
child: ReadMoreText(
text,
trimLines: 5,
trimMode: TrimMode.line,
trimCollapsedText:
VChatAppService.instance.getTrans(context).showMore(),
trimExpandedText:
VChatAppService.instance.getTrans(context).showLess(),
moreStyle: Theme.of(context)
.textTheme
.bodyText1!
.copyWith(fontWeight: FontWeight.bold),
style: Theme.of(context).textTheme.bodyText1,
),
),
);
}