flutter gauge bar gradient

Viewed 29

i want full size gradient gauge + animation enter image description here

i tried this way

but it doesn't work this is my code i tried clippath but doesn't work

Visibility(
          child: Container(
            width: 34,
            alignment: Alignment.bottomLeft,
            margin: EdgeInsets.fromLTRB(16, 0, 0, 50),
            child: Container(
              child: SfLinearGauge(
                maximum: 300.0,
                minimum: 0.0,
                orientation: LinearGaugeOrientation.vertical,
                barPointers: [
                  LinearBarPointer(
                    value: audioLevel,
                    thickness: 34,
                    animationDuration: 240,
                    shaderCallback: (bounds) => LinearGradient(

                        begin: Alignment.bottomCenter,
                        end: Alignment.topCenter,
                        colors: [
                          Color(0xff00FF94),
                          Colors.yellowAccent,
                          Colors.redAccent,
                        ]).createShader(bounds),
                  )
                ],
                showAxisTrack: false,
                showLabels: false,
                showTicks: false,
              ),
            ),
          ),
          visible: micToggle,
        ),

thank you!

0 Answers
Related