From 9ba108f3af7d189221c6f2e5798f9daef822c130 Mon Sep 17 00:00:00 2001 From: doonfrs Date: Wed, 24 May 2023 03:40:55 +0300 Subject: [PATCH] pass linestyle to embeded block --- lib/src/widgets/embeds.dart | 1 + lib/src/widgets/text_line.dart | 12 ++++-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/lib/src/widgets/embeds.dart b/lib/src/widgets/embeds.dart index 8d72cd5b..565ee778 100644 --- a/lib/src/widgets/embeds.dart +++ b/lib/src/widgets/embeds.dart @@ -21,6 +21,7 @@ abstract class EmbedBuilder { leaf.Embed node, bool readOnly, bool inline, + TextStyle textStyle, ); } diff --git a/lib/src/widgets/text_line.dart b/lib/src/widgets/text_line.dart index 467fddb2..ed77f79e 100644 --- a/lib/src/widgets/text_line.dart +++ b/lib/src/widgets/text_line.dart @@ -148,15 +148,10 @@ class _TextLineState extends State { final embedBuilder = widget.embedBuilder(embed); if (embedBuilder.expanded) { // Creates correct node for custom embed - + final lineStyle = _getLineStyle(widget.styles); return EmbedProxy( - embedBuilder.build( - context, - widget.controller, - embed, - widget.readOnly, - false, - ), + embedBuilder.build(context, widget.controller, embed, widget.readOnly, + false, lineStyle), ); } } @@ -208,6 +203,7 @@ class _TextLineState extends State { child, widget.readOnly, true, + lineStyle, ), ); final embed = embedBuilder.buildWidgetSpan(embedWidget);