Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

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

Lucas.Xuc5e9008f4b1f
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<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,
+ ),
+ )
],
);
}