BsProgress.single constructor

BsProgress.single({
  1. Key? key,
  2. required double value,
  3. String? label,
  4. BsVariant? variant = BsVariant.primary,
  5. bool striped = false,
  6. bool animated = false,
  7. double height = 16.0,
  8. Color? backgroundColor,
  9. Color? barColor,
  10. Color? textColor,
  11. BorderRadius? borderRadius,
})

Convenience constructor to create a BsProgress with a single progress segment.

Implementation

factory BsProgress.single({
  Key? key,
  required double value,
  String? label,
  BsVariant? variant = BsVariant.primary,
  bool striped = false,
  bool animated = false,
  double height = 16.0,
  Color? backgroundColor,
  Color? barColor,
  Color? textColor,
  BorderRadius? borderRadius,
}) {
  return BsProgress(
    key: key,
    height: height,
    backgroundColor: backgroundColor,
    borderRadius: borderRadius,
    bars: [
      BsProgressBar(
        value: value,
        label: label,
        variant: variant,
        striped: striped,
        animated: animated,
        color: barColor,
        textColor: textColor,
      ),
    ],
  );
}