Skip to content

Commit

Permalink
Merge branch '3.x' into master
Browse files Browse the repository at this point in the history
* 3.x:
  Updatedocs3.4.0 (#475)
  update version to 3.4.0 (#474)
  BrnSimpleSelection add themeData (#420)
  opt: add missing themeData configs for brn groups. (#445)
  adapt sdk 3.10.2 (#472)
  fix: BrnTabBar More 组件内item点击切换,没有触发onTap事件。 (#393)
  fix doc bruno page (#451)
  Update theme.md (#437)
  optimize ui by using const (#425)
  Update build_test.yml
  fix the overlap of the icon and text positions    (#440)
  remove attribute tipLabel (#439)
  • Loading branch information
violinday committed Jul 24, 2023
2 parents d9f7d28 + 7519e8e commit 9bf07bf
Show file tree
Hide file tree
Showing 36 changed files with 239 additions and 215 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.3.0'
flutter-version: '3.10.0'
- run: dart --version
- run: flutter --version
- run: flutter pub get
Expand All @@ -37,7 +37,7 @@ jobs:
java-version: '8.x'
- uses: subosito/flutter-action@v1
with:
flutter-version: '3.3.0'
flutter-version: '3.10.0'
- run: dart --version
- run: flutter --version
- run: flutter pub get
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
## [3.4.0] - 2023-7-24

### Changed

#### base

- Adapt flutter sdk 3.10.0.

#### 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>、<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.




## [3.3.0] - 2023-2-1

### Changed
Expand Down
2 changes: 2 additions & 0 deletions README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ Please download from [Releases](https://github.com/LianjiaTech/bruno/releases) o
| 3.0.0 | 3.0.3 |
| 3.1.0 | 3.3.0 |
| 3.2.0 | 3.3.0 |
| 3.3.0 | 3.7.0 |
| 3.4.0 | 3.10.0 |


## Preparing for use
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
| 3.0.0 | 3.0.3 |
| 3.1.0 | 3.3.0 |
| 3.2.0 | 3.3.0 |
| 3.3.0 | 3.7.0 |
| 3.4.0 | 3.10.0 |




Expand Down
14 changes: 10 additions & 4 deletions doc/bruno.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,19 @@ Bruno 是基于一整套设计体系的 Flutter 组件库。
- 提炼自企业级移动端产品的交互和视觉风格
- 开箱即用的高质量 Flutter 组件
- 提供满足业务差异的主题定制能力
- 设计工具赋能开发全链路

### 适配 Flutter SDK 版本

| Bruno 版本 | Flutter SDK 版本 |
| ---------- | ---------------- |
| 1.0.0 | 1.22.4 |
| 2.0.0 | 2.2.2 |
| Bruno 版本 | Flutter SDK 版本 |
| ---------- | ---------------- |
| 1.0.0 | 1.22.4 |
| 2.0.0 | 2.2.2 |
| 2.1.1 (支持空安全) | 2.2.2 |
| 2.2.0 | 2.10.5 |
| 3.0.0 | 3.0.3 |
| 3.1.0 | 3.3.0 |
| 3.2.0 | 3.3.0 |

### 接入

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
2 changes: 1 addition & 1 deletion doc/theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class XxxConfigUtils {
static BrnCommonConfig defaultCommonConfig = BrnCommonConfig(
brandPrimary: const Color(0xFF3072F6),
;
);
/// Dialog配置
static BrnDialogConfig defaultDialogConfig = BrnDialogConfig(
Expand Down
2 changes: 1 addition & 1 deletion example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ class ExpansionGroupExample extends StatelessWidget {
title: "展开收起分组",
subTitle: "这里是副标题",
deleteLabel: "删除",
tipLabel: "标签",
error: "必填项不能为空",
isRequire: true,
isEdit: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ class NormalGroupExample extends StatelessWidget {
title: "普通分组",
subTitle: "这里是副标题",
deleteLabel: "删除",
tipLabel: "标签",
error: "必填项不能为空",
isRequire: true,
isEdit: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ class _ForceGuideExampleState extends State<ForceGuideExample> {
return WillPopScope(
child: Scaffold(
appBar: BrnAppBar(
brightness: Brightness.light,
title: Text(
'强引导组件example',
key: intro.keys[0],
Expand Down
Loading

0 comments on commit 9bf07bf

Please sign in to comment.