diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b0d4c8e..a244b858 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,10 @@ -## [3.2.1] - 2023-2-1 +## [3.3.0] - 2023-2-1 ### Changed - fix the NullPointerException caused by not configuring BrnIntl [#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). diff --git a/example/lib/sample/components/selection/selectionview_customview_example_page.dart b/example/lib/sample/components/selection/selectionview_customview_example_page.dart index dda5e422..92f2c551 100644 --- a/example/lib/sample/components/selection/selectionview_customview_example_page.dart +++ b/example/lib/sample/components/selection/selectionview_customview_example_page.dart @@ -71,7 +71,7 @@ class _SelectionViewExamplePageState closeCustomFilterView(); } else { filterViewEntry = getCustomFilterView(); - Overlay.of(context)!.insert(filterViewEntry!); + Overlay.of(context).insert(filterViewEntry!); isCustomFilterViewShow = true; } _customHandleCallBack = customHandleCallBack; diff --git a/example/lib/sample/home/expandable_container_widget.dart b/example/lib/sample/home/expandable_container_widget.dart index 61c3dfb1..11899e3a 100644 --- a/example/lib/sample/home/expandable_container_widget.dart +++ b/example/lib/sample/home/expandable_container_widget.dart @@ -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(); @@ -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); diff --git a/lib/bruno.dart b/lib/bruno.dart index fa29cf7a..5f0b3a58 100644 --- a/lib/bruno.dart +++ b/lib/bruno.dart @@ -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'; @@ -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'; @@ -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'; @@ -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'; @@ -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'; diff --git a/lib/src/components/actionsheet/brn_common_action_sheet.dart b/lib/src/components/actionsheet/brn_common_action_sheet.dart index a07914ef..7e7d933c 100644 --- a/lib/src/components/actionsheet/brn_common_action_sheet.dart +++ b/lib/src/components/actionsheet/brn_common_action_sheet.dart @@ -41,7 +41,7 @@ class BrnCommonActionSheetItem { BrnCommonActionSheetItem( this.title, { this.desc, - this.actionStyle: BrnCommonActionSheetItemStyle.normal, + this.actionStyle = BrnCommonActionSheetItemStyle.normal, this.titleStyle, this.descStyle, }); diff --git a/lib/src/components/form/items/general/brn_title_select_input_item.dart b/lib/src/components/form/items/general/brn_title_select_input_item.dart index a115c38d..2c491f3d 100644 --- a/lib/src/components/form/items/general/brn_title_select_input_item.dart +++ b/lib/src/components/form/items/general/brn_title_select_input_item.dart @@ -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) { @@ -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 @@ -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), @@ -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, diff --git a/lib/src/components/form/items/group/brn_expandable_group.dart b/lib/src/components/form/items/group/brn_expandable_group.dart index ff0d4813..f16d90c6 100644 --- a/lib/src/components/form/items/group/brn_expandable_group.dart +++ b/lib/src/components/form/items/group/brn_expandable_group.dart @@ -110,7 +110,7 @@ class _BrnExpansionElementState extends State 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); @@ -149,7 +149,7 @@ class _BrnExpansionElementState extends State if (!mounted) return; }); } - PageStorage.of(context)?.writeState(context, _isExpanded); + PageStorage.of(context).writeState(context, _isExpanded); }); if (widget.onExpansionChanged != null) { widget.onExpansionChanged!(_isExpanded); diff --git a/lib/src/components/form/items/group/element_expand_widget.dart b/lib/src/components/form/items/group/element_expand_widget.dart index d63df83d..8016d198 100644 --- a/lib/src/components/form/items/group/element_expand_widget.dart +++ b/lib/src/components/form/items/group/element_expand_widget.dart @@ -118,7 +118,7 @@ class _ExpansionElementState extends State 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); @@ -163,7 +163,7 @@ class _ExpansionElementState extends State if (!mounted) return; }); } - PageStorage.of(context)?.writeState(context, _isExpanded); + PageStorage.of(context).writeState(context, _isExpanded); }); if (widget.onExpansionChanged != null) { widget.onExpansionChanged!(_isExpanded); diff --git a/lib/src/components/guide/brn_flutter_guide.dart b/lib/src/components/guide/brn_flutter_guide.dart index bcf0ce4d..d434f8f6 100644 --- a/lib/src/components/guide/brn_flutter_guide.dart +++ b/lib/src/components/guide/brn_flutter_guide.dart @@ -239,7 +239,7 @@ class BrnGuide { ); }, ); - Overlay.of(context)?.insert(_overlayEntry!); + Overlay.of(context).insert(_overlayEntry!); } void _onNext(BuildContext context) { diff --git a/lib/src/components/popup/brn_overlay_window.dart b/lib/src/components/popup/brn_overlay_window.dart index 6ba24fe1..92ea432c 100644 --- a/lib/src/components/popup/brn_overlay_window.dart +++ b/lib/src/components/popup/brn_overlay_window.dart @@ -249,7 +249,7 @@ class BrnOverlayController { showOverlay() { if (_entry != null) { - Overlay.of(context)?.insert(_entry!); + Overlay.of(context).insert(_entry!); _isOverlayShowing = true; } } diff --git a/lib/src/components/selection/widget/brn_selection_date_range_item_widget.dart b/lib/src/components/selection/widget/brn_selection_date_range_item_widget.dart index d76e181d..0bf39af9 100644 --- a/lib/src/components/selection/widget/brn_selection_date_range_item_widget.dart +++ b/lib/src/components/selection/widget/brn_selection_date_range_item_widget.dart @@ -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(); } diff --git a/lib/src/components/selection/widget/brn_selection_menu_widget.dart b/lib/src/components/selection/widget/brn_selection_menu_widget.dart index d7b67027..1b04450f 100644 --- a/lib/src/components/selection/widget/brn_selection_menu_widget.dart +++ b/lib/src/components/selection/widget/brn_selection_menu_widget.dart @@ -231,7 +231,7 @@ class _BrnSelectionMenuWidgetState extends State { 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); diff --git a/pubspec.yaml b/pubspec.yaml index 63dea0bb..ffa7394c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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: