Skip to content

Conversation

@AsCress
Copy link
Collaborator

@AsCress AsCress commented Aug 21, 2025

Fixes the multimeter knob UI which was still rendered incorrectly on some screen sizes.

Screenshots / Recordings:

Screenshot_1755755859 Screenshot_1755755951

Summary by Sourcery

Standardize multimeter knob UI dimensions and pointer styling to ensure consistent rendering across screen sizes

Bug Fixes:

  • Use fixed responsive radius (105.r) for inner dial and fill painters instead of dynamic size-based calculation
  • Change pointer stroke cap to butt and adjust outer and inner pointer line multipliers for correct positioning
  • Standardize knob widget dimensions to 300.w by 300.h for consistent layout

@AsCress AsCress self-assigned this Aug 21, 2025
@AsCress AsCress added Fix Solution to an existing issue in app flutter labels Aug 21, 2025
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Aug 21, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Replaces dynamic size-based dial drawing and conditional widget sizing with fixed responsive dimensions to ensure consistent knob rendering across screen sizes.

Class diagram for updated multimeter knob widget rendering

classDiagram
  class InnerDialPainter {
    +paint(Canvas, Size)
    -radius: double (changed to 105.r)
  }
  class InnerDialFillPainter {
    +paint(Canvas, Size)
    -radius: double (changed to 105.r)
  }
  class InnerPointerPainter {
    +paint(Canvas, Size)
    -radius: double (changed to 105.r)
    -pointerPaint.strokeCap: StrokeCap (changed to butt)
    -pointerStartInner: Offset (radius changed to 1.0)
    -pointerEndInner: Offset (radius changed to 0.77)
  }
  class _MultimeterKnobState {
    -SizedBox.width: double (changed to 300.w)
    -SizedBox.height: double (changed to 300.h)
  }
  MultimeterKnob <|-- _MultimeterKnobState
Loading

File-Level Changes

Change Details Files
Standardize dial radius with fixed responsive value
  • Replaced min(size.width/2, size.height/2) * factor calculations
  • Introduced a constant 105.r radius in all CustomPainters
lib/view/widgets/multimeter_knob.dart
Refine pointer styling and geometry
  • Switched pointerPaint.strokeCap from square to butt
  • Adjusted outer pointer multiplier from 1.1 to 1.0 and inner from 0.9 to 0.77
lib/view/widgets/multimeter_knob.dart
Simplify knob widget sizing
  • Removed constraints-based width/height conditionals
  • Set fixed width and height to 300.w and 300.h
lib/view/widgets/multimeter_knob.dart

Possibly linked issues

  • #0: PR fixes multimeter knob UI by adjusting dimensions and rendering, resolving the incomplete layout issue.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@github-actions
Copy link
Contributor

@marcnause marcnause enabled auto-merge (rebase) August 21, 2025 18:17
@marcnause marcnause merged commit ca78642 into fossasia:flutter Aug 21, 2025
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Fix Solution to an existing issue in app flutter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants