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