From 0310b92723801a0d9269a874d97444c923ab9eea Mon Sep 17 00:00:00 2001 From: Vincent Chan Date: Fri, 9 Sep 2022 14:34:14 +0800 Subject: [PATCH] fix: dynamic width of the number --- .../lib/src/render/rich_text/number_list_text.dart | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/render/rich_text/number_list_text.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/render/rich_text/number_list_text.dart index 36d3d93ed9..36778c46b2 100644 --- a/frontend/app_flowy/packages/appflowy_editor/lib/src/render/rich_text/number_list_text.dart +++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/render/rich_text/number_list_text.dart @@ -47,8 +47,6 @@ class _NumberListTextNodeWidgetState extends State final iconKey = GlobalKey(); final _richTextKey = GlobalKey(debugLabel: 'number_list_text'); - final _iconWidth = 20.0; - final _iconRightPadding = 5.0; @override SelectableMixin get forward => @@ -61,12 +59,13 @@ class _NumberListTextNodeWidgetState extends State child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - FlowySvg( + Padding( key: iconKey, - width: _iconWidth, - height: _iconWidth, - padding: EdgeInsets.only(right: _iconRightPadding), - number: widget.textNode.attributes.number, + padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 0), + child: Text( + '${widget.textNode.attributes.number.toString()}.', + style: const TextStyle(fontSize: 16), + ), ), Flexible( child: FlowyRichText(