Преглед изворни кода

feat: wrapping heading text with Padding instead of two SizeBoxs.

Lucas.Xu пре 2 година
родитељ
комит
c5e9008f4b

+ 12 - 12
frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/heading_text.dart

@@ -59,18 +59,18 @@ class _HeadingTextNodeWidgetState extends State<HeadingTextNodeWidget>
   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,
+          ),
+        )
       ],
     );
   }