fix: text align error

This commit is contained in:
Lucas.Xu 2022-08-09 15:32:28 +08:00
parent 6f32f749bc
commit 255cb47876
4 changed files with 32 additions and 21 deletions

View File

@ -60,17 +60,20 @@ class _BulletedListTextNodeWidgetState extends State<BulletedListTextNodeWidget>
return SizedBox(
width: maxTextNodeWidth,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
FlowySvg(
size: Size.square(leftPadding),
name: 'point',
),
FlowyRichText(
Expanded(
child: FlowyRichText(
key: _richTextKey,
placeholderText: 'List',
textNode: widget.textNode,
editorState: widget.editorState,
),
),
],
),
);

View File

@ -84,13 +84,15 @@ class _CheckboxNodeWidgetState extends State<CheckboxNodeWidget>
..commit();
},
),
FlowyRichText(
Expanded(
child: FlowyRichText(
key: _richTextKey,
placeholderText: 'To-do',
textNode: widget.textNode,
textSpanDecorator: _textSpanDecorator,
editorState: widget.editorState,
),
),
],
),
);

View File

@ -60,17 +60,20 @@ class _NumberListTextNodeWidgetState extends State<NumberListTextNodeWidget>
return SizedBox(
width: maxTextNodeWidth,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
FlowySvg(
size: Size.square(leftPadding),
number: widget.textNode.attributes.number,
),
FlowyRichText(
Expanded(
child: FlowyRichText(
key: _richTextKey,
placeholderText: 'List',
textNode: widget.textNode,
editorState: widget.editorState,
),
),
],
),
);

View File

@ -59,6 +59,7 @@ class _QuotedTextNodeWidgetState extends State<QuotedTextNodeWidget>
return SizedBox(
width: maxTextNodeWidth,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
FlowySvg(
size: Size(
@ -67,12 +68,14 @@ class _QuotedTextNodeWidgetState extends State<QuotedTextNodeWidget>
),
name: 'quote',
),
FlowyRichText(
Expanded(
child: FlowyRichText(
key: _richTextKey,
placeholderText: 'Quote',
textNode: widget.textNode,
editorState: widget.editorState,
),
),
],
),
);