Browse Source

refactor(neon): loosely constrain NeonLinearProgressIndicator

Signed-off-by: Nikolas Rimikis <leptopoda@users.noreply.github.com>
pull/886/head
Nikolas Rimikis 1 year ago
parent
commit
a2e81cfd88
No known key found for this signature in database
GPG Key ID: 85ED1DE9786A4FF2
  1. 16
      packages/neon/neon/lib/src/widgets/linear_progress_indicator.dart

16
packages/neon/neon/lib/src/widgets/linear_progress_indicator.dart

@ -17,14 +17,12 @@ class NeonLinearProgressIndicator extends StatelessWidget {
@override @override
Widget build(final BuildContext context) => Container( Widget build(final BuildContext context) => Container(
margin: margin, margin: margin,
child: SizedBox( constraints: BoxConstraints.loose(const Size.fromHeight(3)),
height: 3, child: visible
child: visible ? LinearProgressIndicator(
? LinearProgressIndicator( color: color,
color: color, backgroundColor: backgroundColor,
backgroundColor: backgroundColor, )
) : null,
: null,
),
); );
} }

Loading…
Cancel
Save