From 6e067b0d7984fc847781537e2b4b49c7344c3062 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Fri, 28 Feb 2020 13:38:47 +0100 Subject: [PATCH] fix markdown text style --- lib/src/message_widget.dart | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/lib/src/message_widget.dart b/lib/src/message_widget.dart index a715c2b6..e6ecf5e7 100644 --- a/lib/src/message_widget.dart +++ b/lib/src/message_widget.dart @@ -329,9 +329,21 @@ class _MessageWidgetState extends State onTapLink: (link) { _launchURL(link); }, - styleSheet: - MarkdownStyleSheet.fromTheme(Theme.of(context)) - .copyWith( + styleSheet: MarkdownStyleSheet.fromTheme( + Theme.of(context).copyWith( + textTheme: Theme.of(context).textTheme.apply( + bodyColor: messageTheme.messageText.color, + decoration: + messageTheme.messageText.decoration, + decorationColor: messageTheme + .messageText.decorationColor, + decorationStyle: messageTheme + .messageText.decorationStyle, + fontFamily: + messageTheme.messageText.fontFamily, + ), + ), + ).copyWith( p: messageTheme.messageText, ), ),