Skip to content

Commit

Permalink
Merge branch '2.2.x'
Browse files Browse the repository at this point in the history
* 2.2.x: (24 commits)
  opt:change the docs dir to doc (#159)
  [opt][2.2.x]:  1、优化 BrnPopupListWindow  onItemClick 逻辑问题;2、changeLog; 3、优化 Demo (#157)
  fix:优化 Demo AppBar 样式,使用 BrnAppBar 展示。 (#155)
  fix checkbox doc (#154)
  fix broken line demo so short;update doc (#153)
  fix set BrnTextSelectFormItem's titlePaddingLg doesn't work (#152)
  fix:优化 Demo AppBar 样式,使用 BrnAppBar 展示。 (#151)
  [fix][2.2.x]:  fix BrnToast textStyle 默认值丢失的问题 (#150)
  fix some document bug (#148)
  fix BrnBottomTabBar 底部文字在特定情况下无法展示的问题。 (#145)
  Fix the BrnCalendarView status display error (#147)
  Optimize the component logic and fix the problem that the user's `Navigator.push()` operation is invalid (#134)
  BrnSingleSelectDialog add attribute messageText and messageWidget (#133)
  merge null safe to 2.2.x (#122)
  migrate docs to null-safety (#112)
  Merge remote-tracking branch 'origin/null-safe' into 2.2.x (#102)
  replace DIN font with Bebas font (#87) (#92)
  优化sketch教程为视频教程 (#61)
  优化radio_button的点击范围 (#31)
  flutter 2.8.x support (#8)
  ...

# Conflicts:
#	CHANGELOG.md
  • Loading branch information
violinday committed Apr 1, 2022
2 parents b900036 + db6aff0 commit c23ee95
Show file tree
Hide file tree
Showing 664 changed files with 1,813 additions and 1,311 deletions.
16 changes: 14 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
## [2.1.0-nullsafety.1] - 2022-3-10


## [2.1.0-nullsafety] - 2022-4-1

### Changed

#### base
#### base

- **Breaking change**: Sound null safety support, thanks to @leftcoding #39#33 @donywan #20 @laiiihz #80#64#59#32#14 @kalifun #36 @jojinshallar #81#75#65#62#56#42 @junlandroid #73 @Kenneth #53 @HappyImp #55 @kkkman22 #23 @AlexV525 #30
- **Breaking change**: Refer to the dart language specification to optimized constant and enum naming.
- Replace <code>DIN Font</code> with <code>Bebas Font</code> .

#### components

- **Breaking change**: remove <code>BrnHorizontalStepsManager</code> and put function <code>forwardStep()</code> <code>backStep()</code> into <code>BrnStepsController</code> thanks to leftcoding.
- **Breaking change**: remove <code>BrnDialogStyle</code> and replace with <code>BrnDialogConfig</code>.
- <code>BrnCalendarView</code>: add <code>BrnCalendarView.single()</code> and <code>BrnCalendarView.range()</code> constructor and had its argument <code>startEndDateChange</code> removed.
Expand All @@ -16,17 +20,25 @@
- <code>BrnScrollableTextDialog</code>: remove Navigator.pop(context) in <code>onSubmit()</code> and hand it over to external processing (user).
- <code>BrnBubbleText</code>: add attribute <code>bgColor</code> and <code>textStyle</code>.
- <code>BrnPairInfoTable</code>: add attribute <code>defaultVerticalAlignment</code>.
- <code>BrnSingleSelectDialog</code> : add attribute <code>messageText</code> and <code>messageWidget</code>.




### Fixed

- Fix example error [#71](https://github.com/LianjiaTech/bruno/issues/71) thanks to **leftcoding** fixing this issue.

- Fix <code>BrnPickerTitleConfig</code> <code>titleContent</code> setting is invalid [#70](https://github.com/LianjiaTech/bruno/issues/70).

- Optimize <code>BrnPopupWindow </code> <code>onItemClick</code> logic [#57 ](https://github.com/LianjiaTech/bruno/issues/57) .

- Fix <code>BrnDialog</code> is obscured by keyboard [#7](https://github.com/LianjiaTech/bruno/issues/7) .

- Fix <code>BrnTextSelectFormItem</code> set <code>titlePaddingLg</code> doesn't work [#108](https://github.com/LianjiaTech/bruno/issues/108).

- Fix the bottom text of <code>BrnBottomTabBar</code> cannot be displayed in some cases [#141](https://github.com/LianjiaTech/bruno/issues/141).



Thanks again to **leftcoding**, **jojinshallar**, **laiiihz**, **donywan**, **kalifun**, **junlandroid**, **Kenneth**, **HappyImp**, **kkkman22** , **a1017480401** and **Alex**.
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ group:

### 交互规则

1. 通用的已选列表弹窗。包括顶部工具条和中间的数据列表两部分,不包括底部的按钮交互区域,底部的按钮Demo中使用的是 [BrnBottomButtonPanel](../../buttonPanel/BrnButtonPanel/BrnBottomButtonPanel.md)。整体布局通过`OverlayEntry` 实现,将控制列表的控制功能和已选列表视图独立开来,一来可以更加方便的控制列表,二来可以充分自定义控制列表的功能区域。
1. 通用的已选列表弹窗。包括顶部工具条和中间的数据列表两部分,不包括底部的按钮交互区域,底部的按钮Demo中使用的是 [BrnBottomButtonPanel](../widgets/brn-button-panel)。整体布局通过`OverlayEntry` 实现,将控制列表的控制功能和已选列表视图独立开来,一来可以更加方便的控制列表,二来可以充分自定义控制列表的功能区域。
2. 工具条:包括关闭弹窗和清空按钮。
3. 数据列表中每一行,从左至右依次是`icon`(高50,宽45)、文本和移除按钮。
4. 最小行高50,如果是自定义每行视图,则高度自动撑开。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ group:
### 交互规则

1. BrnAppraise:评价组件,支持表情包和五角星两种,可使用在页面和弹窗里。
2. [BrnAppraiseBottomPicker](../brn-appraise-bottom-picker/brn-appraise-bottom-picker):评价组件底部弹窗,对 BrnAppraise 做了一层 picker 的封装,参数与 BrnAppraise 完全一致。
2. [BrnAppraiseBottomPicker](../widgets/brn-appraise-bottom-picker):评价组件底部弹窗,对 BrnAppraise 做了一层 picker 的封装,参数与 BrnAppraise 完全一致。

### 使用规范

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ group:

# BrnAppraiseBottomPicker

以 picker 样式展现的评价组件。具体参数和 [BrnAppraise](../brn-appraise/brn-appraise) 一样。
以 picker 样式展现的评价组件。具体参数和 [BrnAppraise](../widgets/brn-appraise) 一样。

## 一、效果总览
![](./img/BrnAppraiseBottomPickerIntro.png)
Expand All @@ -16,7 +16,7 @@ group:

### 适用场景

需要收集用户评价和反馈的业务场景,并以弹窗形式展示。页面交互规则和使用规范参见 [BrnAppraise](../brn-appraise/brn-appraise)
需要收集用户评价和反馈的业务场景,并以弹窗形式展示。页面交互规则和使用规范参见 [BrnAppraise](../widgets/brn-appraise)

## 三、构造函数及参数说明

Expand Down Expand Up @@ -47,7 +47,7 @@ BrnAppraiseBottomPicker({
| tags | `List<String>?` | 供选择的标签数据 |||
| inputHintText | String | 输入框的提示文字 || '' |
| onConfirm | `void Function(int index, List<String> selectedTags, String input)?` | 点击提交时的回调,其中index是选中的表情或者五角星的index,selectedTags是选中的标签,input是输入框的内容 |||
| config | BrnAppraiseConfig | 配置类,具体参见 [BrnAppraise](../brn-appraise/brn-appraise) || BrnAppraiseConfig() |
| config | BrnAppraiseConfig | 配置类,具体参见 [BrnAppraise](../widgets/brn-appraise) || BrnAppraiseConfig() |

### 四、代码演示

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ const BrnBottomButtonPanel(

| 参数名 | 参数类型 | 描述 | 是否必填 | 默认值 |
| --- | --- | --- | --- | --- |
| mainButtonName | String | 主按钮的显示文案 | ||
| mainButtonOnTap | VoidCallback | 主按钮的点击回调 | ||
| mainButtonName | String | 主按钮的显示文案 | ||
| mainButtonOnTap | VoidCallback | 主按钮的点击回调 | ||
| secondaryButtonName | String? | 次按钮显示文案 |||
| secondaryButtonOnTap | VoidCallback? | 次按钮的点击回调 |||
| iconButtonList | List<BrnVerticalIconButton>? | icon按钮的集合 |||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,16 @@ BrnBottomTabBar({

```dart
const BrnBottomTabBarItem({
required this.icon,
this.title,
Widget? activeIcon,
this.backgroundColor,
this.badge,
this.badgeNo,
this.maxBadgeNo = 99,
}) : activeIcon = activeIcon ?? icon;
this.title,
required this.icon,
Widget? activeIcon,
this.selectedTextStyle,
this.unSelectedTextStyle,
this.backgroundColor,
this.badge,
this.badgeNo,
this.maxBadgeNo = 99,
}) : activeIcon = activeIcon ?? icon;
```


Expand All @@ -81,11 +83,15 @@ const BrnBottomTabBarItem({
| icon | Widget | 未选中时的icon |||
| activeIcon | Widget | 选中时的icon |||
| title | Widget? | Tab标题名调 |||
| selectedTextStyle | TextStyle? | tab 选中文本样式 |||
| unSelectedTextStyle | TextStyle? | tab 未选中文本样式 |||
| backgroundColor | Color? | 背景色 |||
| badge | Widget? | 未读信息 |||
| badgeNo | String? | 未读信息个数 |||
| maxBadgeNo | int | 未读消息最大个数 || 99 |



## 四、代码演示

### 效果1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,37 +30,37 @@ group:

```dart
BrnBrokenLine({
Key? key,
required this.size,
required this.lines,
this.contentPadding = const EdgeInsets.only(left: 10, right: 10),
this.backgroundColor,
this.xyDialLineWidth = 2,
this.xDialColor,
this.yDialColor,
this.yHintLineOffset = 20.0,
this.showPointDashLine = true,
this.dialWidth = 4,
this.xDialMin,
this.xDialMax,
this.xDialValues,
required this.yDialMin,
required this.yDialMax,
this.yDialValues,
this.isShowXHintLine = true,
this.isShowYHintLine = false,
this.isHintLineSolid = true,
this.hintLineColor,
this.isTipWindowAutoDismiss = true,
this.isShowXDialText = false,
this.isShowYDialText = false,
}) : super(key: key) {
// 设置自定义 X 轴时,检查 x轴的最大、最小刻度范围
if (xDialValues != null) {
assert(xDialMin != null);
assert(xDialMax != null);
}
Key? key,
required this.size,
required this.lines,
this.contentPadding = const EdgeInsets.only(left: 10, right: 10),
this.backgroundColor,
this.xyDialLineWidth = 2,
this.xDialColor,
this.yDialColor,
this.yHintLineOffset = 20.0,
this.showPointDashLine = true,
this.dialWidth = 4,
this.xDialMin,
this.xDialMax,
this.xDialValues,
required this.yDialMin,
required this.yDialMax,
this.yDialValues,
this.isShowXHintLine = true,
this.isShowYHintLine = false,
this.isHintLineSolid = true,
this.hintLineColor,
this.isTipWindowAutoDismiss = true,
this.isShowXDialText = false,
this.isShowYDialText = false,
}) : super(key: key) {
// 设置自定义 X 轴时,检查 x轴的最大、最小刻度范围
if (xDialValues != null) {
assert(xDialMin != null);
assert(xDialMax != null);
}
}
```

### 参数说明:
Expand All @@ -77,19 +77,19 @@ BrnBrokenLine({
| yHintLineOffset | double | Y 轴辅助线向右偏移量,默认 20(X 轴刻度线也会跟随该偏移量向右偏移) || 20.0 | |
| showPointDashLine | bool | 是否展示数据点选中时的辅助线 || true | |
| dialWidth | double | Y 轴刻度的宽度,和 X 轴刻度的高度 || 4 | |
| xDialMin | double | X 轴展示范围最小值 || | |
| xDialMax | double | X 轴展示范围最大值 || | |
| 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 | |
| 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 Down Expand Up @@ -121,7 +121,7 @@ class BrnPointData {

#### BrnLineTouchData 每个点的点击行为配置数据

```
```dart
class BrnLineTouchData {
/// 用于临时存储要展示 tip 内容在坐标的位置
double? x, y;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ BrnDoughnutChart(
| width | double ||| 0 |
| height | double ||| 0 |
| padding | EdgeInsetsGeometry | 内边距 || EdgeInsets.zero |
| ringWidth | double | 圆环宽度 || 50 |
| ringWidth | int | 圆环宽度 || 50 |
| data | `List<BrnDoughnutDataItem>` | 饼图数据 || |
| fontSize | double | 选中时展示文字大小 || 12 |
| fontColor | Color | 选中时展示文字颜色 || Colors.white |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
title: BrnRadioItem
title: BrnCheckbox
group:
title: Radio
order: 25
---

# BrnRadioItem
# BrnCheckbox

多项选择

## 一、效果总览

<img src="./img/BrnRadioItemIntro.png" style="zoom:50%;" />
<img src="./img/BrnCheckboxIntro.png" style="zoom:50%;" />

## 二、描述

Expand Down Expand Up @@ -60,7 +60,7 @@ const BrnCheckbox({

### 效果1:多选+选项居右+不可用状态

![](./img/BrnRadioItemDemo1.png)
![](./img/BrnCheckboxDemo1.png)
```dart
Container(
height: 130,
Expand Down Expand Up @@ -93,7 +93,7 @@ Container(

### 效果2:自定义视图

![](./img/BrnRadioItemDemo2.png)
![](./img/BrnCheckboxDemo2.png)
```dart
BrnCheckbox(
radioIndex: 10,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ BrnDialog({
| titleText | String? | 对话框的标题文案 |||
| messageText | String? | 对话框中间的显示文本 |||
| warningText | String? | 对话框的警示文案文本 |||
| actionsText | List<String>? | 对话框底部的按钮 |||
| actionsText | `List<String>?` | 对话框底部的按钮 |||
| titleWidget | Widget? | 自定义widget的标题 |||
| contentWidget | Widget? | 自定义widget的内容 |||
| warningWidget | Widget? | 自定义widget的警示内容 |||
| actionsWidget | List<Widget>? | 对话框底部的自定义widget按钮 |||
| actionsWidget | `List<Widget>?` | 对话框底部的自定义widget按钮 |||
| indexedActionCallback | DialogIndexedActionClickCallback? | 对话框底部的点击回调 |||
| divider | Divider | 底部按钮的水平和上面内容的水平分割线 || 高1像素的L1分割线 |
| verticalDivider | VerticalDivider | 底部按钮之间的分割线 || 宽1像素的L1分割线 |
Expand Down Expand Up @@ -130,7 +130,7 @@ BrnDialog({
| **参数名** | **参数类型** | **作用** | **是否必填** | **默认值** |
| --- | --- | --- | --- | --- |
| context | BuildContext | 用于显示弹窗的上下文 |||
| actions | List<String> | 对话框底部的按钮 |||
| actions | `List<String>` | 对话框底部的按钮 |||
| showIcon | bool | 是否显示icon || false |
| iconWidget | Image? | 头部显示的icon 默认为alert || 主题色alert |
| title | String? | 对话框的标题文案 |||
Expand All @@ -139,7 +139,7 @@ BrnDialog({
| messageWidget | Widget? | 自定义widget的内容 |||
| warning | String? | 对话框的警示文案文本 |||
| warningWidget | Widget? | 自定义widget的警示内容 |||
| actionsWidget | List<Widget>? | 对话框底部的自定义widget按钮 |||
| actionsWidget |` List<Widget>?` | 对话框底部的自定义widget按钮 |||
| indexedActionClickCallback | DialogIndexedActionClickCallback? | 对话按钮点击的回调 |||
| titleMaxLines | int | 标题最大行数 || 3 |
| barrierDismissible | bool | 点击对话框遮罩是否消失对话框 || true 关闭 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ group:
## 二、描述

1. 带输入框的Dialog,在BrnDialogManager 基础上封装了输入框功能。
2. 更进一步的细节定制,可使用 [BrnDialog](../brn-dialog/brn-dialog) 实现
2. 更进一步的细节定制,可使用 [BrnDialog](../widgets/brn-dialog) 实现

## 三、构造方法及参数说明

Expand Down Expand Up @@ -57,7 +57,7 @@ const BrnMiddleInputDialog(
| inputEditingController | TextEditingController? | 输入控制器。如果有初始状态的填充文字,可以通过 [inputEditingController] 设置 || |
| cancelText | String | 取消文案 || 取消 |
| confirmText | String | 确定文案 || 确定 |
| inputFormatters | List<TextInputFormatter>? | 键盘操作按钮类型,可参见系统的 TextField.textInputAction || TextInputAction.newline |
| inputFormatters | `List<TextInputFormatter>?` | 键盘操作按钮类型,可参见系统的 TextField.textInputAction || TextInputAction.newline |
| textInputAction | `TextInputAction` | 用于控制输入的内容范围比如只能输入数字可以填写:`FilteringTextInputFormatter.digitsOnly` |||
| onConfirm | void Function(String value)? | 确定回调,返回输入的值 || |
| onCancel | VoidCallback | 取消回调 || |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ group:

### 适用场景

多选列表,适用于从页面中部弹出的情况,属于 Dialog。 相似组件有 [BrnMultiSelectListPicker](../../picker/brn-multi-select-list-picker/brn-multi-select-list-picker), 从页面中部弹出。
多选列表,适用于从页面中部弹出的情况,属于 Dialog。 相似组件有 [BrnMultiSelectListPicker](../widgets/brn-multi-select-list-picker), 从页面中部弹出。

## 三、构造函数及参数说明

Expand Down
Loading

0 comments on commit c23ee95

Please sign in to comment.