Skip to content

Commit

Permalink
Updatedocs3.4.0 (#475)
Browse files Browse the repository at this point in the history
* update version to 3.4.0

* add appbar change

* update docs

* update appbar doc
  • Loading branch information
zhoujuanjuan authored Jul 24, 2023
1 parent bc4a369 commit 7519e8e
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 62 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@

#### components

- **Breaking change**: Since flutter sdk 3.10.0 deletes the <code>brightness</code> and <code>textTheme</code> attributes of <code>Appbar</code>,<code> BrnAppBar </code>is deleted synchronously. Instead, use <code>themeData</code>. <code>BrnAppBarConfig</code> will support all your needs. For details, see Demo usage.
- **Breaking change**: Since flutter sdk 3.10.0 deletes the <code>brightness</code> and <code>textTheme</code> attributes of <code>Appbar</code>,<code> BrnAppBar </code>、<code>BrnSearchAppbar</code> is deleted synchronously. Instead, use <code>themeData</code>. <code>BrnAppBarConfig</code> will support all your needs. For details, see Demo usage.
- <code>BrnSimpleSelection</code> : support theme configuration [#420 ](https://github.com/LianjiaTech/bruno/pull/420) , thanks to **JunCaiLi** .
- Add missing themeData for <code>BrnNormalFormGroup</code> and <code>BrnPortraitRadioGroup</code> [#455](https://github.com/LianjiaTech/bruno/pull/445), thanks to **Kingtous**.
- <code>BrnTabBar</code> : add <code>onTap</code> method for <code>_TabBarOverlayWidget</code> [#393](https://github.com/LianjiaTech/bruno/pull/393).
- <code>BrnExpandFormGroup</code> and <code>BrnNormalFormGroup</code> remove invalid attribute <code>tipLabel</code>.
- <code>BrnIconButton</code> : fix the abnormal position of icons and text.



Expand Down
79 changes: 39 additions & 40 deletions doc/components/appbar/BrnAppBar/BrnAppBar.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,36 +30,35 @@ group:

``` dart
BrnAppBar(
{Key? key,
this.leading,
this.showLeadingDivider = false,
this.title,
this.actions,
this.backgroundColor,
this.bottom,
this.elevation = 0,
this.automaticallyImplyLeading = true,
this.brightness,
this.toolbarOpacity = 1.0,
this.bottomOpacity = 1.0,
this.titleAlignment = Alignment.center,
this.flexibleSpace,
this.backLeadCallback,
this.showDefaultBottom = true,
this.themeData,
this.leadingWidth,
this.shadowColor,
this.shape,
this.iconTheme,
this.actionsIconTheme,
this.excludeHeaderSemantics = false,
this.primary = true,
this.textTheme,
this.titleSpacing})
: assert(
actions == null || actions is Widget || (actions is List<Widget>)),
assert(title == null || title is String || title is Widget),
super(key: key, child: Container(), preferredSize: Size(0, 0));
{Key? key,
this.leading,
this.showLeadingDivider = false,
this.title,
this.actions,
this.backgroundColor,
this.bottom,
this.elevation = 0,
this.automaticallyImplyLeading = true,
this.toolbarOpacity = 1.0,
this.bottomOpacity = 1.0,
this.titleAlignment = Alignment.center,
this.flexibleSpace,
this.backLeadCallback,
this.showDefaultBottom,
this.themeData,
this.leadingWidth,
this.shadowColor,
this.shape,
this.iconTheme,
this.actionsIconTheme,
this.excludeHeaderSemantics = false,
this.primary = true,
this.systemOverlayStyle,
this.titleSpacing})
: assert(
actions == null || actions is Widget || (actions is List<Widget>)),
assert(title == null || title is String || title is Widget),
super(key: key, child: Container(), preferredSize: Size(0, 0));
```


Expand All @@ -73,7 +72,6 @@ BrnAppBar(
| bottom | PreferredSizeWidget? | AppBar底部紧挨着的Widget |||
| bottomOpacity | double | AppBar 底部Widget透明度,即 bottom 字段的透明度 || 1.0 |
| elevation | double | AppBar 阴影高度 || 0 |
| brightness | Brightness? | AppBar 主题,包括 dark、light 两种类型 || Brightness.dark |
| toolbarOpacity | double | Appbar 透明度 || 1.0 |
| titleAlignment | Alignment | title 对齐方式 || Alignment.center |
| backLeadCallback | VoidCallback? | 自定义的返回事件 |||
Expand All @@ -84,7 +82,7 @@ BrnAppBar(
| shape | ShapeBorder? | 边框形状,只有当elevation大于0的时候展示 || |
| iconTheme | IconThemeData? | icon样式定制 || |
| actionsIconTheme | IconThemeData? | icon主题定制 || |
| textTheme | TextTheme? | text主题定制 || |
| systemOverlayStyle | SystemUiOverlayStyle? | 同 Appbar systemOverlayStyle || |
| primary | bool | 此应用栏是否显示在屏幕顶部 || |
| excludeHeaderSemantics | bool | 是否用Semantics包裹 || |
| themeData | BrnAppBarConfig? | BrnAppBar对应的主题定制类 || |
Expand All @@ -101,7 +99,7 @@ BrnAppBar(

``` dart
BrnAppBar(
brightness: Brightness.dark,
themeData: BrnAppBarConfig.dark(),
title: Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
Expand Down Expand Up @@ -142,7 +140,7 @@ BrnAppBar(
width: 20,
height: 20,
),
brightness: Brightness.dark,
themeData: BrnAppBarConfig.dark(),
//文本title
title: '标题名称',
);
Expand All @@ -164,7 +162,7 @@ BrnAppBar(
actions: BrnTextAction(
'文本按钮',
//设置为深色背景,则显示白色
brightness: Brightness.dark,
themeData: BrnAppBarConfig.dark(),
),
)
```
Expand All @@ -181,6 +179,7 @@ var actionKey = GlobalKey();
BrnAppBar(
title: '标题名称',
themeData: BrnAppBarConfig.dark(),
leading: BrnDoubleLeading(
first: BrnBackLeading(),
second: BrnBackLeading(
Expand Down Expand Up @@ -212,7 +211,7 @@ BrnAppBar(

``` dart
BrnAppBar(
brightness: Brightness.dark,
themeData: BrnAppBarConfig.dark(),
automaticallyImplyLeading: false,
//自定义显示的title 为切换的row
title: Row(
Expand Down Expand Up @@ -265,7 +264,7 @@ return GestureDetector(

``` dart
BrnAppBar(
brightness: Brightness.dark,
themeData: BrnAppBarConfig.dark(),
//自定义leading
leading: BrnBackLeading(
child: Image.asset(
Expand Down Expand Up @@ -328,7 +327,7 @@ BrnAppBar(

``` dart
BrnAppBar(
brightness: Brightness.dark,
themeData: BrnAppBarConfig.dark(),
automaticallyImplyLeading: true,
//多icon
actions: <Widget>[
Expand Down Expand Up @@ -378,13 +377,13 @@ BrnAppBar(
BrnAppBar(
//默认显示返回按钮
automaticallyImplyLeading: true,
brightness: Brightness.light,
themeData: BrnAppBarConfig.light(),
title: '名称名称',
//自定义的右侧文本
actions: BrnTextAction(
'文本按钮',
//设置为深色背景,则显示白色
brightness: Brightness.light,
themeData: BrnAppBarConfig.light(),
),
)
```
37 changes: 19 additions & 18 deletions doc/components/appbar/BrnSearchAppbar/BrnSearchAppbar.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,24 @@ group:


```dart
const BrnSearchAppbar(
{this.controller,
this.focusNode,
this.leading,
this.leadClickCallback,
this.dismissClickCallback,
this.searchBarInputChangeCallback,
this.searchBarInputSubmitCallback,
this.hint,
this.hintStyle,
this.dismissStyle,
this.showDivider = true,
this.autoFocus = true,
this.brightness = Brightness.dark,
this.onClearTap,
this.inputTextStyle})
: super(child: const Center(), preferredSize: const Size(0, 0));
BrnSearchAppbar(
{this.controller,
this.focusNode,
this.leading,
this.leadClickCallback,
this.dismissClickCallback,
this.searchBarInputChangeCallback,
this.searchBarInputSubmitCallback,
this.hint,
this.hintStyle,
this.dismissStyle,
this.showDivider = true,
this.autoFocus = true,
this.onClearTap,
this.systemOverlayStyle,
this.inputTextStyle,
this.themeData})
: super(child: const Center(), preferredSize: const Size(0, 0));
```


Expand All @@ -60,7 +61,7 @@ const BrnSearchAppbar(
| dismissStyle | TextStyle? | 右侧Action的文本Style |||
| showDivider | bool | 是否展示底部分割线 || bool |
| autoFocus | bool | 是否自动聚焦 || bool |
| brightness | Brightness | 主题配置 || Brightness.dark |
| systemOverlayStyle | SystemUiOverlayStyle | 同 Appbar systemOverlayStyle || |
| onClearTap | VoidCallback? | 点击清除按钮回调 || |

## 四、效果及代码展示
Expand Down
2 changes: 0 additions & 2 deletions doc/components/form/BrnExpandFormGroup/BrnExpandFormGroup.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ BrnExpandFormGroup({
this.label,
this.title = "",
this.subTitle,
this.tipLabel,
this.error = "",
this.isEdit = true,
this.isRequire = false,
Expand All @@ -61,7 +60,6 @@ BrnExpandFormGroup({
| type | Stirng | 录入项类型,主要用于录入类型页面框架中 || BrnInputItemType.normalGroupType | 外部可根据此字段判断表单项类型 |
| title | String | 录入项标题 || '' | |
| subTitle | String? | 录入项子标题 ||| |
| tipLabel | String? | 录入项提示(问号图标&文案) 用户点击时触发onTip回调。 || 备注中类型3 | 1. 设置"空字符串"时展示问号图标 2. 设置"非空字符串"时展示问号图标&文案 3. 若不赋值或赋值为null时,不显示提示项 |
| error | String | 录入项错误提示 || '' | |
| isRequire | bool | 录入项是否为必填项(展示`*`图标) 默认为 false 不必填 || false | |
| isEdit | bool | 录入项 是否可编辑 || true | true:可编辑,false:禁用 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ BrnNormalFormGroup({
this.label,
this.title = "",
this.subTitle,
this.tipLabel,
this.error = "",
this.isEdit = true,
this.isRequire = false,
this.onRemoveTap,
this.onTip,
this.deleteLabel,
this.themeData,
required this.children,
}) : super(key: key) {
this.themeData ??= BrnFormItemConfig();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ BrnSimpleSelection.radio({
required this.items,
required this.onSimpleSelectionChanged,
this.onMenuItemClick,
this.themeData,
}) : this.isRadio = true,
this.maxSelectedCount = BrnSelectionConstant.maxSelectCount,
super(key: key);
Expand All @@ -55,6 +56,7 @@ BrnSimpleSelection.checkbox({
required this.items,
required this.onSimpleSelectionChanged,
this.onMenuItemClick,
this.themeData,
}) : this.isRadio = false,
super(key: key);
```
Expand All @@ -73,6 +75,7 @@ BrnSimpleSelection.checkbox({
| onSimpleSelectionChanged | BrnSimpleSelectionOnSelectionChanged | 选择回调 || |
| onMenuItemClick | VoidCallback? | 菜单点击事件 || |
| isRadio | bool | 是否单选 默认 radio模式 is true , checkbox模式 is false || radio模式默认true checkbox模式默认false |
| themeData | BrnSelectionConfig |筛选项配置类|||

## 四、代码演示

Expand Down

0 comments on commit 7519e8e

Please sign in to comment.