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

Segment Painter and Position Incorrect on RadialGauge #17

Open
rayliverified opened this issue May 18, 2024 · 0 comments
Open

Segment Painter and Position Incorrect on RadialGauge #17

rayliverified opened this issue May 18, 2024 · 0 comments

Comments

@rayliverified
Copy link

The RadialGauge variant paints the segment incorrectly.

Distorted Segment Path
image

Segment is painted in top left corner.
image

Container(
                  width: double.infinity,
                  padding: const EdgeInsets.fromLTRB(100, 24, 24, 0),
                  child: Column(
                    mainAxisAlignment: MainAxisAlignment.start,
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      const SizedBox(height: 300),
                      SizedBox(
                        width: 100,
                        child: Builder(
                          builder: (context) {
                            return RadialGauge(
                              value: 75,
                              axis: GaugeAxis(
                                /// Provide the [min] and [max] value for the [value] argument.
                                min: 0,
                                max: 100,

                                /// Render the gauge as a 180-degree arc.
                                degrees: 180,

                                /// Set the background color and axis thickness.
                                style: GaugeAxisStyle(
                                  thickness: 8,
                                  background: Color(0xFFDFE2EC),
                                  segmentSpacing: 4,
                                ),

                                /// Define the progress bar (optional).
                                progressBar: GaugeProgressBar.rounded(
                                  color: Color(0xFF673ab7),
                                ),

                                /// Define axis segments (optional).
                                segments: [
                                  GaugeSegment(
                                    from: 0,
                                    to: 65,
                                    color: Color(0xFFD9DEEB),
                                    cornerRadius: Radius.circular(8),
                                  ),
                                  GaugeSegment(
                                    from: 65,
                                    to: 80,
                                    color: Color(0xFFD9DEEB),
                                    cornerRadius: Radius.circular(8),
                                  ),
                                  GaugeSegment(
                                    from: 80,
                                    to: 100,
                                    color: Color(0xFFD9DEEB),
                                    cornerRadius: Radius.circular(8),
                                  ),
                                ],
                              ),
                            );
                          },
                        ),
                      ),
                      const SizedBox(height: 300),
                    ],
                  ),
                ),
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