From 7519e8ef15686cf2d7efe3a2d476e3bb92b7703b Mon Sep 17 00:00:00 2001
From: Sandy <15143015732@163.com>
Date: Mon, 24 Jul 2023 17:15:48 +0800
Subject: [PATCH] Updatedocs3.4.0 (#475)
* update version to 3.4.0
* add appbar change
* update docs
* update appbar doc
---
CHANGELOG.md | 4 +-
doc/components/appbar/BrnAppBar/BrnAppBar.md | 79 +++++++++----------
.../appbar/BrnSearchAppbar/BrnSearchAppbar.md | 37 ++++-----
.../BrnExpandFormGroup/BrnExpandFormGroup.md | 2 -
.../BrnNormalFormGroup/BrnNormalFormGroup.md | 2 +-
.../BrnSimpleSelection/BrnSimpleSelection.md | 3 +
6 files changed, 65 insertions(+), 62 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cb1f58c4..73ae34d0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,10 +8,12 @@
#### components
-- **Breaking change**: Since flutter sdk 3.10.0 deletes the brightness
and textTheme
attributes of Appbar
, BrnAppBar
is deleted synchronously. Instead, use themeData
. BrnAppBarConfig
will support all your needs. For details, see Demo usage.
+- **Breaking change**: Since flutter sdk 3.10.0 deletes the brightness
and textTheme
attributes of Appbar
, BrnAppBar
、BrnSearchAppbar
is deleted synchronously. Instead, use themeData
. BrnAppBarConfig
will support all your needs. For details, see Demo usage.
- BrnSimpleSelection
: support theme configuration [#420 ](https://github.com/LianjiaTech/bruno/pull/420) , thanks to **JunCaiLi** .
- Add missing themeData for BrnNormalFormGroup
and BrnPortraitRadioGroup
[#455](https://github.com/LianjiaTech/bruno/pull/445), thanks to **Kingtous**.
- BrnTabBar
: add onTap
method for _TabBarOverlayWidget
[#393](https://github.com/LianjiaTech/bruno/pull/393).
+- BrnExpandFormGroup
and BrnNormalFormGroup
remove invalid attribute tipLabel
.
+- BrnIconButton
: fix the abnormal position of icons and text.
diff --git a/doc/components/appbar/BrnAppBar/BrnAppBar.md b/doc/components/appbar/BrnAppBar/BrnAppBar.md
index 9c3f500a..87145236 100644
--- a/doc/components/appbar/BrnAppBar/BrnAppBar.md
+++ b/doc/components/appbar/BrnAppBar/BrnAppBar.md
@@ -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)),
- 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)),
+ assert(title == null || title is String || title is Widget),
+ super(key: key, child: Container(), preferredSize: Size(0, 0));
```
@@ -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? | 自定义的返回事件 | 否 | 无 |
@@ -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对应的主题定制类 | 否 | |
@@ -101,7 +99,7 @@ BrnAppBar(
``` dart
BrnAppBar(
- brightness: Brightness.dark,
+ themeData: BrnAppBarConfig.dark(),
title: Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
@@ -142,7 +140,7 @@ BrnAppBar(
width: 20,
height: 20,
),
- brightness: Brightness.dark,
+ themeData: BrnAppBarConfig.dark(),
//文本title
title: '标题名称',
);
@@ -164,7 +162,7 @@ BrnAppBar(
actions: BrnTextAction(
'文本按钮',
//设置为深色背景,则显示白色
- brightness: Brightness.dark,
+ themeData: BrnAppBarConfig.dark(),
),
)
```
@@ -181,6 +179,7 @@ var actionKey = GlobalKey();
BrnAppBar(
title: '标题名称',
+ themeData: BrnAppBarConfig.dark(),
leading: BrnDoubleLeading(
first: BrnBackLeading(),
second: BrnBackLeading(
@@ -212,7 +211,7 @@ BrnAppBar(
``` dart
BrnAppBar(
- brightness: Brightness.dark,
+ themeData: BrnAppBarConfig.dark(),
automaticallyImplyLeading: false,
//自定义显示的title 为切换的row
title: Row(
@@ -265,7 +264,7 @@ return GestureDetector(
``` dart
BrnAppBar(
- brightness: Brightness.dark,
+ themeData: BrnAppBarConfig.dark(),
//自定义leading
leading: BrnBackLeading(
child: Image.asset(
@@ -328,7 +327,7 @@ BrnAppBar(
``` dart
BrnAppBar(
- brightness: Brightness.dark,
+ themeData: BrnAppBarConfig.dark(),
automaticallyImplyLeading: true,
//多icon
actions: [
@@ -378,13 +377,13 @@ BrnAppBar(
BrnAppBar(
//默认显示返回按钮
automaticallyImplyLeading: true,
- brightness: Brightness.light,
+ themeData: BrnAppBarConfig.light(),
title: '名称名称',
//自定义的右侧文本
actions: BrnTextAction(
'文本按钮',
//设置为深色背景,则显示白色
- brightness: Brightness.light,
+ themeData: BrnAppBarConfig.light(),
),
)
```
diff --git a/doc/components/appbar/BrnSearchAppbar/BrnSearchAppbar.md b/doc/components/appbar/BrnSearchAppbar/BrnSearchAppbar.md
index 96fa61e2..75247d6b 100644
--- a/doc/components/appbar/BrnSearchAppbar/BrnSearchAppbar.md
+++ b/doc/components/appbar/BrnSearchAppbar/BrnSearchAppbar.md
@@ -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));
```
@@ -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? | 点击清除按钮回调 | 否 | |
## 四、效果及代码展示
diff --git a/doc/components/form/BrnExpandFormGroup/BrnExpandFormGroup.md b/doc/components/form/BrnExpandFormGroup/BrnExpandFormGroup.md
index 642b803c..27544202 100644
--- a/doc/components/form/BrnExpandFormGroup/BrnExpandFormGroup.md
+++ b/doc/components/form/BrnExpandFormGroup/BrnExpandFormGroup.md
@@ -40,7 +40,6 @@ BrnExpandFormGroup({
this.label,
this.title = "",
this.subTitle,
- this.tipLabel,
this.error = "",
this.isEdit = true,
this.isRequire = false,
@@ -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:禁用 |
diff --git a/doc/components/form/BrnNormalFormGroup/BrnNormalFormGroup.md b/doc/components/form/BrnNormalFormGroup/BrnNormalFormGroup.md
index e4f0eb5e..aac2cbb9 100644
--- a/doc/components/form/BrnNormalFormGroup/BrnNormalFormGroup.md
+++ b/doc/components/form/BrnNormalFormGroup/BrnNormalFormGroup.md
@@ -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();
diff --git a/doc/components/selection/BrnSimpleSelection/BrnSimpleSelection.md b/doc/components/selection/BrnSimpleSelection/BrnSimpleSelection.md
index d21b0ce6..58aff5db 100644
--- a/doc/components/selection/BrnSimpleSelection/BrnSimpleSelection.md
+++ b/doc/components/selection/BrnSimpleSelection/BrnSimpleSelection.md
@@ -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);
@@ -55,6 +56,7 @@ BrnSimpleSelection.checkbox({
required this.items,
required this.onSimpleSelectionChanged,
this.onMenuItemClick,
+ this.themeData,
}) : this.isRadio = false,
super(key: key);
```
@@ -73,6 +75,7 @@ BrnSimpleSelection.checkbox({
| onSimpleSelectionChanged | BrnSimpleSelectionOnSelectionChanged | 选择回调 | 是 | |
| onMenuItemClick | VoidCallback? | 菜单点击事件 | 否 | |
| isRadio | bool | 是否单选 默认 radio模式 is true , checkbox模式 is false | 否 | radio模式默认true checkbox模式默认false |
+| themeData | BrnSelectionConfig |筛选项配置类|否||
## 四、代码演示