GeekyAnts / GaugesFlutter

A gauge package for Flutter that displays progress and can be customized for appearance and behavior.
https://pub.dev/packages/geekyants_flutter_gauges
MIT License
67 stars 15 forks source link

Draw pointer above CustomCurve #250

Closed higaski closed 11 months ago

higaski commented 11 months ago

Hey

I think it would be great if users could specify whether a LinearGauge's CustomCurve should mask a Pointer or the other way round.

Take the following snippet for example which draws a CustomCurve to the left of a LinearGauge:

    return LinearGauge(
      end: 126,
      gaugeOrientation: GaugeOrientation.vertical,
      rulers: RulerStyle(
        rulerPosition: RulerPosition.right,
      ),
      pointers: [
        Pointer(
          value: 0,
          height: 20,
          color: Theme.of(context).dividerColor,
          width: 20,
          shape: PointerShape.triangle,
          isInteractive: true,
          onChanged: null,
          pointerPosition: PointerPosition.left,
        ),
      ],
      curves: const [
        CustomCurve(
          startHeight: 4,
          endHeight: 50,
          midHeight: 5,
          curvePosition: CurvePosition.left,
          end: 126,
          midPoint: 50 * 0.8,
        ),
      ],
    );

This slider looks great as long as the Pointer remains at 0, but once it gets moved it gets drawn beneath the CustomCurve: pointers

Thanks for the package so far, its really powerful and allows creating nice looking sliders and gauges with ease. :smile:

hasnentai commented 11 months ago

Hi @higaski Thanks for creating this issue. @Afroz-Shaikh will take this up and resolve it soon