Skip to content

Commit

Permalink
Merge branch 'master' into 2.2.x
Browse files Browse the repository at this point in the history
* master:
  fix:actionsheet title is not null (#128)
  update version to 2.1.0-nullsafety.0 (#127)
  fix:修复自定义弹窗view 错误 (#126)

# Conflicts:
#	CHANGELOG.md
  • Loading branch information
violinday committed Mar 11, 2022
2 parents 7578a9d + ea672ed commit fa6a233
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 36 deletions.
10 changes: 5 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@


## [2.1.0-Beta] - 2022-2-15
## [2.1.0-nullsafety.0] - 2022-3-10
### Changed

#### base
Expand All @@ -12,11 +10,14 @@

#### 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.
- <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** .
- <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>BrnBubbleText</code>: add attribute <code>bgColor</code> and <code>textStyle</code>.
- <code>BrnPairInfoTable</code>: add attribute <code>defaultVerticalAlignment</code>.
- <code>BrnDialog</code>: remove <code>BrnDialogStyle</code> and replace with <code>BrnDialogConfig</code>.



Expand All @@ -41,4 +42,3 @@ Thanks again to **leftcoding**, **jojinshallar**, **laiiihz**, **donywan**,

- First publish adapt flutter sdk 1.22.4


2 changes: 1 addition & 1 deletion README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ If you cannot access the demo, you can directly watch [Overview](https://github.
| ---------- | ---------------- |
| 1.0.0 | 1.22.4 |
| 2.0.0 | 2.2.2 |
| 2.1.0 | 2.2.2-null safety |
| 2.1.0-nullsafety.0 | 2.2.2 |

> Attention although we have adapted version 2.2.2, support for null-safe is in the works. We'll keep you updated on github as soon as possible, so stay tuned to 🙂.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
| ---------- | ---------------- |
| 1.0.0 | 1.22.4 |
| 2.0.0 | 2.2.2 |
| 2.1.0 | 2.2.2-null safety |
| 2.1.0-nullsafety.0 | 2.2.2 |



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class _SelectionViewExamplePageState
@override
void initState() {
_currentCalendarSelectedDate =
ValueNotifier(DateTimeFormatter.convertStringToDate(_dateForamt, _filterSelectedDate!));
ValueNotifier(DateTimeFormatter.convertStringToDate(_dateForamt, _filterSelectedDate));
super.initState();
}

Expand Down Expand Up @@ -118,7 +118,7 @@ class _SelectionViewExamplePageState

_currentCalendarSelectedDate = ValueNotifier(
DateTimeFormatter.convertStringToDate(
_dateForamt, _filterSelectedDate!));
_dateForamt, _filterSelectedDate));

var content = Column(children: [
Flexible(
Expand Down
4 changes: 2 additions & 2 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ dependencies:
flutter_easyrefresh: ^2.2.1
lpinyin: ^2.0.3
badges: ^2.0.2
intl: ^0.17.0

dev_dependencies:
flutter_test:
sdk: flutter

dependency_overrides:
intl: ^0.17.0

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

Expand Down
41 changes: 17 additions & 24 deletions lib/src/components/actionsheet/brn_common_action_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ enum BrnCommonActionSheetItemStyle {

class BrnCommonActionSheetItem {
/// 标题文字
String? title;
String title;

/// 辅助信息
String? desc;
Expand Down Expand Up @@ -232,31 +232,24 @@ class BrnCommonActionSheet extends StatelessWidget {
// action 每个item配置项 [BrnCommonActionSheetItem]
Widget _configTile(BrnCommonActionSheetItem action) {
List<Widget> tileElements = [];
bool hasTitle = false;
// 如果有标题则添加标题
if (action.title != null) {
tileElements.add(Center(
child: Text(
action.title!,
maxLines: 1,
style: action.titleStyle ??
(action.actionStyle == BrnCommonActionSheetItemStyle.alert
? this.themeData!.itemTitleStyleAlert.generateTextStyle()
: (action.actionStyle == BrnCommonActionSheetItemStyle.link
? this.themeData!.itemTitleStyleLink.generateTextStyle()
: this.themeData!.itemTitleStyle.generateTextStyle())),
),
));
hasTitle = true;
}
// 添加标题
tileElements.add(Center(
child: Text(
action.title,
maxLines: 1,
style: action.titleStyle ??
(action.actionStyle == BrnCommonActionSheetItemStyle.alert
? this.themeData!.itemTitleStyleAlert.generateTextStyle()
: (action.actionStyle == BrnCommonActionSheetItemStyle.link
? this.themeData!.itemTitleStyleLink.generateTextStyle()
: this.themeData!.itemTitleStyle.generateTextStyle())),
),
));
// 如果有辅助信息则添加辅助信息
if (action.desc != null) {
// 如果有标题添加间距
if (hasTitle) {
tileElements.add(SizedBox(
height: 2,
));
}
tileElements.add(SizedBox(
height: 2,
));
tileElements.add(
Center(
child: Text(
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: bruno
description: An enterprise-class package of Flutter components for mobile applications.
version: 2.1.0
version: 2.1.0-nullsafety.0
homepage: https://github.com/LianjiaTech/bruno

environment:
Expand Down

0 comments on commit fa6a233

Please sign in to comment.