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

View File

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

View File

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

View File

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