-
Notifications
You must be signed in to change notification settings - Fork 16
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
Inverse rulers feature created #67
Conversation
Offset a; | ||
Offset b; | ||
if (isRulersInversed) { | ||
b = Offset((startLabel.width / 2) + (pointer.width! / 2), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use single source and swap the variables
_startLabelSize = _linearGaugeLabel.getLabelSize( | ||
textStyle: getTextStyle, value: getStart.toInt().toString()); | ||
if (getInversedRulers) { | ||
_startLabelSize = _linearGaugeLabel.getLabelSize( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use single line ternary operator to pass the required value in getLabelSize
if (getInversedRulers) { | ||
gaugeContainer = Rect.fromLTWH(start + end, offset.dy, -totalValOnPixel, | ||
getLinearGaugeBoxDecoration.height); | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change this to a single line
getLinearGaugeBoxDecoration.height); | ||
|
||
if (getInversedRulers) { | ||
gaugeContainer = Rect.fromLTWH(start + end, offset.dy, -totalValOnPixel, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change this to single line as well
colorRangeWidth = -1 * colorRangeWidth; | ||
} else { | ||
colorRangeStart = | ||
calculateValuePixelWidth(rangeLinearGauge![i].start) + start; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to ternary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR fixes #48