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

migrate brn_horizontal_steps、brn_step_line to null safety #39

Closed
wants to merge 11 commits into from

Conversation

leftcoding
Copy link
Collaborator

@leftcoding leftcoding commented Dec 27, 2021

  1. migrate brn_step_line to null safety
  2. optimization brn_horizontal_steps

@leftcoding leftcoding changed the title migrate brn_horizontal_steps、brn_step_line null safety migrate brn_horizontal_steps、brn_step_line to null safety Dec 27, 2021
kalifun and others added 4 commits December 27, 2021 15:00
* Theme: 优化单例实现,初步优化 BrnAllThemeConfig 属性获取不为 null

* refactor:优化theme,暴露非null引用

* theme:去除无用信息及优化部分代码

* theme:增加属性类型
* 🎨 utils-EventBus添加null-safe

* 🎨 修改theme配置功能及utils/brn_tools工具函数 null-safe

* 🎨 EventBus添加null-safe(其他提交请忽略,输入回退)

Co-authored-by: 大脸儿 <hexintao521@hotmail.com>
* refactor brn_toast

* refactor brn_toast
@@ -1,5 +1,4 @@
// @dart=2.9

import 'package:bruno/bruno.dart';
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个建议使用单个文件,会有循环引用问题

return BrnThemeConfigurator.instance
.getConfig()
.commonConfig
?.brandPrimary ??
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里的两处判空应该不需要了

}

Widget _buildHighLightCircle() {
return _buildColorCircleWidget(widget.highlightColor ??
BrnThemeConfigurator.instance.getConfig().commonConfig.brandPrimary);
BrnThemeConfigurator.instance.getConfig().commonConfig?.brandPrimary ??
Copy link
Collaborator

Choose a reason for hiding this comment

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

同上

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

好的,我改下

if (index < currentIndex) {
// 当前index小于指定的活跃index
/// 当前index小于指定的活跃index
Copy link
Collaborator

Choose a reason for hiding this comment

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

//就好啦

BrnThemeConfigurator.instance
.getConfig()
.commonConfig
.brandPrimary);
?.brandPrimary ??
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个地方是 不是肯定不为null嘞

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

这个还没合并代码之前的,我改下后面再提交一下

Copy link
Collaborator

@ShzMinato ShzMinato left a comment

Choose a reason for hiding this comment

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

so cool~
@leftcoding

}
}

class SliderWidget extends StatefulWidget {
Copy link
Collaborator

Choose a reason for hiding this comment

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

cool!
可否将 SliderWidgetBrnHorizontalStep 类放在 Bruno 库中~

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

好的,统一修改下

zhoujuanjuan and others added 6 commits December 31, 2021 22:49
* Theme: 优化单例实现,初步优化 BrnAllThemeConfig 属性获取不为 null

* refactor:优化theme,暴露非null引用

* theme:去除无用信息及优化部分代码

* theme:增加属性类型

* 优化修复 EventBus
* migrate brn_loading to null safety

* mv loading content to brnString constants
 into f/brn_step

� Conflicts:
�	lib/src/components/step/brn_horizontal_steps.dart
�	lib/src/components/step/brn_step_line.dart
@@ -119,29 +122,29 @@ class BrnDefaultConfigUtils {
/// 文本字号
///
/// 特殊数据展示,DIN Condensed数字字体,用于强吸引
fontSizeDIN: 28,
fontSizeDIN: 28.0,
Copy link
Collaborator

@zhoujuanjuan zhoujuanjuan Jan 12, 2022

Choose a reason for hiding this comment

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

这些已经优化,建议拉新代码

Copy link
Collaborator

@zhoujuanjuan zhoujuanjuan left a comment

Choose a reason for hiding this comment

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

整体建议分步提,本次只提 step 相关内容可好

@leftcoding leftcoding closed this Jan 12, 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.

7 participants