flutter linearprogressindicator value
LinearProgressIndicator(
value: 0.5 // A value of 0.0 means no progress and 1.0 means that progress is complete.
valueColor: AlwaysStoppedAnimation<Color>(Colors.red),
),
flutter linearprogressindicator value
LinearProgressIndicator(
value: 0.5 // A value of 0.0 means no progress and 1.0 means that progress is complete.
valueColor: AlwaysStoppedAnimation<Color>(Colors.red),
),
linearprogressindicator flutter
LinearProgressIndicator(
backgroundColor: Colors.blue[100], // The progress indicator's background color.
color: Colors.blue, // The progress indicator's color.
),
flutter LinearProgressIndicator curve
Container(
margin: EdgeInsets.symmetric(vertical: 20),
width: 300,
height: 20,
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(10)),
child: LinearProgressIndicator(
value: 0.7,
valueColor: AlwaysStoppedAnimation<Color>(Color(0xff00ff00)),
backgroundColor: Color(0xffD6D6D6),
),
),
)
flutter LinearProgressIndicator curve
class ProgressBar extends StatelessWidget {
final double max;
final double current;
final Color color;
const ProgressBar(
{Key? key,
required this.max,
required this.current,
this.color = AppColors.secondaryColor})
: super(key: key);
@override
Widget build(BuildContext context) {
return LayoutBuilder(
builder: (_, boxConstraints) {
var x = boxConstraints.maxWidth;
var percent = (current / max) * x;
return Stack(
children: [
Container(
width: x,
height: 7,
decoration: BoxDecoration(
color: Color(0xffd3d3d3),
borderRadius: BorderRadius.circular(35),
),
),
AnimatedContainer(
duration: Duration(milliseconds: 500),
width: percent,
height: 7,
decoration: BoxDecoration(
color: color,
borderRadius: BorderRadius.circular(35),
),
),
],
);
},
);
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us