From a2e81cfd88891a772cc0b4ef3e12b80ba34d6a78 Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Fri, 29 Sep 2023 21:57:00 +0200 Subject: [PATCH] refactor(neon): loosely constrain NeonLinearProgressIndicator Signed-off-by: Nikolas Rimikis --- .../src/widgets/linear_progress_indicator.dart | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/neon/neon/lib/src/widgets/linear_progress_indicator.dart b/packages/neon/neon/lib/src/widgets/linear_progress_indicator.dart index cda19ca0..60901b9b 100644 --- a/packages/neon/neon/lib/src/widgets/linear_progress_indicator.dart +++ b/packages/neon/neon/lib/src/widgets/linear_progress_indicator.dart @@ -17,14 +17,12 @@ class NeonLinearProgressIndicator extends StatelessWidget { @override Widget build(final BuildContext context) => Container( margin: margin, - child: SizedBox( - height: 3, - child: visible - ? LinearProgressIndicator( - color: color, - backgroundColor: backgroundColor, - ) - : null, - ), + constraints: BoxConstraints.loose(const Size.fromHeight(3)), + child: visible + ? LinearProgressIndicator( + color: color, + backgroundColor: backgroundColor, + ) + : null, ); }