build method

  1. @override
Widget build (
  1. BuildContext context

Override this method to build widgets that depend on the state of the listenable (e.g., the current value of the animation).


Widget build(BuildContext context) {
  return LayoutBuilder(
      builder: (BuildContext context, BoxConstraints constraints) {
    return Container(
        child: CustomPaint(
            size: Size(width ?? constraints.maxWidth, height),
            painter: StrengthBarBackground(
                backgroundColor: backgroundColor, backgroundRadius: radius),
            foregroundPainter: StrengthBar(
                barColor: barColor,
                barRadius: radius,
                percent: _percent.value)));