ProgressChart constructor

const ProgressChart({
  1. Key? key,
  2. double width = 0,
  3. double height = 0,
  4. double value = 0.2,
  5. double indicatorLeftPadding = 10,
  6. TextStyle textStyle = const TextStyle(color: Colors.white),
  7. ProgressIndicatorBuilder? progressIndicatorBuilder,
  8. List<Color> colors = const [Colors.blueAccent, Colors.blue],
  9. Color backgroundColor = Colors.lightBlueAccent,
  10. bool showAnimation = false,
  11. bool isFromLastValue = false,
  12. Duration duration = const Duration(milliseconds: 250),
})

Implementation

const ProgressChart({
  Key? key,
  this.width = 0,
  this.height = 0,
  this.value = 0.2,
  this.indicatorLeftPadding = 10,
  this.textStyle = const TextStyle(color: Colors.white),
  this.progressIndicatorBuilder,
  this.colors = const [Colors.blueAccent, Colors.blue],
  this.backgroundColor = Colors.lightBlueAccent,
  this.showAnimation = false,
  this.isFromLastValue = false,
  this.duration = const Duration(milliseconds: 250),
})  : assert(0 <= value && value <= 1, 'value 必须在 0 到 1 之间'),
      super(key: key);