From a10197dec3813944b243ab88c8149f19ab851236 Mon Sep 17 00:00:00 2001 From: Xun Gong Date: Tue, 25 May 2021 12:24:43 -0700 Subject: [PATCH] use ceil instead of floor to make sure won't cause overflow --- lib/src/widgets/text_line.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/widgets/text_line.dart b/lib/src/widgets/text_line.dart index b03c0f9b..90f7ceff 100644 --- a/lib/src/widgets/text_line.dart +++ b/lib/src/widgets/text_line.dart @@ -625,11 +625,11 @@ class RenderEditableTextLine extends RenderEditableBox { final verticalPadding = _resolvedPadding!.top + _resolvedPadding!.bottom; final leadingWidth = _leading == null ? 0 - : _leading!.getMinIntrinsicWidth(height - verticalPadding).floor(); + : _leading!.getMinIntrinsicWidth(height - verticalPadding).ceil(); final bodyWidth = _body == null ? 0 : _body!.getMinIntrinsicWidth(math.max(0, height - verticalPadding)) - .floor(); + .ceil(); return horizontalPadding + leadingWidth + bodyWidth; }