Browse Source

neon: Allow completely hiding linear progress indicator

pull/346/head
jld3103 2 years ago
parent
commit
a5a90c6892
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 6
      packages/neon/neon/lib/src/widgets/linear_progress_indicator.dart

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

@ -3,6 +3,7 @@ part of '../../neon.dart';
class NeonLinearProgressIndicator extends StatelessWidget {
const NeonLinearProgressIndicator({
this.visible = true,
this.alwaysThere = true,
this.margin = const EdgeInsets.symmetric(horizontal: 10),
this.color,
this.backgroundColor = Colors.transparent,
@ -10,12 +11,15 @@ class NeonLinearProgressIndicator extends StatelessWidget {
});
final bool visible;
final bool alwaysThere;
final EdgeInsets? margin;
final Color? color;
final Color? backgroundColor;
@override
Widget build(final BuildContext context) => Container(
Widget build(final BuildContext context) => !alwaysThere && !visible
? Container()
: Container(
margin: margin,
child: SizedBox(
height: 3,

Loading…
Cancel
Save