Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override CustomRulerLabel textStyle #287

Open
b14cknc0d3 opened this issue Mar 18, 2025 · 0 comments
Open

Override CustomRulerLabel textStyle #287

b14cknc0d3 opened this issue Mar 18, 2025 · 0 comments

Comments

@b14cknc0d3
Copy link

Is your feature request related to a problem? Please describe.
For some case I need custom label text style for my own.
eg.

var range = {value:25,actualValue:388,} # value is % and 388 real value to show

          //    const CustomRulerLabel(
          //           text: '',
          //           value: 0,
          //         ),
          //         CustomRulerLabel(
          //           text: extraValue!.isEmpty ? "333.8" : extraValue,
          //           value: pointValue,
          //         ),
          //         const CustomRulerLabel(
          //           text: '',
          //           value: 100,
          //         )

In this case I need black color text not from rangeLinearGauge color.

rangeLinearGauge: List.generate(5, (index) {
            double segmentStart = (index * endValue) / 5;
            double segmentEnd = ((index + 1) * endValue) / 5;
            List<Color> colors = [
              const Color(0xffc90000),
              const Color(0xffff8000),
              const Color(0xfff9e000),
              const Color(0xffb5ff00),
              const Color(0xff4dbc00),
            ];
            return RangeLinearGauge(
              start: segmentStart,
              end: segmentEnd,
              color: colors[index],
            );
          }),

Describe the solution you'd like
I need to override CustomRulerLabel text style.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant