Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/3.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoujuanjuan committed Feb 1, 2023
2 parents 0bd2f98 + 49e836e commit 505837c
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 30 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## [3.2.1] - 2023-2-1
## [3.3.0] - 2023-2-1

### Changed

- fix the NullPointerException caused by not configuring <code>BrnIntl</code> [#398](https://github.com/LianjiaTech/bruno/issues/398).
- optimize internal import references.
- adapt flutter sdk 3.7.0 to fix badge reference conflict [#406](https://github.com/LianjiaTech/bruno/issues/406).
- adapt flutter sdk 3.7.0 to fix badge reference conflict [#406](https://github.com/LianjiaTech/bruno/issues/406).



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class _SelectionViewExamplePageState
closeCustomFilterView();
} else {
filterViewEntry = getCustomFilterView();
Overlay.of(context)!.insert(filterViewEntry!);
Overlay.of(context).insert(filterViewEntry!);
isCustomFilterViewShow = true;
}
_customHandleCallBack = customHandleCallBack;
Expand Down
4 changes: 2 additions & 2 deletions example/lib/sample/home/expandable_container_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class _BrnExpansionContainerElementState
void initState() {
super.initState();
_isExpanded =
PageStorage.of(context)?.readState(context) ?? widget.initiallyExpanded;
PageStorage.of(context).readState(context) ?? widget.initiallyExpanded;

_expandableController =
widget.expandableController ?? BrnExpandableContainerController();
Expand Down Expand Up @@ -143,7 +143,7 @@ class _BrnExpansionContainerElementState
} else {
_animationController!.reverse();
}
PageStorage.of(context)?.writeState(context, _isExpanded);
PageStorage.of(context).writeState(context, _isExpanded);
});
if (widget.onExpansionChanged != null)
widget.onExpansionChanged!(_isExpanded);
Expand Down
9 changes: 1 addition & 8 deletions lib/bruno.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export 'src/components/selection/widget/brn_selection_animate_widget.dart';
//选择器
export 'src/components/picker/multi_range_picker/bean/brn_multi_column_picker_entity.dart';
export 'src/components/picker/multi_range_picker/brn_multi_column_picker.dart';
export 'src/components/picker/multi_select_bottom_picker/brn_multi_select_data.dart';
export 'src/components/picker/multi_select_bottom_picker/brn_multi_select_list_picker.dart';
export 'src/components/picker/brn_select_tags_with_input_picker.dart';
export 'src/components/picker/brn_bottom_picker.dart';
Expand All @@ -78,6 +77,7 @@ export 'src/components/tabbar/normal/brn_tab_bar.dart';
export 'src/components/tabbar/normal/brn_tabbar_controller.dart';
export 'src/components/tabbar/indicator/brn_fixed_underline_decoration.dart';
export 'src/components/tabbar/indicator/brn_triangle_decoration.dart';
export 'src/components/tabbar/indicator/brn_custom_width_indicator.dart';

//空页面
export 'src/components/empty/brn_empty_status.dart';
Expand All @@ -100,10 +100,6 @@ export 'src/components/selectcity/brn_select_city_model.dart';
//搜索
export 'src/components/sugsearch/brn_search_text.dart';

//tab
export 'src/components/tabbar/indicator/brn_custom_width_indicator.dart';
export 'src/components/tabbar/normal/brn_tab_bar.dart';

//标签
export 'src/components/tag/tagview/brn_select_tag.dart';
export 'src/components/tag/tagview/brn_delete_tag.dart';
Expand Down Expand Up @@ -172,7 +168,6 @@ export 'src/components/gallery/config/brn_controller.dart';
export 'src/components/input/brn_input_text.dart';
export 'src/components/calendar/brn_calendar_view.dart';
export 'src/components/button/brn_icon_button.dart';
export 'src/components/picker/brn_tags_picker_config.dart';

//新手引导
export 'src/components/guide/brn_flutter_guide.dart';
Expand Down Expand Up @@ -238,8 +233,6 @@ export 'src/components/card/bubble_card/brn_insert_info.dart';
export 'src/components/card/bubble_card/brn_bubble_text.dart';
export 'src/components/text/brn_expandable_text.dart';

export 'src/components/line/brn_line.dart';

//通知栏
export 'src/components/noticebar/brn_notice_bar.dart';
export 'src/components/noticebar/brn_notice_bar_with_button.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class BrnCommonActionSheetItem {
BrnCommonActionSheetItem(
this.title, {
this.desc,
this.actionStyle: BrnCommonActionSheetItemStyle.normal,
this.actionStyle = BrnCommonActionSheetItemStyle.normal,
this.titleStyle,
this.descStyle,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ class BrnTitleSelectInputFormItem extends StatefulWidget {
this.inputType = BrnInputType.text,
this.selectedIndex = -1,
this.inputFormatters,
this.autofocus: false,
this.autofocus = false,
this.onChanged,
this.onTitleSelected,
this.backgroundColor,
this.backgroundColor,
this.controller,
this.themeData})
: super(key: key) {
Expand All @@ -130,8 +130,9 @@ class BrnTitleSelectInputFormItem extends StatefulWidget {
.getConfig(configId: this.themeData!.configId)
.formItemConfig
.merge(this.themeData);
this.themeData = this.themeData!.merge(
BrnFormItemConfig(backgroundColor: backgroundColor));
this.themeData = this
.themeData!
.merge(BrnFormItemConfig(backgroundColor: backgroundColor));
}

@override
Expand Down Expand Up @@ -220,7 +221,7 @@ class BrnTitleSelectInputFormItemState
Offset? offset = trigle?.localToGlobal(Offset.zero);
final RenderBox button = context.findRenderObject() as RenderBox;
final RenderBox overlay =
Overlay.of(context)!.context.findRenderObject() as RenderBox;
Overlay.of(context).context.findRenderObject() as RenderBox;
final RelativeRect position = RelativeRect.fromRect(
Rect.fromPoints(
button.localToGlobal(Offset.zero, ancestor: overlay),
Expand Down Expand Up @@ -312,7 +313,8 @@ class BrnTitleSelectInputFormItemState
color: Color(0xFFCCCCCC),
fontSize: BrnFonts.f16,
textBaseline: TextBaseline.alphabetic),
hintText: widget.hint ?? BrnIntl.of(context).localizedResource.pleaseEnter,
hintText:
widget.hint ?? BrnIntl.of(context).localizedResource.pleaseEnter,
counterText: "",
contentPadding: EdgeInsets.all(0),
isDense: true,
Expand Down
4 changes: 2 additions & 2 deletions lib/src/components/form/items/group/brn_expandable_group.dart
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class _BrnExpansionElementState extends State<BrnExpandableGroup>
void initState() {
super.initState();
_isExpanded =
PageStorage.of(context)?.readState(context) ?? widget.initiallyExpanded;
PageStorage.of(context).readState(context) ?? widget.initiallyExpanded;

_controller = AnimationController(
duration: Duration(milliseconds: 200) /*_kExpand*/, vsync: this);
Expand Down Expand Up @@ -149,7 +149,7 @@ class _BrnExpansionElementState extends State<BrnExpandableGroup>
if (!mounted) return;
});
}
PageStorage.of(context)?.writeState(context, _isExpanded);
PageStorage.of(context).writeState(context, _isExpanded);
});
if (widget.onExpansionChanged != null) {
widget.onExpansionChanged!(_isExpanded);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class _ExpansionElementState extends State<ExpansionElementWidget>
void initState() {
super.initState();
_isExpanded =
PageStorage.of(context)?.readState(context) ?? widget.initiallyExpanded;
PageStorage.of(context).readState(context) ?? widget.initiallyExpanded;

_controller = AnimationController(
duration: Duration(milliseconds: 200) /*_kExpand*/, vsync: this);
Expand Down Expand Up @@ -163,7 +163,7 @@ class _ExpansionElementState extends State<ExpansionElementWidget>
if (!mounted) return;
});
}
PageStorage.of(context)?.writeState(context, _isExpanded);
PageStorage.of(context).writeState(context, _isExpanded);
});
if (widget.onExpansionChanged != null) {
widget.onExpansionChanged!(_isExpanded);
Expand Down
2 changes: 1 addition & 1 deletion lib/src/components/guide/brn_flutter_guide.dart
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ class BrnGuide {
);
},
);
Overlay.of(context)?.insert(_overlayEntry!);
Overlay.of(context).insert(_overlayEntry!);
}

void _onNext(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/components/popup/brn_overlay_window.dart
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ class BrnOverlayController {

showOverlay() {
if (_entry != null) {
Overlay.of(context)?.insert(_entry!);
Overlay.of(context).insert(_entry!);
_isOverlayShowing = true;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ class _BrnSelectionDateRangeItemWidgetState
},
);
OverlayEntry entry = _createDatePickerEntry(context, content);
Overlay.of(context)?.insert(entry);
Overlay.of(context).insert(entry);
_datePickerController.entry = entry;
_datePickerController.show();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ class _BrnSelectionMenuWidgetState extends State<BrnSelectionMenuWidget> {
BrnSelectionFilterType.customHandle) {
/// 创建 筛选组件的的入口
OverlayEntry entry = _createEntry(widget.data[index]);
Overlay.of(widget.context)?.insert(entry);
Overlay.of(widget.context).insert(entry);

listViewController.entry = entry;
listViewController.show(index);
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: bruno
description: An enterprise-class package of Flutter components for mobile applications.
version: 3.2.1
version: 3.3.0
homepage: https://github.com/LianjiaTech/bruno

environment:
sdk: '>=2.17.0 <3.0.0'
flutter: '>=3.3.0'
flutter: '>=3.7.0'

dependencies:
flutter:
Expand Down

0 comments on commit 505837c

Please sign in to comment.