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 docs to null-safety #112

Merged
merged 114 commits into from
Mar 9, 2022
Merged
Show file tree
Hide file tree
Changes from 113 commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
0e14055
Null safe (#13)
zhoujuanjuan Dec 15, 2021
9fdb8fd
upgrade dependencies:collection to stable
laiiihz Dec 16, 2021
814920b
migrate constants to null safety
laiiihz Dec 16, 2021
5991726
migrate brn_multi_click_util to null safety
laiiihz Dec 16, 2021
540d5ce
migrate font util to null safety
laiiihz Dec 16, 2021
5ed705a
migrate brn_text_style to null safety
laiiihz Dec 16, 2021
9f41f43
migrate brn picker constants to null safety
laiiihz Dec 16, 2021
577299f
migrate brn appBar theme to null safety
laiiihz Dec 16, 2021
39281ea
optimize bruno theme's import (#16)
laiiihz Dec 20, 2021
ae53073
♻️ [NNBD] Part 1. Migrate configs (#28)
AlexV525 Dec 22, 2021
97b8b77
♻️ [NNBD] Part 2. Migrate utils (#30)
AlexV525 Dec 22, 2021
43acef4
:art: BrnSearchText (#36)
kalifun Dec 27, 2021
d2a37e0
Theme: 优化单例实现,初步优化 BrnAllThemeConfig 属性获取不为 null
zhoujuanjuan Dec 27, 2021
75a2be3
refactor:优化theme,暴露非null引用
zhoujuanjuan Dec 27, 2021
f97bf07
theme:去除无用信息及优化部分代码
zhoujuanjuan Dec 28, 2021
44ba17a
theme:增加属性类型
zhoujuanjuan Dec 28, 2021
d4a4212
Theme: 优化单例实现,初步优化 BrnAllThemeConfig 属性获取不为 null (#40)
zhoujuanjuan Dec 29, 2021
886c48e
🎨 utils-EventBus添加null-safe (#23)
kkkman22 Dec 30, 2021
081a7dc
refactor brn_toast (#33)
leftcoding Dec 30, 2021
cad7451
Merge branch 'LianjiaTech:null-safe' into null-safe
zhoujuanjuan Dec 31, 2021
c19203f
优化修复 EventBus
zhoujuanjuan Dec 31, 2021
7dff62a
优化 EventBus 单例实现 (#43)
zhoujuanjuan Dec 31, 2021
974e0da
brn_toast time change to seconds (#45)
leftcoding Jan 4, 2022
c96cdd3
Merge branch 'LianjiaTech:null-safe' into null-safe
zhoujuanjuan Jan 4, 2022
3ef1aa2
migrate brn_loading to null safety (#32)
laiiihz Jan 4, 2022
2c99d35
Merge branch 'LianjiaTech:null-safe' into null-safe
zhoujuanjuan Jan 4, 2022
6a36110
optimization brn_theme_configurator instance constructor (#47)
leftcoding Jan 4, 2022
c7ae392
Merge branch 'LianjiaTech:null-safe' into null-safe
zhoujuanjuan Jan 5, 2022
6e0834b
迁移example ,优化常量命名,增加export
zhoujuanjuan Jan 4, 2022
5db665d
migrate brn_empty_status.dart
zhoujuanjuan Jan 5, 2022
976d588
Migrate BrnStateTag、BrnTagCustom、BrnSelectTag、BrnDeleteTag to null-sa…
violinday Jan 5, 2022
7c12fc8
删除 BrnThemeImg
zhoujuanjuan Jan 6, 2022
0b75394
Merge remote-tracking branch 'upstream/null-safe' into null-safe
zhoujuanjuan Jan 6, 2022
c00cfd5
fix:tagConfig merge方法增加判空处理
zhoujuanjuan Jan 6, 2022
ada5216
fix:revert tagConfig
zhoujuanjuan Jan 7, 2022
beec378
fix:BrnAbnormalStateWidget空处理
zhoujuanjuan Jan 7, 2022
7d3ed35
reset and migrated package [rating] to null-safety. (#42)
jojinshallar Jan 7, 2022
0203e9f
迁移example ,优化常量命名,增加export (#51)
zhoujuanjuan Jan 7, 2022
b852eb6
Merge branch 'LianjiaTech:null-safe' into null-safe
zhoujuanjuan Jan 7, 2022
6df9863
空安全报错修改 (#55)
HappyImp Jan 7, 2022
e1a515e
优化sketch教程为视频教程
zhoujuanjuan Jan 10, 2022
46ec54a
Migrated package [selectcity] to null-safety (#56)
jojinshallar Jan 10, 2022
27dd619
migrate card_title to null safety (#59)
laiiihz Jan 10, 2022
e69a944
Merge branch 'LianjiaTech:null-safe' into null-safe
zhoujuanjuan Jan 10, 2022
232f347
Migrated package [radio] to null-safety (#62)
jojinshallar Jan 11, 2022
e31532f
Merge branch 'LianjiaTech:null-safe' into null-safe
zhoujuanjuan Jan 11, 2022
162fcfe
Migrated tabbar to null-safety
zhoujuanjuan Jan 11, 2022
fc0579a
Migrated package [guide] to null-safety (#65)
jojinshallar Jan 12, 2022
925350c
🚀 Use the latest Podfile for the example (#68)
AlexV525 Jan 12, 2022
4fe8680
Null safe calendar (#64)
laiiihz Jan 12, 2022
00c53b3
Card Components Null safe adapter (#53)
KennethYo Jan 12, 2022
2bd473f
Merge branch 'LianjiaTech:null-safe' into null-safe
zhoujuanjuan Jan 12, 2022
103ab13
Migrated scroll_anchor to null-safety
zhoujuanjuan Jan 11, 2022
2c991c4
fix #71 (#77)
leftcoding Jan 13, 2022
2b141fd
Merge branch 'LianjiaTech:null-safe' into null-safe
zhoujuanjuan Jan 13, 2022
7e25ffd
fix content_card themeData is not null (#79)
laiiihz Jan 13, 2022
2a4a43b
Null safe of all buttons (#20)
donywan Jan 14, 2022
8237c32
Migrated package [navbar][input] to null-safety (#75)
jojinshallar Jan 17, 2022
04b7a3e
Merge branch 'LianjiaTech:null-safe' into null-safe
zhoujuanjuan Jan 17, 2022
5748da7
fix:修复迁移tabar问题
zhoujuanjuan Jan 17, 2022
244a957
Migrated tabbar & scroll_anchor to null-safety (#66)
zhoujuanjuan Jan 17, 2022
a8101d4
Migrate Selection to null-safe (#54)
violinday Jan 17, 2022
8c25d72
Merge branch 'LianjiaTech:null-safe' into null-safe
zhoujuanjuan Jan 18, 2022
1c33fd9
migrate form to null safety
zhoujuanjuan Jan 18, 2022
07c308a
fix:修复tabbar报错及selection警告信息
zhoujuanjuan Jan 18, 2022
8e07cdf
Migrated package [dialog] to null-safety (#81)
jojinshallar Jan 19, 2022
fdf45af
Merge branch 'LianjiaTech:null-safe' into null-safe
zhoujuanjuan Jan 19, 2022
488f70d
migrate brn_horizontal_steps、brn_step_line to null safety (#89)
leftcoding Jan 21, 2022
0704e89
migrate charts to null safety (#80)
laiiihz Jan 23, 2022
79cb687
migrate actionsheet into null-safe (#73)
junlandroid Jan 23, 2022
e1749fe
Merge remote-tracking branch 'upstream/null-safe' into null-safe
zhoujuanjuan Jan 24, 2022
0b4c168
fix:修复迁移问题
zhoujuanjuan Jan 24, 2022
3f3b4d3
fix:优化迁移部分问题key和style非空问题
zhoujuanjuan Jan 24, 2022
8344fb9
migrate form to null safety (#86)
zhoujuanjuan Jan 24, 2022
1b89f72
Merge branch 'LianjiaTech:null-safe' into null-safe
zhoujuanjuan Jan 24, 2022
8b9e3ab
migrate picker to null safety
zhoujuanjuan Jan 24, 2022
8629bb0
migrate popup to null safety (#69)
hexintao Jan 24, 2022
04432c6
migrate gallery to null safety (#90)
Nayuta403 Jan 25, 2022
fbe085a
Merge branch 'LianjiaTech:null-safe' into null-safe
zhoujuanjuan Jan 25, 2022
2d7fcc1
fix:修复picker空安全迁移问题
zhoujuanjuan Jan 25, 2022
49e9147
migrate appraise dir to null safety (#84)
hexintao Jan 25, 2022
a23e201
fix:修复list没指定泛型及if判断错误问题
zhoujuanjuan Jan 26, 2022
4fa42f7
Merge branch 'LianjiaTech:null-safe' into null-safe
zhoujuanjuan Jan 26, 2022
33ed04a
fix:migrate dashed line to null safty
zhoujuanjuan Jan 26, 2022
a4c1a74
migrate picker to null safety (#91)
zhoujuanjuan Jan 26, 2022
4300e62
Merge branch 'LianjiaTech:null-safe' into null-safe
zhoujuanjuan Jan 26, 2022
069436d
migrate example to null safty
zhoujuanjuan Jan 26, 2022
3e28aa4
fix:修复部分example warning
zhoujuanjuan Jan 26, 2022
00f8a47
fix:修复demo报错问题
zhoujuanjuan Jan 27, 2022
8b17ba3
fix:追加未跟踪修复
zhoujuanjuan Jan 27, 2022
a526542
fix:优化部分接口可空参数为非空
zhoujuanjuan Jan 27, 2022
7add53d
Perf:Button Null safe (#93)
violinday Jan 27, 2022
966b63e
Merge branch 'null-safe' into null-safe
violinday Feb 7, 2022
5401fba
migrate example to null safety (#94)
zhoujuanjuan Feb 14, 2022
7028763
Merge branch 'LianjiaTech:null-safe' into null-safe
zhoujuanjuan Feb 14, 2022
4c62a0c
fix:修复tabar showmore overflow 问题 #98 以及 tabbar 标签颜色默认设置倒置问题
zhoujuanjuan Feb 16, 2022
140cd43
Fix #98 问题及优化部分代码 (#99)
zhoujuanjuan Feb 16, 2022
dcc5731
refactor:优化 BrnInputItemType 常量命名
zhoujuanjuan Feb 16, 2022
fb34dc0
Merge branch 'LianjiaTech:null-safe' into null-safe
zhoujuanjuan Feb 16, 2022
6b10b9c
refactor:优化枚举值命名
zhoujuanjuan Feb 16, 2022
589daf1
fix:修改docs目录下form相关常量命名及所有枚举命名
zhoujuanjuan Feb 16, 2022
a7ec085
优化 BrnInputItemType 常量命名 (#100)
zhoujuanjuan Feb 17, 2022
295b16a
Merge branch 'LianjiaTech:null-safe' into null-safe
zhoujuanjuan Feb 17, 2022
2ead0c1
refactor: 更新 changelog
zhoujuanjuan Feb 17, 2022
b67f8b9
Merge branch 'LianjiaTech:2.2.x' into 2.2.x
zhoujuanjuan Feb 17, 2022
f1d0efc
Merge remote-tracking branch 'origin/null-safe' into 2.2.x
zhoujuanjuan Feb 17, 2022
97f6a1f
refactor:BrnBubbleText 增加属性 bgColor、textStyle,修复demo actionSheet、gal…
zhoujuanjuan Feb 18, 2022
9748fac
fix:修复changelog 错误,brn_gallery_summary_page.dart 中标题空处理
zhoujuanjuan Feb 22, 2022
b0092e0
fix:修复部分问题
zhoujuanjuan Mar 4, 2022
d370e7b
fix:修复部分问题
zhoujuanjuan Mar 4, 2022
15a6f5d
migrate docs to null-safety
zhoujuanjuan Mar 7, 2022
9b9b02d
Merge remote-tracking branch 'upstream/2.2.x' into 2.2.x
zhoujuanjuan Mar 7, 2022
c1aa482
feat:changelog 增加 BrnHorizontalStepsManager 改动
zhoujuanjuan Mar 7, 2022
40f66f3
fix:优化changelog
zhoujuanjuan Mar 9, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- Add build test thank to **AlexV525**.

#### components
- **Breaking change**: remove <code>BrnHorizontalStepsManager</code> and put function <code>forwardStep()</code> <code>backStep()</code> into <code>BrnStepsController</code>.
- <code>BrnCalendarView</code>: add <code>BrnCalendarView.single()</code> and <code>BrnCalendarView.range()</code> constructor and had its argument <code>startEndDateChange</code> removed.
- <code>BrnSelectionEntityListBean</code>: <code>fromMap</code> is renamed to <code>fromJson</code>.
- <code>BrnRadioButton</code>: optimize click area [#31](https://github.com/LianjiaTech/bruno/pull/31) , thanks to **a1017480401** .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,25 +45,25 @@ group:

```dart
const BrnBottomButtonPanel(
{Key key,
@required this.mainButtonName,
@required this.mainButtonOnTap,
this.secondaryButtonName,
this.secondaryButtonOnTap,
this.enableMainButton = true,
this.enableSecondaryButton = true,
this.iconButtonList})
: super(key: key);
{Key? key,
required this.mainButtonName,
required this.mainButtonOnTap,
this.secondaryButtonName,
this.secondaryButtonOnTap,
this.enableMainButton = true,
this.enableSecondaryButton = true,
this.iconButtonList})
: super(key: key);
```
### 参数说明

| 参数名 | 参数类型 | 描述 | 是否必填 | 默认值 |
| --- | --- | --- | --- | --- |
| mainButtonName | String | 主按钮的显示文案 | 否 | '' |
| mainButtonName | String | 主按钮的显示文案 | 否 | |
| mainButtonOnTap | VoidCallback | 主按钮的点击回调 | 否 | 无 |
| secondaryButtnoName | String | 次按钮显示文案 | 否 | '' |
| secondaryButtonOnTap | VoidCallback | 次按钮的点击回调 | 否 | 无 |
| iconButtonList | List | icon按钮的集合 | 否 | 无 |
| secondaryButtonName | String? | 次按钮显示文案 | 否 | |
| secondaryButtonOnTap | VoidCallback? | 次按钮的点击回调 | 否 | 无 |
| iconButtonList | List<BrnVerticalIconButton>? | icon按钮的集合 | 否 | 无 |
| enableMainButton | bool | 主按钮是否可用 | 否 | true |
| enableSecondaryButton | bool | 次按钮是否可用 | 否 | true |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,17 @@ group:
### 构造函数

```dart
BrnMultipleBottomButton(
{Key key,
this.mainButtonName,
this.subButtonName,
this.onSelectAllTap,
this.onMainButtonTap,
this.onSelectedButtonTap,
this.onSubButtonTap,
this.hasArrow = false,
this.bottomController})
const BrnMultipleBottomButton(
{Key? key,
this.mainButton,
this.subButton,
this.onMainButtonTap,
this.onSubButtonTap,
this.onSelectedButtonTap,
this.onSelectAll,
this.hasArrow = false,
this.bottomController})
: super(key: key);
```


Expand All @@ -47,13 +48,13 @@ BrnMultipleBottomButton(
| **参数名** | **参数类型** | **描述** | **是否必填** | **默认值** |
| --- | --- | --- | --- | --- |
| mainButton | dynamic | 主按钮的显示文案,传入String即使用默认的Text样式,传入其他样式则使用对应的Widget | 否 | |
| onMainButtonTap | VoidCallback | 主按钮点击回调 | 否 | |
| onMainButtonTap | VoidCallback? | 主按钮点击回调 | 否 | |
| subButton | dynamic | 次按钮的显示文案,传入String即使用默认的Text样式,传入其他样式则使用对应的Widget | 否 | |
| onSubButtonTap | VoidCallback | 次按钮点击回调 | 否 | |
| onSelectedButtonTap | Function(int) | selectedButtonOnTap', '点击已选的回调,存在三种状态:-1:不可展开(当value为0的时候),0:收起,1:展开 | 否 | |
| onSelectAll | Function(bool) | 全选的点击回调,不传则不展示多选按钮,回传参数true表示选中全选,false表示取消全选 | 否 | |
| onSubButtonTap | VoidCallback? | 次按钮点击回调 | 否 | |
| onSelectedButtonTap | Function(BrnMultipleButtonArrowState)? | selectedButtonOnTap', '点击已选的回调,存在三种状态:-1:不可展开(当value为0的时候),0:收起,1:展开 | 否 | |
| onSelectAll | void Function(bool?)? | 全选的点击回调,不传则不展示多选按钮,回传参数true表示选中全选,false表示取消全选 | 否 | |
| hasArrow | bool | 已选侧边是否需要小箭头 | 否 | false |
| bottomController | BrnMultipleBottomController | 暴露给外界设置按钮状态的控制器 | 否 | |
| bottomController | BrnMultipleBottomController? | 暴露给外界设置按钮状态的控制器 | 否 | |



Expand Down
20 changes: 10 additions & 10 deletions docs/components/buttonPanel/BrnButtonPanel/BrnButtonPanel.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ group:

```dart
const BrnButtonPanel(
{Key key,
@required this.mainButtonName,
@required this.mainButtonOnTap,
this.isMainBtnEnable = true,
this.secondaryButtonNameList,
this.secondaryButtonOnTap,
this.secondaryButtonList,
this.horizontalPadding = 20,
this.popDirection = BrnPopupDirection.bottom})
: super(key: key);
{Key? key,
required this.mainButtonName,
required this.mainButtonOnTap,
this.isMainBtnEnable = true,
this.secondaryButtonNameList,
this.secondaryButtonOnTap,
this.secondaryButtonList,
this.horizontalPadding = 20,
this.popDirection = BrnPopupDirection.bottom})
: super(key: key);
```
### 参数说明

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ group:
### 构造函数

```dart
BrnTextButtonPanel(
{Key key,
@required this.nameList,
this.onTap,
this.popDirection = BrnPopupDirection.bottom})
: super(key: key);
const BrnTextButtonPanel({
Key? key,
required this.nameList,
this.onTap,
this.popDirection = BrnPopupDirection.bottom,
}) : super(key: key);
```
### 参数说明

Expand Down
92 changes: 47 additions & 45 deletions docs/components/charts/BrnBrokenLine/BrnBrokenLine.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ group:

```dart
BrnBrokenLine({
Key key,
@required this.size,
@required this.lines,
Key? key,
required this.size,
required this.lines,
this.contentPadding = const EdgeInsets.only(left: 10, right: 10),
this.backgroundColor,
this.xyDialLineWidth = 2,
Expand All @@ -44,8 +44,8 @@ BrnBrokenLine({
this.xDialMin,
this.xDialMax,
this.xDialValues,
this.yDialMin,
this.yDialMax,
required this.yDialMin,
required this.yDialMax,
this.yDialValues,
this.isShowXHintLine = true,
this.isShowYHintLine = false,
Expand All @@ -54,36 +54,42 @@ BrnBrokenLine({
this.isTipWindowAutoDismiss = true,
this.isShowXDialText = false,
this.isShowYDialText = false,
})
}) : super(key: key) {
// 设置自定义 X 轴时,检查 x轴的最大、最小刻度范围
if (xDialValues != null) {
assert(xDialMin != null);
assert(xDialMax != null);
}
}
```

### 参数说明:

| 参数名 | 参数类型 | 作用 | 是否必填 | 默认值 | 备注 |
| ---------------------- | --------------------- | ------------------------------------------------------------------- | -------- | ------ | ---- |
| size | Size | 表格宽高 | 是 | | |
| lines | `List<BrnPointsLine>` | 要绘制的折线集合 | 是 | | |
| contentPadding | EdgeInsets | 图标内容区域 padding(不包含坐标轴) | 否 | | |
| backgroundColor | Color | 绘制表格的背景色 | 否 | | |
| xyDialLineWidth | double | xy 轴线条的宽度 | 否 | 2 | |
| xDialColor | Color | x 轴的颜色 | 否 | | |
| yDialColor | Color | y 轴的颜色 | 否 | | |
| yHintLineOffset | double | Y 轴辅助线向右偏移量,默认 20(X 轴刻度线也会跟随该偏移量向右偏移) | 否 | 20 | |
| showPointDashLine | bool | 是否展示数据点选中时的辅助线 | 否 | true | |
| dialWidth | double | Y 轴刻度的宽度,和 X 轴刻度的高度 | 否 | 4 | |
| xDialMin | double | X 轴展示范围最小值 | 否 | 0 | |
| xDialMax | double | X 轴展示范围最大值 | 否 | 1 | |
| yDialMin | double | Y 轴展示范围最小值 | 是 | 0 | |
| yDialMax | double | Y 轴展示范围最大值 | 是 | 1 | |
| xDialValues | `List<BrnDialItem>` | X 轴刻度数据 | 否 | | |
| yDialValues | `List<BrnDialItem>` | Y 轴刻度数据 | 否 | | |
| isShowXHintLine | bool | 是否展示 X 轴辅助线 | | true | |
| isShowYHintLine | bool | 是否展示 Y 轴辅助线 | | false | |
| isHintLineSolid | bool | 辅助线是否为虚线 | | true | |
| hintLineColor | Color | 辅助线颜色 | | | |
| isTipWindowAutoDismiss | bool | 点击弹出的 tip 提示框,是否自动消失 | | true | |
| isShowXDialText | bool | 是否展示 X 坐标刻度文案 | | false | |
| isShowYDialText | bool | 是否展示 Y 坐标刻度文案 | | false | |
| 参数名 | 参数类型 | 作用 | 是否必填 | 默认值 | 备注 |
| ---------------------- | --------------------- | ------------------------------------------------------------ | -------- | ------------------------------------ | ---- |
| size | Size | 表格宽高 | 是 | | |
| lines | `List<BrnPointsLine>` | 要绘制的折线集合 | 是 | | |
| contentPadding | EdgeInsets | 图标内容区域 padding(不包含坐标轴) | 否 | EdgeInsets.only(left: 10, right: 10) | |
| backgroundColor | Color | 绘制表格的背景色 | 否 | | |
| xyDialLineWidth | double | xy 轴线条的宽度 | 否 | 2 | |
| xDialColor | Color | x 轴的颜色 | 否 | | |
| yDialColor | Color | y 轴的颜色 | 否 | | |
| yHintLineOffset | double | Y 轴辅助线向右偏移量,默认 20(X 轴刻度线也会跟随该偏移量向右偏移) | 否 | 20.0 | |
| showPointDashLine | bool | 是否展示数据点选中时的辅助线 | 否 | true | |
| dialWidth | double | Y 轴刻度的宽度,和 X 轴刻度的高度 | 否 | 4 | |
| xDialMin | double | X 轴展示范围最小值 | 否 | | |
| xDialMax | double | X 轴展示范围最大值 | 否 | | |
| yDialMin | double | Y 轴展示范围最小值 | 是 | | |
| yDialMax | double | Y 轴展示范围最大值 | 是 | | |
| xDialValues | `List<BrnDialItem>` | X 轴刻度数据 | 否 | | |
| yDialValues | `List<BrnDialItem>`| Y 轴刻度数据 | 否 | | |
| isShowXHintLine | bool | 是否展示 X 轴辅助线 | | true | |
| isShowYHintLine | bool | 是否展示 Y 轴辅助线 | | false | |
| isHintLineSolid | bool | 辅助线是否为虚线 | | true | |
| hintLineColor | Color | 辅助线颜色 | | | |
| isTipWindowAutoDismiss | bool | 点击弹出的 tip 提示框,是否自动消失 | | true | |
| isShowXDialText | bool | 是否展示 X 坐标刻度文案 | | false | |
| isShowYDialText | bool | 是否展示 Y 坐标刻度文案 | | false | |

### 其他数据结构

Expand All @@ -101,15 +107,14 @@ class BrnPointData {
Offset offset;

/// 点要展示的内容
String pointText;
String? pointText;

/// 点展示内容样式
TextStyle pointTextStyle;
TextStyle? pointTextStyle;

/// 折线节点的点击击事件是否可用
bool isClickable;

/// 每个点的点击行为配置数据
BrnLineTouchData lineTouchData;
}
```
Expand All @@ -119,19 +124,16 @@ class BrnPointData {
```
class BrnLineTouchData {
/// 用于临时存储要展示 tip 内容在坐标的位置
double x, y;
double? x, y;

/// 要展示 tip 的相对偏移量
Offset tipOffset;

/// 要展示的 tip 的宽高
Size tipWindowSize;

/// 折线节点点击事件是否可用
bool enabled;

/// 点击回调,由于返回 展示内容(String 或 Widget)
Function() onTouch;
Function()? onTouch;
}
```

Expand All @@ -147,22 +149,22 @@ class BrnPointsLine {
double lineWidth;

/// Line渐变色,从曲线到x轴从上到下的闭合颜色集
List<Color> shaderColors;
List<Color>? shaderColors;

/// 曲线或折线的颜色
Color lineColor;

/// 点外圈的颜色
Color pointColor;
Color? pointColor;

/// 点的外半径参数
double pointRadius;

/// 点内圈的颜色
Color pointInnerColor;
Color? pointInnerColor;

/// 点内圈的半径
double pointInnerRadius;
double? pointInnerRadius;

/// 是否显示x轴的文字,用来处理多个线条绘制的时候,同一x轴坐标不需要绘制多次,则只需要将多条线中一个标记绘制即可
bool isShowXDial;
Expand All @@ -183,10 +185,10 @@ class BrnPointsLine {
```dart
class BrnDialItem {
/// 刻度标志内容
String dialText;
String? dialText;

/// 刻度标志样式
TextStyle dialTextStyle;
TextStyle? dialTextStyle;

/// x,y 轴刻度值。用于刻度在坐标的真实定位
double value;
Expand Down
38 changes: 20 additions & 18 deletions docs/components/charts/BrnDoughnutChart/BrnDoughnutChart.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,37 +29,39 @@ group:

```dart
BrnDoughnutChart(
{this.width = 0,
this.height = 0,
this.padding = EdgeInsets.zero,
this.ringWidth = 50,
this.data,
this.fontSize = 12,
this.fontColor = Colors.white,
this.selectedItem,
this.showTitleWhenSelected = false,
this.brnDoughnutSelectCallback});
{this.width = 0,
this.height = 0,
this.padding = EdgeInsets.zero,
this.ringWidth = 50,
required this.data,
this.fontSize = 12,
this.fontColor = Colors.white,
this.selectedItem,
this.showTitleWhenSelected = false,
this.selectCallback});
```
### 参数说明

| **参数名** | **参数类型** | **描述** | **是否必填** | **默认值** |
| --- | --- | --- | --- | --- |
| width | double | 宽 | | 0 |
| height | double | 高 | | 0 |
| width | double | 宽 | | 0 |
| height | double | 高 | | 0 |
| padding | EdgeInsetsGeometry | 内边距 | 否 | EdgeInsets.zero |
| ringWidth | double | 圆环宽度 | 否 | 50 |
| data | `List<BrnDoughnutDataItem>` | 饼图数据 | 是 | |
| fontSize | double | 选中时展示文字大小 | 否 | 12 |
| fontColor | Color | 选中时展示文字颜色 | 否 | |
| selectedItem | BrnDoughnutDataItem | 选中的项目 | 否 | |
| selectCallback | BrnDoughnutSelectCallback | 选中项目时候的回掉 | 否 | |
| showTitleWhenSelected | bool | 是否仅在选中时展示 title | 否 | |
| fontColor | Color | 选中时展示文字颜色 | 否 | Colors.white |
| selectedItem | BrnDoughnutDataItem? | 选中的项目 | 否 | |
| selectCallback | BrnDoughnutSelectCallback? | 选中项目时候的回掉 | 否 | |
| showTitleWhenSelected | bool | 是否仅在选中时展示 title | 否 | false |

### 其他数据


```dart
DoughnutChartLegend({this.legendStyle = BrnDoughnutChartLegendStyle.wrap, this.data});
DoughnutChartLegend(
{this.legendStyle = BrnDoughnutChartLegendStyle.wrap,
required this.data});
```
## 四、代码演示

Expand All @@ -79,7 +81,7 @@ Column(
data: dataList,
selectedItem: selectedItem,
showTitleWhenSelected: true,
selectCallback: (BrnDoughnutDataItem selectedItem) {
selectCallback: (BrnDoughnutDataItem? selectedItem) {
setState(() {
this.selectedItem = selectedItem;
});
Expand Down
Loading