diff --git a/analysis_options.yaml b/analysis_options.yaml index 80f2c75c..f7336c78 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,6 +1,15 @@ include: package:lints/core.yaml -# include: package:lints/recommended.yaml +#include: package:lints/recommended.yaml analyzer: exclude: - doc/** + errors: + deprecated_member_use_from_same_package: ignore + deprecated_member_use: ignore + unused_element: ignore + must_be_immutable: ignore + +linter: + rules: + non_constant_identifier_names: false diff --git a/example/lib/sample/components/tag/select_tag_example.dart b/example/lib/sample/components/tag/select_tag_example.dart index 38956798..2b8e5b77 100644 --- a/example/lib/sample/components/tag/select_tag_example.dart +++ b/example/lib/sample/components/tag/select_tag_example.dart @@ -1,5 +1,3 @@ - - import 'package:bruno/bruno.dart'; import 'package:flutter/material.dart'; @@ -150,7 +148,7 @@ class SelectTagExamplePageState extends State { ); } - double _getTagWidth(context, {int rowCount: 4}) { + double _getTagWidth(context, {int rowCount = 4}) { double leftRightPadding = 40; double rowSpace = 12; return (MediaQuery.of(context).size.width - diff --git a/example/lib/sample/home/home.dart b/example/lib/sample/home/home.dart index d74281a0..b9574e06 100644 --- a/example/lib/sample/home/home.dart +++ b/example/lib/sample/home/home.dart @@ -5,11 +5,9 @@ import 'package:example/sample/home/card_data_config.dart'; import 'package:example/sample/home/group_card.dart'; import 'package:flutter/material.dart'; -import '../l10n/l10n.dart'; import 'setting.dart'; /// 主页面 class HomePage extends StatelessWidget { - GlobalKey _moreKey = GlobalKey(); @override Widget build(BuildContext context) { diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 9ee2224b..1429a847 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -24,8 +24,7 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. - bruno: - path: ../ + flutter_easyrefresh: ^2.2.1 lpinyin: ^2.0.3 badges: ^2.0.2 @@ -34,6 +33,9 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter +dependency_overrides: + bruno: + path: ../ # For information on the generic Dart part of this file, see the diff --git a/lib/src/components/appraise/brn_appraise_config.dart b/lib/src/components/appraise/brn_appraise_config.dart index 7a416d5d..e985e23f 100644 --- a/lib/src/components/appraise/brn_appraise_config.dart +++ b/lib/src/components/appraise/brn_appraise_config.dart @@ -1,4 +1,3 @@ -import 'package:bruno/src/l10n/brn_intl.dart'; import 'package:flutter/material.dart'; import 'package:bruno/src/components/input/brn_input_text.dart'; import 'package:bruno/src/components/appraise/brn_appraise_interface.dart'; diff --git a/lib/src/components/charts/broken_line/brn_line_data.dart b/lib/src/components/charts/broken_line/brn_line_data.dart index 7086a97a..ab6fb388 100644 --- a/lib/src/components/charts/broken_line/brn_line_data.dart +++ b/lib/src/components/charts/broken_line/brn_line_data.dart @@ -14,7 +14,11 @@ class BrnDialItem { /// x,y 轴刻度值。用于刻度在坐标的真实定位 double value; - BrnDialItem({this.dialText, this.dialTextStyle, this.selectedDialTextStyle,required this.value}); + BrnDialItem( + {this.dialText, + this.dialTextStyle, + this.selectedDialTextStyle, + required this.value}); } class BrnPointData { @@ -44,7 +48,7 @@ class BrnPointData { this.offset = const Offset(0, 0), this.pointText, this.pointTextStyle, - this.isClickable: true, + this.isClickable = true, required this.lineTouchData}) { pointText ??= '$y'; pointTextStyle ??= TextStyle( @@ -72,7 +76,7 @@ class BrnLineTouchData { BrnLineTouchData({ required this.tipWindowSize, - this.tipOffset: const Offset(0, 0), + this.tipOffset = const Offset(0, 0), this.onTouch, }); } @@ -125,7 +129,7 @@ class BrnPointsLine { this.pointInnerColor, this.isCurve = false, required this.points, - this.isShowPoint: true, + this.isShowPoint = true, this.isShowPointText = false, this.shaderColors, this.lineColor = Colors.purple}) { diff --git a/lib/src/components/dialog/brn_middle_input_diaolg.dart b/lib/src/components/dialog/brn_middle_input_diaolg.dart index 6718d706..4e8382b8 100644 --- a/lib/src/components/dialog/brn_middle_input_diaolg.dart +++ b/lib/src/components/dialog/brn_middle_input_diaolg.dart @@ -59,7 +59,7 @@ class BrnMiddleInputDialog { /// 点击取消/确认按钮之后,是否自动关闭弹窗,默认为 true,关闭 BrnDialogConfig? themeData; - + /// 键盘类型 final TextInputType? keyboardType; @@ -70,7 +70,7 @@ class BrnMiddleInputDialog { this.keyboardType, this.maxLength = 20, this.maxLines, - this.minLines: 1, + this.minLines = 1, this.inputFocusNode, this.inputEditingController, this.inputFormatters, @@ -196,12 +196,13 @@ class BrnMiddleInputDialog { }); } - Alignment _getMessageAlign(TextAlign messageTextAlign) { - if(messageTextAlign == TextAlign.left || messageTextAlign == TextAlign.start) { + if (messageTextAlign == TextAlign.left || + messageTextAlign == TextAlign.start) { return Alignment.centerLeft; } - if(messageTextAlign == TextAlign.right || messageTextAlign == TextAlign.end) { + if (messageTextAlign == TextAlign.right || + messageTextAlign == TextAlign.end) { return Alignment.centerRight; } return Alignment.center; diff --git a/lib/src/components/dialog/brn_multi_select_dialog.dart b/lib/src/components/dialog/brn_multi_select_dialog.dart index 0cdd2481..b7e47393 100644 --- a/lib/src/components/dialog/brn_multi_select_dialog.dart +++ b/lib/src/components/dialog/brn_multi_select_dialog.dart @@ -22,7 +22,7 @@ class MultiSelectItem { /// 是否选中 bool isChecked; - MultiSelectItem(this.code, this.content, {this.isChecked: false}); + MultiSelectItem(this.code, this.content, {this.isChecked = false}); } /// 屏幕中间弹出多选列表弹框 diff --git a/lib/src/components/dialog/brn_single_select.dart b/lib/src/components/dialog/brn_single_select.dart index 6aab2cdd..2b7d8091 100644 --- a/lib/src/components/dialog/brn_single_select.dart +++ b/lib/src/components/dialog/brn_single_select.dart @@ -58,8 +58,8 @@ class BrnSingleSelectDialog extends Dialog { final VoidCallback? onCloseClick; const BrnSingleSelectDialog( - {this.isClose: true, - this.title: "", + {this.isClose = true, + this.title = "", this.messageText, this.messageWidget, required this.conditions, @@ -76,20 +76,21 @@ class BrnSingleSelectDialog extends Dialog { @override Widget build(BuildContext context) { return BrnSingleSelectDialogWidget( - isClose: isClose, - title: title, - messageText: messageText, - messageWidget: messageWidget, - conditions: conditions, - submitText: submitText ?? BrnIntl.of(context).localizedResource.submit, - onSubmitClick: onSubmitClick, - onItemClick: onItemClick, - submitBgColor: submitBgColor, - checkedItem: checkedItem, - customWidget: customWidget, - canDismissOnConfirmClick: canDismissOnConfirmClick, - isCustomFollowScroll: isCustomFollowScroll, - onCloseClick: onCloseClick,); + isClose: isClose, + title: title, + messageText: messageText, + messageWidget: messageWidget, + conditions: conditions, + submitText: submitText ?? BrnIntl.of(context).localizedResource.submit, + onSubmitClick: onSubmitClick, + onItemClick: onItemClick, + submitBgColor: submitBgColor, + checkedItem: checkedItem, + customWidget: customWidget, + canDismissOnConfirmClick: canDismissOnConfirmClick, + isCustomFollowScroll: isCustomFollowScroll, + onCloseClick: onCloseClick, + ); } } @@ -298,7 +299,6 @@ class BrnSingleSelectDialogWidgetState return const SizedBox.shrink(); } - Widget _buildItem(BuildContext context, int index) { if (widget.conditions == null) { return const SizedBox.shrink(); diff --git a/lib/src/components/empty/brn_empty_status.dart b/lib/src/components/empty/brn_empty_status.dart index 9defb005..a9f8678b 100644 --- a/lib/src/components/empty/brn_empty_status.dart +++ b/lib/src/components/empty/brn_empty_status.dart @@ -1,5 +1,4 @@ import 'package:bruno/src/constants/brn_asset_constants.dart'; -import 'package:bruno/src/constants/brn_strings_constants.dart'; import 'package:bruno/src/l10n/brn_intl.dart'; import 'package:bruno/src/theme/brn_theme_configurator.dart'; import 'package:bruno/src/theme/configs/brn_abnormal_state_config.dart'; @@ -32,21 +31,24 @@ class BrnAbnormalStateUtils { return BrnAbnormalStateWidget( img: img ?? BrunoTools.getAssetImage(BrnAsset.noData), title: BrnIntl.of(context).localizedResource.fetchErrorAndRetry, - operateTexts: [BrnIntl.of(context).localizedResource.clickPageAndRetry], + operateTexts: [ + BrnIntl.of(context).localizedResource.clickPageAndRetry + ], action: action, ); } else if (AbnormalState.networkConnectError == status) { return BrnAbnormalStateWidget( img: img ?? BrunoTools.getAssetImage(BrnAsset.networkError), title: BrnIntl.of(context).localizedResource.netErrorAndRetryLater, - operateTexts: [BrnIntl.of(context).localizedResource.clickPageAndRetry], + operateTexts: [ + BrnIntl.of(context).localizedResource.clickPageAndRetry + ], action: action, ); } else if (AbnormalState.noData == status) { return BrnAbnormalStateWidget( - img: img ?? BrunoTools.getAssetImage(BrnAsset.noData), - title: BrnIntl.of(context).localizedResource.noDataTip - ); + img: img ?? BrunoTools.getAssetImage(BrnAsset.noData), + title: BrnIntl.of(context).localizedResource.noDataTip); } else { return const SizedBox.shrink(); } @@ -116,14 +118,14 @@ class BrnAbnormalStateWidget extends StatelessWidget { this.img, this.title, this.content, - this.operateAreaType: OperateAreaType.textButton, + this.operateAreaType = OperateAreaType.textButton, this.operateTexts, this.action, - this.enablePageTap: false, + this.enablePageTap = false, this.topOffset, - this.bgColor: Colors.white, + this.bgColor = Colors.white, this.isCenterVertical = false, - this.topPercent: 0.08, + this.topPercent = 0.08, this.themeData, }) { this.themeData ??= BrnAbnormalStateConfig(); diff --git a/lib/src/components/form/items/general/brn_quick_select_input_item.dart b/lib/src/components/form/items/general/brn_quick_select_input_item.dart index 99249f68..5de7d837 100644 --- a/lib/src/components/form/items/general/brn_quick_select_input_item.dart +++ b/lib/src/components/form/items/general/brn_quick_select_input_item.dart @@ -1,5 +1,3 @@ - - import 'package:bruno/src/components/form/base/brn_form_item_type.dart'; import 'package:bruno/src/components/form/utils/brn_form_util.dart'; import 'package:bruno/src/l10n/brn_intl.dart'; @@ -92,13 +90,13 @@ class BrnTextQuickSelectFormItem extends StatefulWidget { BrnTextQuickSelectFormItem( {Key? key, this.label, - this.title: "", + this.title = "", this.subTitle, this.tipLabel, - this.prefixIconType: BrnPrefixIconType.normal, - this.error: "", - this.isEdit: true, - this.isRequire: false, + this.prefixIconType = BrnPrefixIconType.normal, + this.error = "", + this.isEdit = true, + this.isRequire = false, this.onAddTap, this.onRemoveTap, this.onTip, @@ -108,7 +106,7 @@ class BrnTextQuickSelectFormItem extends StatefulWidget { this.selectBtnList, this.enableBtnList, this.btns, - this.isBtnsScroll: false, + this.isBtnsScroll = false, this.onTap, this.onBtnSelectChanged, this.backgroundColor, @@ -119,8 +117,9 @@ class BrnTextQuickSelectFormItem extends StatefulWidget { .getConfig(configId: themeData!.configId) .formItemConfig .merge(themeData); - this.themeData = this.themeData!.merge( - BrnFormItemConfig(backgroundColor: backgroundColor)); + this.themeData = this + .themeData! + .merge(BrnFormItemConfig(backgroundColor: backgroundColor)); } @override diff --git a/lib/src/components/form/items/general/brn_radio_input_item.dart b/lib/src/components/form/items/general/brn_radio_input_item.dart index 1294bb39..5ce2a658 100644 --- a/lib/src/components/form/items/general/brn_radio_input_item.dart +++ b/lib/src/components/form/items/general/brn_radio_input_item.dart @@ -1,5 +1,3 @@ - - import 'dart:math'; import 'package:bruno/src/components/form/base/brn_form_item_type.dart'; @@ -89,13 +87,13 @@ class BrnRadioInputFormItem extends StatefulWidget { BrnRadioInputFormItem({ Key? key, this.label, - this.title: "", + this.title = "", this.subTitle, this.tipLabel, - this.prefixIconType: BrnPrefixIconType.normal, - this.error: "", - this.isEdit: true, - this.isRequire: false, + this.prefixIconType = BrnPrefixIconType.normal, + this.error = "", + this.isEdit = true, + this.isRequire = false, this.onAddTap, this.onRemoveTap, this.onTip, @@ -112,21 +110,22 @@ class BrnRadioInputFormItem 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)); this._isAutoLayout = false; } BrnRadioInputFormItem.autoLayout({ Key? key, this.label, - this.title: "", + this.title = "", this.subTitle, this.tipLabel, - this.prefixIconType: BrnPrefixIconType.normal, - this.error: "", - this.isEdit: true, - this.isRequire: false, + this.prefixIconType = BrnPrefixIconType.normal, + this.error = "", + this.isEdit = true, + this.isRequire = false, this.onAddTap, this.onRemoveTap, this.onTip, @@ -145,8 +144,9 @@ class BrnRadioInputFormItem 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 diff --git a/lib/src/components/form/items/general/brn_radio_portrait_input_item.dart b/lib/src/components/form/items/general/brn_radio_portrait_input_item.dart index 9bc71096..90435798 100644 --- a/lib/src/components/form/items/general/brn_radio_portrait_input_item.dart +++ b/lib/src/components/form/items/general/brn_radio_portrait_input_item.dart @@ -75,13 +75,13 @@ class BrnRadioPortraitInputFormItem extends StatefulWidget { BrnRadioPortraitInputFormItem( {Key? key, this.label, - this.title: "", + this.title = "", this.subTitle, this.tipLabel, - this.prefixIconType: BrnPrefixIconType.normal, - this.error: "", - this.isEdit: true, - this.isRequire: false, + this.prefixIconType = BrnPrefixIconType.normal, + this.error = "", + this.isEdit = true, + this.isRequire = false, this.onAddTap, this.onRemoveTap, this.onTip, @@ -97,8 +97,9 @@ class BrnRadioPortraitInputFormItem 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 diff --git a/lib/src/components/form/items/general/brn_range_input_item.dart b/lib/src/components/form/items/general/brn_range_input_item.dart index 15fa1fa5..2c407381 100644 --- a/lib/src/components/form/items/general/brn_range_input_item.dart +++ b/lib/src/components/form/items/general/brn_range_input_item.dart @@ -1,5 +1,3 @@ - - import 'package:bruno/src/components/form/base/brn_form_item_type.dart'; import 'package:bruno/src/components/form/utils/brn_form_util.dart'; import 'package:bruno/src/l10n/brn_intl.dart'; @@ -103,14 +101,14 @@ class BrnRangeInputFormItem extends StatefulWidget { BrnRangeInputFormItem( {Key? key, this.label, - this.title: "", + this.title = "", this.subTitle, this.tipLabel, - this.prefixIconType: BrnPrefixIconType.normal, - this.error: "", - this.isEdit: true, - this.isRequire: false, - this.isPrefixIconEnabled: false, + this.prefixIconType = BrnPrefixIconType.normal, + this.error = "", + this.isEdit = true, + this.isRequire = false, + this.isPrefixIconEnabled = false, this.onAddTap, this.onRemoveTap, this.onTip, @@ -135,8 +133,9 @@ class BrnRangeInputFormItem 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 @@ -213,7 +212,8 @@ class BrnRangeInputFormItemState extends State { border: InputBorder.none, hintStyle: BrnFormUtil.getHintTextStyle(widget.themeData!), - hintText: widget.hintMin ?? BrnIntl.of(context).localizedResource.min, + hintText: widget.hintMin ?? + BrnIntl.of(context).localizedResource.min, counterText: "", contentPadding: EdgeInsets.all(0), isDense: true, @@ -268,7 +268,8 @@ class BrnRangeInputFormItemState extends State { border: InputBorder.none, hintStyle: BrnFormUtil.getHintTextStyle(widget.themeData!), - hintText: widget.hintMax ?? BrnIntl.of(context).localizedResource.max, + hintText: widget.hintMax ?? + BrnIntl.of(context).localizedResource.max, counterText: "", contentPadding: EdgeInsets.all(0), isDense: true, diff --git a/lib/src/components/form/items/general/brn_ratio_input_item.dart b/lib/src/components/form/items/general/brn_ratio_input_item.dart index e166748a..49b35265 100644 --- a/lib/src/components/form/items/general/brn_ratio_input_item.dart +++ b/lib/src/components/form/items/general/brn_ratio_input_item.dart @@ -1,5 +1,3 @@ - - import 'package:bruno/src/components/form/base/brn_form_item_type.dart'; import 'package:bruno/src/components/form/utils/brn_form_util.dart'; import 'package:bruno/src/l10n/brn_intl.dart'; @@ -81,14 +79,14 @@ class BrnRatioInputFormItem extends StatefulWidget { BrnRatioInputFormItem( {Key? key, this.label, - this.title: "", + this.title = "", this.subTitle, this.tipLabel, - this.prefixIconType: BrnPrefixIconType.normal, - this.error: "", - this.isEdit: true, - this.isRequire: false, - this.isPrefixIconEnabled: false, + this.prefixIconType = BrnPrefixIconType.normal, + this.error = "", + this.isEdit = true, + this.isRequire = false, + this.isPrefixIconEnabled = false, this.onAddTap, this.onRemoveTap, this.onTip, @@ -105,8 +103,9 @@ class BrnRatioInputFormItem 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 @@ -181,7 +180,8 @@ class BrnRatioInputFormItemState extends State { border: InputBorder.none, hintStyle: BrnFormUtil.getHintTextStyle(widget.themeData!), - 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/general/brn_star_input_item.dart b/lib/src/components/form/items/general/brn_star_input_item.dart index 826ab367..bd9a3ecd 100644 --- a/lib/src/components/form/items/general/brn_star_input_item.dart +++ b/lib/src/components/form/items/general/brn_star_input_item.dart @@ -1,5 +1,3 @@ - - import 'package:bruno/src/components/form/base/brn_form_item_type.dart'; import 'package:bruno/src/components/form/base/input_item_interface.dart'; import 'package:bruno/src/components/form/utils/brn_form_util.dart'; @@ -75,18 +73,18 @@ class BrnStarsFormItem extends StatefulWidget { BrnStarsFormItem( {Key? key, this.label, - this.title: "", + this.title = "", this.subTitle, this.tipLabel, - this.prefixIconType: BrnPrefixIconType.normal, - this.error: "", - this.isEdit: true, - this.isRequire: false, + this.prefixIconType = BrnPrefixIconType.normal, + this.error = "", + this.isEdit = true, + this.isRequire = false, this.onAddTap, this.onRemoveTap, this.onTip, - this.sumStar: 5, - this.value: 0, + this.sumStar = 5, + this.value = 0, this.onChanged, this.backgroundColor, this.themeData}) @@ -96,8 +94,9 @@ class BrnStarsFormItem 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 diff --git a/lib/src/components/form/items/general/brn_text_block_input_item.dart b/lib/src/components/form/items/general/brn_text_block_input_item.dart index c77093e7..d6707ffa 100644 --- a/lib/src/components/form/items/general/brn_text_block_input_item.dart +++ b/lib/src/components/form/items/general/brn_text_block_input_item.dart @@ -107,7 +107,7 @@ class BrnTextBlockInputFormItem extends StatefulWidget { this.onChanged, this.hint, this.maxCharCount, - this.autofocus: false, + this.autofocus = false, this.inputType, this.inputFormatters, this.controller, @@ -121,8 +121,9 @@ class BrnTextBlockInputFormItem 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 @@ -200,7 +201,8 @@ class BrnTextBlockInputFormItemState extends State { widget.themeData!, widget.isEdit), inputFormatters: widget.inputFormatters, decoration: InputDecoration( - hintText: widget.hint ?? BrnIntl.of(context).localizedResource.pleaseEnter, + hintText: widget.hint ?? + BrnIntl.of(context).localizedResource.pleaseEnter, hintStyle: BrnFormUtil.getHintTextStyle(widget.themeData!), contentPadding: EdgeInsets.all(0), border: InputBorder.none, diff --git a/lib/src/components/form/items/general/brn_text_input_item.dart b/lib/src/components/form/items/general/brn_text_input_item.dart index a02e9f0a..b17d790b 100644 --- a/lib/src/components/form/items/general/brn_text_input_item.dart +++ b/lib/src/components/form/items/general/brn_text_input_item.dart @@ -120,7 +120,7 @@ class BrnTextInputFormItem extends StatefulWidget { this.hint, this.unit, this.maxCharCount, - this.autofocus: false, + this.autofocus= false, this.inputType, this.inputFormatters, this.onChanged, diff --git a/lib/src/components/form/items/general/brn_text_select_item.dart b/lib/src/components/form/items/general/brn_text_select_item.dart index 7c19b64a..940d2ea9 100644 --- a/lib/src/components/form/items/general/brn_text_select_item.dart +++ b/lib/src/components/form/items/general/brn_text_select_item.dart @@ -1,5 +1,3 @@ - - import 'dart:math'; import 'package:bruno/src/components/form/base/brn_form_item_type.dart'; @@ -92,13 +90,13 @@ class BrnTextSelectFormItem extends StatefulWidget { BrnTextSelectFormItem({ Key? key, this.label, - this.title: "", + this.title = "", this.subTitle, this.tipLabel, - this.prefixIconType: BrnPrefixIconType.normal, - this.error: "", - this.isEdit: true, - this.isRequire: false, + this.prefixIconType = BrnPrefixIconType.normal, + this.error = "", + this.isEdit = true, + this.isRequire = false, this.onAddTap, this.onRemoveTap, this.onTip, @@ -116,20 +114,21 @@ class BrnTextSelectFormItem 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)); } BrnTextSelectFormItem.autoLayout( {Key? key, this.label, - this.title: "", + this.title = "", this.subTitle, this.tipLabel, - this.prefixIconType: BrnPrefixIconType.normal, - this.error: "", - this.isEdit: true, - this.isRequire: false, + this.prefixIconType = BrnPrefixIconType.normal, + this.error = "", + this.isEdit = true, + this.isRequire = false, this.onAddTap, this.onRemoveTap, this.onTip, @@ -148,8 +147,9 @@ class BrnTextSelectFormItem 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 @@ -211,8 +211,8 @@ class BrnTextSelectFormItemState extends State { children: [ Flexible( child: Container( - padding: BrnFormUtil.titleEdgeInsets(widget.prefixIconType, - widget.isRequire, widget.themeData!), + padding: BrnFormUtil.titleEdgeInsets( + widget.prefixIconType, widget.isRequire, widget.themeData!), child: Row( children: [ BrnFormUtil.buildPrefixIcon( @@ -327,8 +327,8 @@ class BrnTextSelectFormItemState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( - padding: BrnFormUtil.titleEdgeInsets(widget.prefixIconType, - widget.isRequire, widget.themeData!), + padding: BrnFormUtil.titleEdgeInsets( + widget.prefixIconType, widget.isRequire, widget.themeData!), child: Row( children: [ BrnFormUtil.buildPrefixIcon(widget.prefixIconType, widget.isEdit, @@ -370,7 +370,8 @@ class BrnTextSelectFormItemState extends State { textDirection: TextDirection.ltr, strutStyle: _contentStructStyle, text: TextSpan( - text: widget.hint ?? BrnIntl.of(context).localizedResource.pleaseChoose, + text: widget.hint ?? + BrnIntl.of(context).localizedResource.pleaseChoose, style: BrnFormUtil.getHintTextStyle(widget.themeData!, height: 1), )); } diff --git a/lib/src/components/form/items/misc/brn_general_item.dart b/lib/src/components/form/items/misc/brn_general_item.dart index d2874b6b..1390611d 100644 --- a/lib/src/components/form/items/misc/brn_general_item.dart +++ b/lib/src/components/form/items/misc/brn_general_item.dart @@ -4,8 +4,7 @@ import 'package:bruno/src/theme/brn_theme.dart'; import 'package:flutter/material.dart'; // ignore: must_be_immutable -class BrnGeneralFormItem extends StatefulWidget{ - +class BrnGeneralFormItem extends StatefulWidget { /// 录入项的唯一标识,主要用于录入类型页面框架中 final String? label; @@ -64,43 +63,41 @@ class BrnGeneralFormItem extends StatefulWidget{ BrnGeneralFormItem({ Key? key, this.label, - this.title: "", + this.title = "", this.titleWidget, this.subTitle, this.subTitleWidget, this.tipLabel, this.prefixIconType = BrnPrefixIconType.normal, - this.error: "", - this.isEdit: true, - this.isRequire: false, + this.error = "", + this.isEdit = true, + this.isRequire = false, this.operateWidget, this.onAddTap, this.onRemoveTap, this.onTip, this.backgroundColor, this.themeData, - }): super(key: key){ + }) : super(key: key) { this.themeData ??= BrnFormItemConfig(); this.themeData = BrnThemeConfigurator.instance .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 State createState() { return BrnGeneralFormItemState(); } - } class BrnGeneralFormItemState extends State { - @override Widget build(BuildContext context) { - return Container( color: widget.themeData!.backgroundColor, padding: BrnFormUtil.itemEdgeInsets(widget.themeData!), @@ -111,51 +108,53 @@ class BrnGeneralFormItemState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Container( - padding: BrnFormUtil.titleEdgeInsets(widget.prefixIconType, - widget.isRequire, widget.themeData!), + padding: BrnFormUtil.titleEdgeInsets( + widget.prefixIconType, widget.isRequire, widget.themeData!), child: Row( children: [ - Offstage( - offstage: widget.prefixIconType == BrnPrefixIconType.normal, + offstage: + widget.prefixIconType == BrnPrefixIconType.normal, child: Container( padding: EdgeInsets.only(right: 6), child: GestureDetector( onTap: () { - - if ( !widget.isEdit) { + if (!widget.isEdit) { return; } - if (BrnPrefixIconType.add == widget.prefixIconType) { + if (BrnPrefixIconType.add == + widget.prefixIconType) { if (widget.onAddTap != null) { widget.onAddTap!(); } - } else if (BrnPrefixIconType.remove == widget.prefixIconType) { + } else if (BrnPrefixIconType.remove == + widget.prefixIconType) { if (widget.onRemoveTap != null) { widget.onRemoveTap!(); } } - }, - child: BrnFormUtil.getPrefixIcon(widget.prefixIconType), + child: + BrnFormUtil.getPrefixIcon(widget.prefixIconType), ), ), ), - Offstage( offstage: (!widget.isRequire), child: BrnFormUtil.getRequireIcon(widget.isRequire), ), Container( - child: widget.titleWidget ?? Text(widget.title, style: BrnFormUtil.getTitleTextStyle(widget.themeData!),) - ), - + child: widget.titleWidget ?? + Text( + widget.title, + style: BrnFormUtil.getTitleTextStyle( + widget.themeData!), + )), Offstage( offstage: (widget.tipLabel == null), child: GestureDetector( onTap: () { - if (widget.onTip != null) { widget.onTip!(); } @@ -164,59 +163,50 @@ class BrnGeneralFormItemState extends State { mainAxisAlignment: MainAxisAlignment.start, children: [ Container( - padding: EdgeInsets.only(left:6, right: 7), - child: BrnFormUtil.getQuestionMarkIcon() - ), - + padding: EdgeInsets.only(left: 6, right: 7), + child: BrnFormUtil.getQuestionMarkIcon()), Container( - child: Text(widget.tipLabel ?? "", style: BrnFormUtil.getTipsTextStyle(widget.themeData!),), + child: Text( + widget.tipLabel ?? "", + style: BrnFormUtil.getTipsTextStyle( + widget.themeData!), + ), ), ], ), ), ), - ], ), ), - - Container( child: widget.operateWidget ?? const SizedBox.shrink(), ), - ], ), - Offstage( - offstage: ((widget.subTitleWidget == null) && (widget.subTitle == null || widget.subTitle!.isEmpty)), + offstage: ((widget.subTitleWidget == null) && + (widget.subTitle == null || widget.subTitle!.isEmpty)), child: Container( padding: BrnFormUtil.subTitleEdgeInsets(widget.themeData!), - child: widget.subTitleWidget ?? Text(widget.subTitle ?? "", style: BrnFormUtil.getSubTitleTextStyle(widget.themeData!),)), + child: widget.subTitleWidget ?? + Text( + widget.subTitle ?? "", + style: + BrnFormUtil.getSubTitleTextStyle(widget.themeData!), + )), ), - Offstage( offstage: (widget.error.isEmpty), child: Container( - padding: BrnFormUtil.computeErrorEdgeInsets(widget.prefixIconType, widget.isRequire), - child: Text(widget.error, style: BrnFormUtil.getErrorTextStyle(widget.themeData!),)) - ) + padding: BrnFormUtil.computeErrorEdgeInsets( + widget.prefixIconType, widget.isRequire), + child: Text( + widget.error, + style: BrnFormUtil.getErrorTextStyle(widget.themeData!), + ))) ], ), - ); - - } - - } - - - - - - - - - diff --git a/lib/src/components/noticebar/brn_marquee_text.dart b/lib/src/components/noticebar/brn_marquee_text.dart index 674f56d6..758830ff 100644 --- a/lib/src/components/noticebar/brn_marquee_text.dart +++ b/lib/src/components/noticebar/brn_marquee_text.dart @@ -28,12 +28,12 @@ class BrnMarqueeText extends StatefulWidget { BrnMarqueeText({ required this.text, - this.width: 0, - this.height: 0, - this.timerRest: 100, + this.width = 0, + this.height = 0, + this.timerRest = 100, this.textStyle, - this.scrollAxis: Axis.horizontal, - this.ratioOfBlankToScreen: 0.25, + this.scrollAxis = Axis.horizontal, + this.ratioOfBlankToScreen = 0.25, }); @override diff --git a/lib/src/components/picker/base/brn_picker_title.dart b/lib/src/components/picker/base/brn_picker_title.dart index e891af4b..787457b8 100755 --- a/lib/src/components/picker/base/brn_picker_title.dart +++ b/lib/src/components/picker/base/brn_picker_title.dart @@ -4,7 +4,6 @@ import 'package:bruno/src/components/picker/time_picker/brn_date_picker_constant import 'package:bruno/src/components/picker/base/brn_picker_title_config.dart'; import 'package:bruno/src/l10n/brn_intl.dart'; import 'package:bruno/src/theme/brn_theme.dart'; -import 'package:bruno/src/utils/i18n/brn_date_picker_i18n.dart'; import 'package:flutter/material.dart'; /// DatePicker's title widget. diff --git a/lib/src/components/picker/base/brn_picker_title_config.dart b/lib/src/components/picker/base/brn_picker_title_config.dart index bdd12b30..38daed1c 100755 --- a/lib/src/components/picker/base/brn_picker_title_config.dart +++ b/lib/src/components/picker/base/brn_picker_title_config.dart @@ -3,7 +3,6 @@ import 'package:flutter/material.dart'; import 'package:bruno/src/components/picker/base/brn_picker_constants.dart'; class BrnPickerTitleConfig { - /// DateTimePicker theme. /// /// [cancel] Custom cancel widget. @@ -15,7 +14,7 @@ class BrnPickerTitleConfig { this.cancel, this.confirm, this.title, - this.showTitle: pickerShowTitleDefault, + this.showTitle = pickerShowTitleDefault, this.titleContent, }); diff --git a/lib/src/components/picker/brn_multi_picker.dart b/lib/src/components/picker/brn_multi_picker.dart index eed332bc..6a665f7c 100644 --- a/lib/src/components/picker/brn_multi_picker.dart +++ b/lib/src/components/picker/brn_multi_picker.dart @@ -378,7 +378,6 @@ class _MyPickerState extends State { ///默认的选择轮盘滚动行为,Android去除默认的水波纹动画效果 class _DefaultScrollBehavior extends ScrollBehavior { - @override Widget buildViewportChrome(BuildContext context, Widget child, AxisDirection axisDirection) { return child; } diff --git a/lib/src/components/picker/multi_select_bottom_picker/brn_multi_select_data.dart b/lib/src/components/picker/multi_select_bottom_picker/brn_multi_select_data.dart index a48143db..6748fa66 100644 --- a/lib/src/components/picker/multi_select_bottom_picker/brn_multi_select_data.dart +++ b/lib/src/components/picker/multi_select_bottom_picker/brn_multi_select_data.dart @@ -1,5 +1,3 @@ - - class BrnMultiSelectBottomPickerItem { String code; //选项编号 @@ -8,5 +6,5 @@ class BrnMultiSelectBottomPickerItem { bool isChecked; //是否选中 BrnMultiSelectBottomPickerItem(this.code, this.content, - {this.isChecked: false}); + {this.isChecked = false}); } diff --git a/lib/src/components/picker/time_picker/brn_date_time_formatter.dart b/lib/src/components/picker/time_picker/brn_date_time_formatter.dart index 8ad665c4..74f7f149 100755 --- a/lib/src/components/picker/time_picker/brn_date_time_formatter.dart +++ b/lib/src/components/picker/time_picker/brn_date_time_formatter.dart @@ -5,7 +5,6 @@ import 'package:bruno/src/components/picker/time_picker/date_picker/brn_date_pic import 'package:bruno/src/components/picker/time_picker/date_range_picker/brn_date_range_picker.dart'; import 'package:bruno/src/l10n/brn_intl.dart'; import 'package:bruno/src/utils/brn_tools.dart'; -import 'package:bruno/src/utils/i18n/brn_date_picker_i18n.dart'; import 'package:intl/intl.dart'; const String DATE_FORMAT_SEPARATOR = r'[|,-\._: ]+'; diff --git a/lib/src/components/picker/time_picker/date_picker/brn_date_picker.dart b/lib/src/components/picker/time_picker/date_picker/brn_date_picker.dart index e0d1a47b..6686f87a 100755 --- a/lib/src/components/picker/time_picker/date_picker/brn_date_picker.dart +++ b/lib/src/components/picker/time_picker/date_picker/brn_date_picker.dart @@ -38,7 +38,6 @@ class BrnDatePicker { /// onConfirm: [DateValueCallback] pressed title confirm widget event static void showDatePicker( BuildContext context, { - /// If rootNavigator is set to true, the state from the furthest instance of this class is given instead. /// Useful for pushing contents above all subsequent instances of [Navigator]. bool rootNavigator = false, @@ -59,7 +58,7 @@ class BrnDatePicker { String? dateFormat, /// 分钟间切换的差值 - int minuteDivider: 1, + int minuteDivider = 1, /// 时间选择组件显示的时间类型 BrnDateTimePickerMode pickerMode = BrnDateTimePickerMode.date, diff --git a/lib/src/components/picker/time_picker/date_picker/brn_date_widget.dart b/lib/src/components/picker/time_picker/date_picker/brn_date_widget.dart index 25248afa..004c3674 100755 --- a/lib/src/components/picker/time_picker/date_picker/brn_date_widget.dart +++ b/lib/src/components/picker/time_picker/date_picker/brn_date_widget.dart @@ -8,7 +8,6 @@ import 'package:bruno/src/components/picker/base/brn_picker_title_config.dart'; import 'package:bruno/src/components/picker/time_picker/brn_date_picker_constants.dart'; import 'package:bruno/src/components/picker/time_picker/brn_date_time_formatter.dart'; import 'package:bruno/src/theme/brn_theme.dart'; -import 'package:bruno/src/utils/i18n/brn_date_picker_i18n.dart'; import 'package:flutter/material.dart'; enum ColumnType { year, month, day } diff --git a/lib/src/components/picker/time_picker/date_picker/brn_datetime_widget.dart b/lib/src/components/picker/time_picker/date_picker/brn_datetime_widget.dart index 4663d4cf..11a1e3fa 100755 --- a/lib/src/components/picker/time_picker/date_picker/brn_datetime_widget.dart +++ b/lib/src/components/picker/time_picker/date_picker/brn_datetime_widget.dart @@ -1,5 +1,3 @@ - - import 'dart:math'; import 'package:bruno/src/components/picker/base/brn_picker.dart'; @@ -8,7 +6,6 @@ import 'package:bruno/src/components/picker/base/brn_picker_title_config.dart'; import 'package:bruno/src/components/picker/time_picker/brn_date_picker_constants.dart'; import 'package:bruno/src/components/picker/time_picker/brn_date_time_formatter.dart'; import 'package:bruno/src/theme/brn_theme.dart'; -import 'package:bruno/src/utils/i18n/brn_date_picker_i18n.dart'; import 'package:flutter/material.dart'; enum ColumnType { year, month, day, hour, minute, second } @@ -21,8 +18,8 @@ class BrnDateTimeWidget extends StatefulWidget { this.minDateTime, this.maxDateTime, this.initDateTime, - this.dateFormat: datetimePickerTimeFormat, - this.pickerTitleConfig: BrnPickerTitleConfig.Default, + this.dateFormat = datetimePickerTimeFormat, + this.pickerTitleConfig = BrnPickerTitleConfig.Default, this.onCancel, this.onChange, this.onConfirm, @@ -469,8 +466,7 @@ class _BrnDateTimeWidgetState extends State { return Container( height: widget.themeData!.itemHeight, alignment: Alignment.center, - child: Text( - DateTimeFormatter.formatDateTime(value, format), + child: Text(DateTimeFormatter.formatDateTime(value, format), style: textStyle), ); } diff --git a/lib/src/components/picker/time_picker/date_picker/brn_time_widget.dart b/lib/src/components/picker/time_picker/date_picker/brn_time_widget.dart index f1f2cc6d..f7eee310 100755 --- a/lib/src/components/picker/time_picker/date_picker/brn_time_widget.dart +++ b/lib/src/components/picker/time_picker/date_picker/brn_time_widget.dart @@ -1,5 +1,3 @@ - - import 'dart:math'; import 'package:bruno/src/components/picker/base/brn_picker.dart'; @@ -8,7 +6,6 @@ import 'package:bruno/src/components/picker/base/brn_picker_title_config.dart'; import 'package:bruno/src/components/picker/time_picker/brn_date_picker_constants.dart'; import 'package:bruno/src/components/picker/time_picker/brn_date_time_formatter.dart'; import 'package:bruno/src/theme/brn_theme.dart'; -import 'package:bruno/src/utils/i18n/brn_date_picker_i18n.dart'; import 'package:flutter/material.dart'; /// TimePicker widget. @@ -22,8 +19,8 @@ class BrnTimeWidget extends StatefulWidget { this.minDateTime, this.maxDateTime, this.initDateTime, - this.dateFormat: datetimePickerTimeFormat, - this.pickerTitleConfig: BrnPickerTitleConfig.Default, + this.dateFormat = datetimePickerTimeFormat, + this.pickerTitleConfig = BrnPickerTitleConfig.Default, this.minuteDivider = 1, this.onCancel, this.onChange, @@ -297,8 +294,7 @@ class _BrnTimeWidgetState extends State { return Container( height: widget.themeData!.itemHeight, alignment: Alignment.center, - child: Text( - DateTimeFormatter.formatDateTime(value, format), + child: Text(DateTimeFormatter.formatDateTime(value, format), style: textStyle), ); } diff --git a/lib/src/components/picker/time_picker/date_range_picker/brn_date_range_side_widget.dart b/lib/src/components/picker/time_picker/date_range_picker/brn_date_range_side_widget.dart index 8b19b21c..2aa89ef3 100755 --- a/lib/src/components/picker/time_picker/date_range_picker/brn_date_range_side_widget.dart +++ b/lib/src/components/picker/time_picker/date_range_picker/brn_date_range_side_widget.dart @@ -4,7 +4,6 @@ import 'package:bruno/src/components/picker/base/brn_picker.dart'; import 'package:bruno/src/components/picker/time_picker/brn_date_picker_constants.dart'; import 'package:bruno/src/components/picker/time_picker/brn_date_time_formatter.dart'; import 'package:bruno/src/theme/brn_theme.dart'; -import 'package:bruno/src/utils/i18n/brn_date_picker_i18n.dart'; import 'package:flutter/material.dart'; /// Solar months of 31 days. diff --git a/lib/src/components/picker/time_picker/date_range_picker/brn_date_range_widget.dart b/lib/src/components/picker/time_picker/date_range_picker/brn_date_range_widget.dart index 2aa16813..e83432af 100755 --- a/lib/src/components/picker/time_picker/date_range_picker/brn_date_range_widget.dart +++ b/lib/src/components/picker/time_picker/date_range_picker/brn_date_range_widget.dart @@ -1,5 +1,3 @@ - - import 'dart:math'; import 'package:bruno/src/components/picker/base/brn_picker.dart'; @@ -9,7 +7,6 @@ import 'package:bruno/src/components/picker/time_picker/brn_date_picker_constant import 'package:bruno/src/components/picker/time_picker/date_range_picker/brn_date_range_side_widget.dart'; import 'package:bruno/src/l10n/brn_intl.dart'; import 'package:bruno/src/theme/brn_theme.dart'; -import 'package:bruno/src/utils/i18n/brn_date_picker_i18n.dart'; import 'package:flutter/material.dart'; /// Solar months of 31 days. @@ -54,8 +51,8 @@ class BrnDateRangeWidget extends StatefulWidget { this.maxDateTime, this.initialStartDateTime, this.initialEndDateTime, - this.dateFormat: datetimeRangePickerDateFormat, - this.pickerTitleConfig: BrnPickerTitleConfig.Default, + this.dateFormat = datetimeRangePickerDateFormat, + this.pickerTitleConfig = BrnPickerTitleConfig.Default, this.onCancel, this.onChange, this.onConfirm, diff --git a/lib/src/components/picker/time_picker/date_range_picker/brn_time_range_side_widget.dart b/lib/src/components/picker/time_picker/date_range_picker/brn_time_range_side_widget.dart index 1ff9dea3..fc276d99 100755 --- a/lib/src/components/picker/time_picker/date_range_picker/brn_time_range_side_widget.dart +++ b/lib/src/components/picker/time_picker/date_range_picker/brn_time_range_side_widget.dart @@ -1,12 +1,9 @@ - - import 'dart:math'; import 'package:bruno/src/components/picker/base/brn_picker.dart'; import 'package:bruno/src/components/picker/time_picker/brn_date_picker_constants.dart'; import 'package:bruno/src/components/picker/time_picker/brn_date_time_formatter.dart'; import 'package:bruno/src/theme/brn_theme.dart'; -import 'package:bruno/src/utils/i18n/brn_date_picker_i18n.dart'; import 'package:flutter/material.dart'; /// TimeRangeSidePicker widget. @@ -42,7 +39,7 @@ class BrnTimeRangeSideWidget extends StatefulWidget { this.minDateTime, this.maxDateTime, this.initialStartDateTime, - this.dateFormat: datetimeRangePickerTimeFormat, + this.dateFormat = datetimeRangePickerTimeFormat, this.minuteDivider = 1, this.onChange, this.onInitSelectChange, diff --git a/lib/src/components/picker/time_picker/date_range_picker/brn_time_range_widget.dart b/lib/src/components/picker/time_picker/date_range_picker/brn_time_range_widget.dart index e401024e..f0ce3c1b 100755 --- a/lib/src/components/picker/time_picker/date_range_picker/brn_time_range_widget.dart +++ b/lib/src/components/picker/time_picker/date_range_picker/brn_time_range_widget.dart @@ -1,5 +1,3 @@ - - import 'dart:math'; import 'package:bruno/src/components/picker/base/brn_picker.dart'; @@ -9,7 +7,6 @@ import 'package:bruno/src/components/picker/time_picker/brn_date_picker_constant import 'package:bruno/src/components/picker/time_picker/date_range_picker/brn_time_range_side_widget.dart'; import 'package:bruno/src/l10n/brn_intl.dart'; import 'package:bruno/src/theme/brn_theme.dart'; -import 'package:bruno/src/utils/i18n/brn_date_picker_i18n.dart'; import 'package:flutter/material.dart'; /// 时间范围选择 TimeRange widget. @@ -61,8 +58,8 @@ class BrnTimeRangeWidget extends StatefulWidget { this.isLimitTimeRange = true, this.initialStartDateTime, this.initialEndDateTime, - this.dateFormat: datetimeRangePickerTimeFormat, - this.pickerTitleConfig: BrnPickerTitleConfig.Default, + this.dateFormat = datetimeRangePickerTimeFormat, + this.pickerTitleConfig = BrnPickerTitleConfig.Default, this.minuteDivider = 1, this.onCancel, this.onChange, @@ -258,9 +255,8 @@ class _TimePickerWidgetState extends State { child: BrnTimeRangeSideWidget( key: secondGlobalKey, dateFormat: widget.dateFormat, - minDateTime: (widget.isLimitTimeRange) - ? _startSelectedDateTime - : _minTime, + minDateTime: + (widget.isLimitTimeRange) ? _startSelectedDateTime : _minTime, maxDateTime: _maxTime, initialStartDateTime: (widget.isLimitTimeRange) ? _endSelectedDateTime.compareTo(_startSelectedDateTime) > 0 diff --git a/lib/src/components/selection/widget/brn_flat_selection_item.dart b/lib/src/components/selection/widget/brn_flat_selection_item.dart index e3fc0dc7..ff100db6 100644 --- a/lib/src/components/selection/widget/brn_flat_selection_item.dart +++ b/lib/src/components/selection/widget/brn_flat_selection_item.dart @@ -14,7 +14,6 @@ import 'package:bruno/src/constants/brn_asset_constants.dart'; import 'package:bruno/src/l10n/brn_intl.dart'; import 'package:bruno/src/theme/configs/brn_selection_config.dart'; import 'package:bruno/src/utils/brn_tools.dart'; -import 'package:bruno/src/utils/i18n/brn_date_picker_i18n.dart'; import 'package:flutter/cupertino.dart'; ///更多的筛选项里面的single 项 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 0bf39af9..3c6caf74 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 @@ -7,7 +7,6 @@ import 'package:bruno/src/components/selection/widget/brn_selection_datepicker_a import 'package:bruno/src/l10n/brn_intl.dart'; import 'package:bruno/src/theme/configs/brn_selection_config.dart'; import 'package:bruno/src/utils/brn_tools.dart'; -import 'package:bruno/src/utils/i18n/brn_date_picker_i18n.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; 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 1b04450f..45cb0f77 100644 --- a/lib/src/components/selection/widget/brn_selection_menu_widget.dart +++ b/lib/src/components/selection/widget/brn_selection_menu_widget.dart @@ -13,7 +13,6 @@ import 'package:bruno/src/l10n/brn_intl.dart'; import 'package:bruno/src/theme/configs/brn_selection_config.dart'; import 'package:bruno/src/utils/brn_event_bus.dart'; import 'package:bruno/src/utils/brn_tools.dart'; -import 'package:bruno/src/utils/i18n/brn_date_picker_i18n.dart'; import 'package:flutter/material.dart'; typedef BrnOnMenuItemClick = bool Function(int index); diff --git a/lib/src/components/selection/widget/brn_selection_more_item_widget.dart b/lib/src/components/selection/widget/brn_selection_more_item_widget.dart index 40b3834c..852e607c 100644 --- a/lib/src/components/selection/widget/brn_selection_more_item_widget.dart +++ b/lib/src/components/selection/widget/brn_selection_more_item_widget.dart @@ -17,7 +17,6 @@ import 'package:bruno/src/l10n/brn_intl.dart'; import 'package:bruno/src/theme/brn_theme_configurator.dart'; import 'package:bruno/src/theme/configs/brn_selection_config.dart'; import 'package:bruno/src/utils/brn_tools.dart'; -import 'package:bruno/src/utils/i18n/brn_date_picker_i18n.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; diff --git a/lib/src/components/selection/widget/brn_selection_range_tag_widget.dart b/lib/src/components/selection/widget/brn_selection_range_tag_widget.dart index f843aaf1..4e922648 100644 --- a/lib/src/components/selection/widget/brn_selection_range_tag_widget.dart +++ b/lib/src/components/selection/widget/brn_selection_range_tag_widget.dart @@ -5,7 +5,6 @@ import 'package:bruno/src/components/toast/brn_toast.dart'; import 'package:bruno/src/l10n/brn_intl.dart'; import 'package:bruno/src/theme/configs/brn_selection_config.dart'; import 'package:bruno/src/utils/brn_tools.dart'; -import 'package:bruno/src/utils/i18n/brn_date_picker_i18n.dart'; import 'package:flutter/material.dart'; /// /// /// /// /// /// /// /// /// / diff --git a/lib/src/components/tabbar/normal/brn_tab_bar.dart b/lib/src/components/tabbar/normal/brn_tab_bar.dart index 02bc9f5a..894c7255 100644 --- a/lib/src/components/tabbar/normal/brn_tab_bar.dart +++ b/lib/src/components/tabbar/normal/brn_tab_bar.dart @@ -681,8 +681,8 @@ class _TabBarOverlayWidget extends StatefulWidget { this.moreWindowText, this.brnTabbarController, required this.themeData, - this.spacing: 12.0, - this.preLineTagCount: 4, + this.spacing = 12.0, + this.preLineTagCount = 4, this.tagHeight}); @override diff --git a/lib/src/theme/brn_theme.dart b/lib/src/theme/brn_theme.dart index 9e2fb670..b3b5793e 100644 --- a/lib/src/theme/brn_theme.dart +++ b/lib/src/theme/brn_theme.dart @@ -10,7 +10,6 @@ export 'configs/brn_action_sheet_config.dart'; export 'configs/brn_all_config.dart'; export 'configs/brn_appbar_config.dart'; export 'configs/brn_button_config.dart'; -export 'configs/brn_button_config.dart'; export 'configs/brn_card_title_config.dart'; export 'configs/brn_common_config.dart'; export 'configs/brn_dialog_config.dart'; @@ -24,5 +23,4 @@ export 'configs/brn_selection_config.dart'; export 'configs/brn_tabbar_config.dart'; export 'configs/brn_tag_config.dart'; export 'brn_initializer.dart'; -export 'brn_theme_configurator.dart'; export 'adapter/brn_pad_theme_config.dart'; diff --git a/lib/src/theme/configs/brn_enhance_number_card_config.dart b/lib/src/theme/configs/brn_enhance_number_card_config.dart index faaae1cf..33881eb1 100644 --- a/lib/src/theme/configs/brn_enhance_number_card_config.dart +++ b/lib/src/theme/configs/brn_enhance_number_card_config.dart @@ -14,7 +14,7 @@ class BrnEnhanceNumberCardConfig extends BrnBaseConfig { BrnTextStyle? titleTextStyle, BrnTextStyle? descTextStyle, double? dividerWidth, - String configId: GLOBAL_CONFIG_ID, + String configId = GLOBAL_CONFIG_ID, }) : _runningSpace = runningSpace, _itemRunningSpace = itemRunningSpace, _titleTextStyle = titleTextStyle, diff --git a/lib/src/theme/configs/brn_pair_info_config.dart b/lib/src/theme/configs/brn_pair_info_config.dart index 987dfb67..ca9f0e38 100644 --- a/lib/src/theme/configs/brn_pair_info_config.dart +++ b/lib/src/theme/configs/brn_pair_info_config.dart @@ -14,7 +14,7 @@ class BrnPairInfoTableConfig extends BrnBaseConfig { BrnTextStyle? keyTextStyle, BrnTextStyle? valueTextStyle, BrnTextStyle? linkTextStyle, - String configId: GLOBAL_CONFIG_ID, + String configId = GLOBAL_CONFIG_ID, }) : _rowSpacing = rowSpacing, _itemSpacing = itemSpacing, _keyTextStyle = keyTextStyle, @@ -150,7 +150,7 @@ class BrnPairRichInfoGridConfig extends BrnBaseConfig { BrnTextStyle? keyTextStyle, BrnTextStyle? valueTextStyle, BrnTextStyle? linkTextStyle, - String configId: GLOBAL_CONFIG_ID, + String configId = GLOBAL_CONFIG_ID, }) : _rowSpacing = rowSpacing, _itemSpacing = itemSpacing, _itemHeight = itemHeight, diff --git a/lib/src/theme/configs/brn_tabbar_config.dart b/lib/src/theme/configs/brn_tabbar_config.dart index 457ae2c8..cfb42f64 100644 --- a/lib/src/theme/configs/brn_tabbar_config.dart +++ b/lib/src/theme/configs/brn_tabbar_config.dart @@ -24,7 +24,7 @@ class BrnTabBarConfig extends BrnBaseConfig { double? tagSpacing, int? preLineTagCount, double? tagHeight, - String configId: GLOBAL_CONFIG_ID, + String configId = GLOBAL_CONFIG_ID, }) : _tabHeight = tabHeight, _indicatorHeight = indicatorHeight, _indicatorWidth = indicatorWidth,