From c5e9008f4b1f68b053a466b35fe490fe7dd1ba1d Mon Sep 17 00:00:00 2001 From: "Lucas.Xu" Date: Fri, 29 Jul 2022 10:41:39 +0800 Subject: [PATCH] feat: wrapping heading text with Padding instead of two SizeBoxs. --- .../lib/render/rich_text/heading_text.dart | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/heading_text.dart b/frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/heading_text.dart index 3d2ac14756..0453ac6952 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/heading_text.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/heading_text.dart @@ -59,18 +59,18 @@ class _HeadingTextNodeWidgetState extends State Widget build(BuildContext context) { return Column( children: [ - SizedBox( - height: topPadding, - ), - FlowyRichText( - key: _richTextKey, - textSpanDecorator: _textSpanDecorator, - textNode: widget.textNode, - editorState: widget.editorState, - ), - SizedBox( - height: bottomPadding, - ), + Padding( + padding: EdgeInsets.only( + top: topPadding, + bottom: bottomPadding, + ), + child: FlowyRichText( + key: _richTextKey, + textSpanDecorator: _textSpanDecorator, + textNode: widget.textNode, + editorState: widget.editorState, + ), + ) ], ); }