From 3eb7d8cb9956ea48c039e59481341a4bdbf595c1 Mon Sep 17 00:00:00 2001 From: ritheshSalyan Date: Thu, 19 Aug 2021 12:14:39 +0530 Subject: [PATCH] Revert Custom indent width --- lib/src/widgets/text_block.dart | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/src/widgets/text_block.dart b/lib/src/widgets/text_block.dart index 9ea1dfc4..35aed3ac 100644 --- a/lib/src/widgets/text_block.dart +++ b/lib/src/widgets/text_block.dart @@ -129,7 +129,7 @@ class EditableTextBlock extends StatelessWidget { styles: styles!, readOnly: readOnly, ), - _getIndentWidth(defaultStyles), + _getIndentWidth(), _getSpacingForLine(line, index, count, defaultStyles), textDirection, textSelection, @@ -204,21 +204,20 @@ class EditableTextBlock extends StatelessWidget { return null; } - double _getIndentWidth(DefaultStyles? defaultStyles) { + double _getIndentWidth() { final attrs = block.style.attributes; final indent = attrs[Attribute.indent.key]; var extraIndent = 0.0; - final minimumIndent = defaultStyles?.paragraph?.lineSpacing.item1??0; if (indent != null && indent.value != null) { extraIndent = 16.0 * indent.value; } if (attrs.containsKey(Attribute.blockQuote.key)) { - return minimumIndent + extraIndent; + return 16.0 + extraIndent; } - return minimumIndent+ extraIndent; + return 32+ extraIndent; } Tuple2 _getSpacingForLine(