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

fix BrnProgressChart 设置颜色,背景色,以及动画无效 #322

Closed
wants to merge 1 commit into from

Conversation

leftcoding
Copy link
Collaborator

No description provided.

final Duration duration;

/// 进度条是否从上次的值开始
final bool isReverse;
Copy link
Collaborator

Choose a reason for hiding this comment

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

isReverse 字面意思和注释说明的作用不同。

是想表达进度条动画从最近一次的值开始不. : )

Copy link
Collaborator

Choose a reason for hiding this comment

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

isAnimationStartFromLastValue 这样命名呢😂

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

对,是这个意思,我改下命名

@override
Widget build(BuildContext context) {
final double _value = widget.value;
Copy link
Collaborator

Choose a reason for hiding this comment

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

_value 临时变量是不是可以去掉 : )


@override
void paint(Canvas canvas, Size size) {
final double value = animation?.value ?? this.value;
Copy link
Collaborator

Choose a reason for hiding this comment

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

局部变量 value 作用域覆盖了 类的字段 value

可能会对 45、46 行的 value 判断有影响

@leftcoding leftcoding closed this Sep 15, 2022
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