WOITextBar constructor

const WOITextBar({
  1. Key? key,
  2. TextStyle textStyle = const TextStyle(fontSize: 150, fontWeight: FontWeight.bold, height: 0),
  3. Color boxBackgroundColor = Colors.yellow,
  4. Color fillColor = Colors.blueAccent,
  5. required int progressValue,
  6. int tiltValue = 0,
  7. Color textColor = Colors.black,
  8. double borderRadius = 20,
})

The WOITextBar is a progress bar variation that has a text depicting progress which fills up based on the progress value. It takes an interger progressValue as a required parameter which should be between 0 and 100 inclusive. Border radius can not be more than 30

Implementation

const WOITextBar({
  super.key,
  this.textStyle = const TextStyle(
    fontSize: 150,
    fontWeight: FontWeight.bold,
    height: 0,
  ),
  this.boxBackgroundColor = Colors.yellow,
  this.fillColor = Colors.blueAccent,
  required this.progressValue,
  this.tiltValue = 0,
  this.textColor = Colors.black,
  this.borderRadius = 20,
})  : assert(progressValue >= 0 && progressValue <= 100,
          "Progress value should be between 0 and 100 inclusive"),
      assert(borderRadius <= 30, "Border radius should be less than 30");