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

交作业 #9

Merged
merged 6 commits into from
Dec 5, 2020
Merged

交作业 #9

merged 6 commits into from
Dec 5, 2020

Conversation

cr1992
Copy link
Member

@cr1992 cr1992 commented Dec 4, 2020

自己绘制实现格子效果

}

class RenderPercentBox extends RenderBox {
int max;
Copy link
Member

Choose a reason for hiding this comment

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

想法不错,但是为什么不是终值?

topRect.center.dy - textPainter.height / 2,
),
);
var bottomRect =
Copy link
Member

Choose a reason for hiding this comment

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

写 var 的都是大**

var topRect = Rect.fromLTWH(0, 0, width, topHeight);
canvas.drawRect(topRect, bgPaint);
textPainter.text = TextSpan(text: value.toString());
textPainter.layout(maxWidth: width);
Copy link
Member

Choose a reason for hiding this comment

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

上面晓得级联,这里怎么不用了


class RenderStackBox extends RenderBox {
int boxCount;
Paint boxPaint = Paint()..isAntiAlias = true;
Copy link
Member

Choose a reason for hiding this comment

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

能是 final 的就写 final

Copy link
Member

@AlexV525 AlexV525 left a comment

Choose a reason for hiding this comment

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

LGTM

@AlexV525 AlexV525 merged commit 9127f8a into fluttercandies:main Dec 5, 2020
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

Successfully merging this pull request may close these issues.

2 participants