diff --git a/.gitignore b/.gitignore
index 8c47502d..19f097df 100644
--- a/.gitignore
+++ b/.gitignore
@@ -75,3 +75,6 @@ build/
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
pubspec.lock
+
+# FVM
+.fvm
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4b3e551d..70537f23 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,44 @@
-## [1.0.0] - first publish adapter flutter sdk 1.22.4
-## [2.0.0] - adapter flutter sdk 2.2.2
+
+## [2.1.0-Beta] - 2022-2-15
+### Changed
+
+#### base
+
+- **Breaking change**: Sound null safety support, thanks to @leftcoding #39#33 @donywan #20 @laiiihz #80#64#59#32#14 @kalifun #36 @jojinshallar #81#75#65#62#56#42 @junlandroid #73 @Kenneth #53 @HappyImp #55 @kkkman22 #23 @AlexV525 #30
+- **Breaking change**: Refer to the dart language specification to optimized constant and enum naming.
+- Replace DIN Font
with Bebas Font
.
+- Add build test thank to **AlexV525**.
+
+#### components
+- BrnCalendarView
: add BrnCalendarView.single()
and BrnCalendarView.range()
constructor and had its argument startEndDateChange
removed.
+- BrnSelectionEntityListBean
: fromMap
is renamed to fromJson
.
+- BrnRadioButton
: optimize click area [#31](https://github.com/LianjiaTech/bruno/pull/31) , thanks to **a1017480401** .
+- BrnScrollableTextDialog
: remove Navigator.pop(context) in onSubmit()
and hand it over to external processing (user).
+- BrnBubbleText
: add attribute bgColor
and textStyle
+
+
+
+### Fixed
+
+- Fix example error [#71](https://github.com/LianjiaTech/bruno/issues/71) thanks to **leftcoding** fixing this issue.
+- Fix BrnPickerTitleConfig
titleContent
setting is invalid [#70](https://github.com/LianjiaTech/bruno/issues/70).
+- Optimize BrnPopupWindow
onItemClick
logic [#57 ](https://github.com/LianjiaTech/bruno/issues/57) .
+- Fix BrnDialog
is obscured by keyboard [#7](https://github.com/LianjiaTech/bruno/issues/7) .
+
+
+
+Thanks again to **leftcoding**, **jojinshallar**, **laiiihz**, **donywan**, **kalifun**, **junlandroid**, **Kenneth**, **HappyImp**, **kkkman22** , **a1017480401** and **Alex**.
+
+
+
+## [2.0.0] - 2021-12-8
+
+- Adapt flutter sdk 2.2.2
+
+## [1.0.0] - 2021-12-7
+
+- First publish adapt flutter sdk 1.22.4
+
+
diff --git a/assets/icons/icon_uparrow.png b/assets/icons/icon_uparrow.png
deleted file mode 100644
index b1d4cbf3..00000000
Binary files a/assets/icons/icon_uparrow.png and /dev/null differ
diff --git a/docs/components/abnormalCard/BrnAbnormalStateWidget/BrnAbnormalStateWidget.md b/docs/components/abnormalCard/BrnAbnormalStateWidget/BrnAbnormalStateWidget.md
index 2a6f2f09..3d1d6bb2 100644
--- a/docs/components/abnormalCard/BrnAbnormalStateWidget/BrnAbnormalStateWidget.md
+++ b/docs/components/abnormalCard/BrnAbnormalStateWidget/BrnAbnormalStateWidget.md
@@ -57,7 +57,7 @@ BrnAbnormalStateWidget({
| img | Image | 图片 | 否 | |
| title | String | 标题 | 否 | |
| content | String | 内容 | 否 | |
-| operateAreaType | enum OperateAreaType { SingleButton, DoubleButton, TextButton } | 操作区类型。SingleButton 为【单按钮】效果 DoubleButton 为【双按钮】效果 TextButton 为【文字链】效果 | 否 | OperateAreaType.TextButton |
+| operateAreaType | enum OperateAreaType { singleButton, doubleButton, textButton } | 操作区类型。SingleButton 为【单按钮】效果 DoubleButton 为【双按钮】效果 TextButton 为【文字链】效果 | 否 | OperateAreaType.TextButton |
| operateTexts | List | | | |
| action | BrnEmptyStatusIndexedActionClickCallback = void Function(int index)index 点击的位置 | 点击回调,在 SingleButton 类型或者 enablePageTap = true 点击空白区域时返回 0;其他根据点击的位置返回。 | 否 | |
| enablePageTap | bool | 空白区域是否可点击 | 否 | false |
diff --git a/docs/components/form/BrnAddLabel/BrnAddLabel.md b/docs/components/form/BrnAddLabel/BrnAddLabel.md
index aedf2e7f..a15e3676 100644
--- a/docs/components/form/BrnAddLabel/BrnAddLabel.md
+++ b/docs/components/form/BrnAddLabel/BrnAddLabel.md
@@ -39,7 +39,7 @@ BrnAddLabel({
| **参数名** | **参数类型** | **描述** | **是否必填** | **默认值** | **备注** |
| --- | --- | --- | --- | --- | --- |
| label | String | 录入项的唯一标识,主要用于录入类型页面框架中 | 否 | 无 | |
-| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.LABEL_ADD | 外部可根据此字段判断表单项类型 |
+| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.labelAdd | 外部可根据此字段判断表单项类型 |
| title | String | 录入项标题 | 否 | '' | |
| isEdit | bool | 录入项 是否可编辑 | 否 | true | true:可编辑false:禁用 |
| onTap | VoidCallback | 可操作区点击回调 | 否 | 无 | |
diff --git a/docs/components/form/BrnExpandFormGroup/BrnExpandFormGroup.md b/docs/components/form/BrnExpandFormGroup/BrnExpandFormGroup.md
index f42833c2..a6bc1820 100644
--- a/docs/components/form/BrnExpandFormGroup/BrnExpandFormGroup.md
+++ b/docs/components/form/BrnExpandFormGroup/BrnExpandFormGroup.md
@@ -56,7 +56,7 @@ BrnExpandFormGroup({
| **参数名** | **参数类型** | **描述** | **是否必填** | **默认值** | **备注** |
| --- | --- | --- | --- | --- | --- |
| label | String | 录入项的唯一标识,主要用于录入类型页面框架中 | 否 | 无 | |
-| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.NORMAL_GROUP_TYPE | 外部可根据此字段判断表单项类型 |
+| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.normalGroupType | 外部可根据此字段判断表单项类型 |
| title | String | 录入项标题 | 否 | '' | |
| subTitle | String | 录入项子标题 | 否 | 无 | |
| tipLabel | String | 录入项提示(问号图标&文案) 用户点击时触发onTip回调。 | 否 | 备注中类型3 | 1. 设置"空字符串"时展示问号图标 2. 设置"非空字符串"时展示问号图标&文案 3. 若不赋值或赋值为null时,不显示提示项 |
diff --git a/docs/components/form/BrnMultiChoiceInputFormItem/BrnMultiChoiceInputFormItem.md b/docs/components/form/BrnMultiChoiceInputFormItem/BrnMultiChoiceInputFormItem.md
index ffc86c48..e42ccd61 100644
--- a/docs/components/form/BrnMultiChoiceInputFormItem/BrnMultiChoiceInputFormItem.md
+++ b/docs/components/form/BrnMultiChoiceInputFormItem/BrnMultiChoiceInputFormItem.md
@@ -47,7 +47,7 @@ BrnMultiChoiceInputFormItem({
this.title: "",
this.subTitle,
this.tipLabel,
- this.prefixIconType: BrnPrefixIconType.TYPE_NORMAL,
+ this.prefixIconType: BrnPrefixIconType.normal,
this.error: "",
this.isEdit: true,
this.isRequire: true,
@@ -72,11 +72,11 @@ BrnMultiChoiceInputFormItem({
| **参数名** | 参数类型 | **描述** | **是否必填** | **默认值** | **备注** |
| --- | --- | --- | --- | --- | --- |
| label | String | 录入项的唯一标识,主要用于录入类型页面框架中 | 否 | 无 | |
-| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType
.MULTI_CHOICE_PORTRAIT_INPUT_TYPE | 外部可根据此字段判断表单项类型 |
+| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.multiChoicePortraitInputType | 外部可根据此字段判断表单项类型 |
| title | String | 录入项标题 | 否 | '' | |
| subTitle | String | 录入项子标题 | 否 | 无 | |
| tipLabel | String | 录入项提示(问号图标&文案) 用户点击时触发 onTip 回调。 | 否 | 备注中类型 3 | 1. 设置"空字符串"时展示问号图标 2. 设置"非空字符串"时展示问号图标&文案 3. 若不赋值或赋值为 null 时,不显示提示项 |
-| prefixIconType | String | 录入项前缀图标样式 "添加项" "删除项" 详见 **BrnPrefixIconType** 类 | 否 | BrnPrefixIconType.TYPE_NORMAL | 1. 不展示图标:BrnPrefixIconType.TYPE_NORMAL2. 展示加号图标:BrnPrefixIconType.TYPE_ADD3. 展示减号图标:BrnPrefixIconType.TYPE_REMOVE |
+| prefixIconType | String | 录入项前缀图标样式 "添加项" "删除项" 详见 **BrnPrefixIconType** 类 | 否 | BrnPrefixIconType.normal | 1. 不展示图标:BrnPrefixIconType.normal2. 展示加号图标:BrnPrefixIconType.add3. 展示减号图标:BrnPrefixIconType.remove |
| error | String | 录入项错误提示 | 否 | '' | |
| isRequire | bool | 录入项是否为必填项(展示\*图标) 默认为 false 不必填 | 否 | false | |
| isEdit | bool | 录入项 是否可编辑 | 否 | true | true:可编辑 false:禁用 |
@@ -137,7 +137,7 @@ BrnMultiChoiceInputFormItem(
```dart
BrnMultiChoiceInputFormItem(
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
error: "必填项不能为空",
title: "自然到访保护期",
diff --git a/docs/components/form/BrnMultiChoicePortraitInputFormItem/BrnMultiChoicePortraitInputFormItem.md b/docs/components/form/BrnMultiChoicePortraitInputFormItem/BrnMultiChoicePortraitInputFormItem.md
index c19f9515..9bb04350 100644
--- a/docs/components/form/BrnMultiChoicePortraitInputFormItem/BrnMultiChoicePortraitInputFormItem.md
+++ b/docs/components/form/BrnMultiChoicePortraitInputFormItem/BrnMultiChoicePortraitInputFormItem.md
@@ -48,7 +48,7 @@ BrnMultiChoicePortraitInputFormItem(
this.title: "",
this.subTitle,
this.tipLabel,
- this.prefixIconType: BrnPrefixIconType.TYPE_NORMAL,
+ this.prefixIconType: BrnPrefixIconType.normal,
this.error: "",
this.isEdit: true,
this.isRequire: false,
@@ -73,11 +73,11 @@ this.themeData = BrnThemeConfigurator.instance
| **参数名** | **参数类型** | **描述** | **是否必填** | **默认值** | **备注** |
| --- | --- | --- | --- | --- | --- |
| label | String | 录入项的唯一标识,主要用于录入类型页面框架中 | 否 | 无 | |
-| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.MULTI_CHOICE_PORTRAIT_INPUT_TYPE | 外部可根据此字段判断表单项类型 |
+| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.multiChoicePortraitInputType | 外部可根据此字段判断表单项类型 |
| title | String | 录入项标题 | 否 | '' | |
| subTitle | String | 录入项子标题 | 否 | 无 | |
| tipLabel | String | 录入项提示(问号图标&文案) 用户点击时触发onTip回调。 | 否 | 备注中类型3 | 1. 设置"空字符串"时展示问号图标 2. 设置"非空字符串"时展示问号图标&文案 3. 若不赋值或赋值为null时,不显示提示项 |
-| prefixIconType | String | 录入项前缀图标样式 "添加项" "删除项" 详见 **BrnPrefixIconType** 类 | 否 | BrnPrefixIconType.TYPE\_NORMAL | 1. 不展示图标:BrnPrefixIconType.TYPE\_NORMAL 2. 展示加号图标:BrnPrefixIconType.TYPE\_ADD 3. 展示减号图标:BrnPrefixIconType.TYPE\_REMOVE |
+| prefixIconType | String | 录入项前缀图标样式 "添加项" "删除项" 详见 **BrnPrefixIconType** 类 | 否 | BrnPrefixIconType.normal | 1. 不展示图标:BrnPrefixIconType.normal 2. 展示加号图标:BrnPrefixIconType.add 3. 展示减号图标:BrnPrefixIconType.remove |
| error | String | 录入项错误提示 | 否 | '' | |
| isRequire | bool | 录入项是否为必填项(展示`*`图标) 默认为 false 不必填 | 否 | false | |
| isEdit | bool | 录入项 是否可编辑 | 否 | true | true:可编辑false:禁用 |
@@ -94,9 +94,9 @@ this.themeData = BrnThemeConfigurator.instance
###### BrnPrefixIconType:
```dart
class BrnPrefixIconType {
- static const String TYPE_NORMAL = "type_normal";
- static const String TYPE_ADD = "type_add";
- static const String TYPE_REMOVE = "type_remove";
+ static const String normal = "type_normal";
+ static const String add = "type_add";
+ static const String remove = "type_remove";
}
```
## 四、代码演示
@@ -138,7 +138,7 @@ BrnMultiChoicePortraitInputFormItem(
```dart
BrnMultiChoicePortraitInputFormItem(
- prefixIconType: BrnPrefixIconType.TYPE_REMOVE,
+ prefixIconType: BrnPrefixIconType.remove,
isRequire: true,
error: "必填项不能为空",
title: "自然到访保护期",
diff --git a/docs/components/form/BrnNormalFormGroup/BrnNormalFormGroup.md b/docs/components/form/BrnNormalFormGroup/BrnNormalFormGroup.md
index afd9cc19..3a1d2905 100644
--- a/docs/components/form/BrnNormalFormGroup/BrnNormalFormGroup.md
+++ b/docs/components/form/BrnNormalFormGroup/BrnNormalFormGroup.md
@@ -60,7 +60,7 @@ BrnNormalFormGroup({
| **参数名** | **参数类型** | **描述** | **是否必填** | **默认值** | **备注** |
| --- | --- | --- | --- | --- | --- |
| label | String | 录入项的唯一标识,主要用于录入类型页面框架中 | 否 | 无 | |
-| type | String | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.NORMAL_GROUP_TYPE | 外部可用此字段判断表单类型 |
+| type | String | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.normalGroupType | 外部可用此字段判断表单类型 |
| title | String | 录入项标题 | 否 | 无 | |
| subTitle | String | 录入项子标题 | 否 | 无 | |
| tipLabel | String | 录入项提示(问号图标&文案) 用户点击时触发onTip回调。 | 否 | null | 1. 若赋值为 空字符串("")时仅展示"问号"图标,2. 若赋值为非空字符串时 展示"问号图标&文案",3. 若不赋值或赋值为null时 不显示提示项 |
diff --git a/docs/components/form/BrnRadioInputFormItem/BrnRadioInputFormItem.md b/docs/components/form/BrnRadioInputFormItem/BrnRadioInputFormItem.md
index 83fb480e..c799bf46 100644
--- a/docs/components/form/BrnRadioInputFormItem/BrnRadioInputFormItem.md
+++ b/docs/components/form/BrnRadioInputFormItem/BrnRadioInputFormItem.md
@@ -51,7 +51,7 @@ BrnRadioInputFormItem(
this.title: "",
this.subTitle,
this.tipLabel,
- this.prefixIconType: BrnPrefixIconType.TYPE_NORMAL,
+ this.prefixIconType: BrnPrefixIconType.normal,
this.error: "",
this.isEdit: true,
this.isRequire: false,
@@ -78,11 +78,10 @@ BrnRadioInputFormItem(
| **参数名** | **参数类型** | **描述** | **是否必填** | **默认值** | **备注** |
| --- | --- | --- | --- | --- | --- |
| label | String | 录入项的唯一标识,主要用于录入类型页面框架中 | 否 | 无 | |
-| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.TYPE_NORMAL | 外部可根据此字段判断表单项类型 |
| title | String | 录入项标题 | 否 | '' | |
| subTitle | String | 录入项子标题 | 否 | 无 | |
| tipLabel | String | 录入项提示(问号图标&文案) 用户点击时触发onTip回调。 | 否 | 备注中类型3 | 1. 设置"空字符串"时展示问号图标 2. 设置"非空字符串"时展示问号图标&文案 3. 若不赋值或赋值为null时,不显示提示项 |
-| prefixIconType | String | 录入项前缀图标样式 "添加项" "删除项" 详见 **BrnPrefixIconType** 类 | 否 | BrnPrefixIconType.TYPE_NORMAL | 1. 不展示图标:BrnPrefixIconType.TYPE_NORMAL 2. 展示加号图标:BrnPrefixIconType.TYPE_ADD3. 展示减号图标:BrnPrefixIconType.TYPE_REMOVE |
+| prefixIconType | String | 录入项前缀图标样式 "添加项" "删除项" 详见 **BrnPrefixIconType** 类 | 否 | BrnPrefixIconType.normal | 1. 不展示图标:BrnPrefixIconType.normal 2. 展示加号图标:BrnPrefixIconType.add3. 展示减号图标:BrnPrefixIconType.remove |
| error | String | 录入项错误提示 | 否 | '' | |
| isRequire | bool | 录入项是否为必填项(展示*图标) 默认为 false 不必填 | 否 | false | |
| isEdit | bool | 录入项 是否可编辑 | 否 | true | true:可编辑false:禁用 |
@@ -103,10 +102,10 @@ BrnRadioInputFormItem(
```dart
-class BrnPrefixIconType {
- static const String TYPE_NORMAL = "type_normal";
- static const String TYPE_ADD = "type_add";
- static const String TYPE_REMOVE = "type_remove";
+class BrnPrefixIconType {
+ static const String normal = "type_normal";
+ static const String add = "type_add";
+ static const String remove = "type_remove";
}
```
## 四、代码演示
@@ -142,7 +141,7 @@ BrnRadioInputFormItem(
![](./img/BrnRadioInputFormItemDemo2.png)
```dart
BrnRadioInputFormItem(
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
error: "必填项不能为空",
title: "自然到访保护期",
@@ -173,7 +172,7 @@ BrnRadioInputFormItem(
![](./img/BrnRadioInputFormItemDemo3.png)
```dart
BrnRadioInputFormItem(
- prefixIconType: BrnPrefixIconType.TYPE_REMOVE,
+ prefixIconType: BrnPrefixIconType.remove,
isRequire: true,
title: "自然到访保护期",
subTitle: "这里是副标题",
@@ -203,7 +202,7 @@ BrnRadioInputFormItem(
![](./img/BrnRadioInputFormItemDemo4.png)
```dart
BrnRadioInputFormItem.autoLayout(
- prefixIconType: BrnPrefixIconType.TYPE_REMOVE,
+ prefixIconType: BrnPrefixIconType.remove,
isRequire: true,
error: "必填项不能为空",
title: "autoLayout",
diff --git a/docs/components/form/BrnRadioPortraitInputFormItem/BrnRadioPortraitInputFormItem.md b/docs/components/form/BrnRadioPortraitInputFormItem/BrnRadioPortraitInputFormItem.md
index b7f70a32..237dc555 100644
--- a/docs/components/form/BrnRadioPortraitInputFormItem/BrnRadioPortraitInputFormItem.md
+++ b/docs/components/form/BrnRadioPortraitInputFormItem/BrnRadioPortraitInputFormItem.md
@@ -46,7 +46,7 @@ BrnRadioPortraitInputFormItem(
this.title: "",
this.subTitle,
this.tipLabel,
- this.prefixIconType: BrnPrefixIconType.TYPE_NORMAL,
+ this.prefixIconType: BrnPrefixIconType.normal,
this.error: "",
this.isEdit: true,
this.isRequire: false,
@@ -73,11 +73,11 @@ BrnRadioPortraitInputFormItem(
| **参数名** | **参数类型** | **描述** | **是否必填** | **默认值** | **备注** |
| -------------- | -------------------------- | ------------------------------------------------------------------ | ------------ | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| label | String | 录入项的唯一标识,主要用于录入类型页面框架中 | 否 | 无 | |
-| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.RADIO_INPUT_TYPE | 外部可根据此字段判断表单项类型 |
+| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.radioInputType | 外部可根据此字段判断表单项类型 |
| title | String | 录入项标题 | 否 | 无 | |
| subTitle | String | 录入项子标题 | 否 | 无 | |
| tipLabel | String | 录入项提示(问号图标&文案) 用户点击时触发 onTip 回调。 | 否 | 备注中类型 3 | 1. 设置"空字符串"时展示问号图标 2. 设置"非空字符串"时展示问号图标&文案 3. 若不赋值或赋值为 null 时,不显示提示项 |
-| prefixIconType | String | 录入项前缀图标样式 "添加项" "删除项" 详见 **BrnPrefixIconType** 类 | 否 | BrnPrefixIconType.TYPE_NORMAL | 1. 不展示图标:BrnPrefixIconType.TYPE_NORMAL2. 展示加号图标:BrnPrefixIconType.TYPE_ADD3. 展示减号图标:BrnPrefixIconType.TYPE_REMOVE |
+| prefixIconType | String | 录入项前缀图标样式 "添加项" "删除项" 详见 **BrnPrefixIconType** 类 | 否 | BrnPrefixIconType.normal | 1. 不展示图标:BrnPrefixIconType.normal2. 展示加号图标:BrnPrefixIconType.add3. 展示减号图标:BrnPrefixIconType.remove |
| error | String | 录入项错误提示 | 否 | 无 | |
| isRequire | bool | 录入项是否为必填项(展示\*图标) 默认为 false 不必填 | 否 | false | |
| isEdit | bool | 录入项 是否可编辑 | 否 | true | true:可编辑 false:禁用 |
@@ -96,9 +96,9 @@ BrnRadioPortraitInputFormItem(
```dart
class BrnPrefixIconType {
- static const String TYPE_NORMAL = "type_normal";
- static const String TYPE_ADD = "type_add";
- static const String TYPE_REMOVE = "type_remove";
+ static const String normal = "type_normal";
+ static const String add = "type_add";
+ static const String remove = "type_remove";
}
```
@@ -138,7 +138,7 @@ BrnRadioPortraitInputFormItem(
```dart
BrnRadioPortraitInputFormItem(
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
error: "必填项不能为空",
title: "自然到访保护期",
diff --git a/docs/components/form/BrnRangeInputFormItem/BrnRangeInputFormItem.md b/docs/components/form/BrnRangeInputFormItem/BrnRangeInputFormItem.md
index 65f5e8c0..19abd429 100644
--- a/docs/components/form/BrnRangeInputFormItem/BrnRangeInputFormItem.md
+++ b/docs/components/form/BrnRangeInputFormItem/BrnRangeInputFormItem.md
@@ -46,7 +46,7 @@ BrnRangeInputFormItem(
this.title: "",
this.subTitle,
this.tipLabel,
- this.prefixIconType: BrnPrefixIconType.TYPE_NORMAL,
+ this.prefixIconType: BrnPrefixIconType.normal,
this.error: "",
this.isEdit: true,
this.isRequire: false,
@@ -82,11 +82,10 @@ BrnRangeInputFormItem(
| **参数名** | **参数类型** | **描述** | **是否必填** | **默认值** | **备注** |
| --- | --- | --- | --- | --- | --- |
| label | String | 录入项的唯一标识,主要用于录入类型页面框架中 | 否 | 无 | |
-| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.TYPE_NORMAL | 外部可根据此字段判断表单项类型 |
| title | String | 录入项标题 | 否 | '' | |
| subTitle | String | 录入项子标题 | 否 | 无 | |
| tipLabel | String | 录入项提示(问号图标&文案) 用户点击时触发onTip回调。 | 否 | 备注中类型3 | 1. 设置"空字符串"时展示问号图标 2. 设置"非空字符串"时展示问号图标&文案 3. 若不赋值或赋值为null时,不显示提示项 |
-| prefixIconType | String | 录入项前缀图标样式 "添加项" "删除项" 详见 **BrnPrefixIconType** 类 | 否 | BrnPrefixIconType.TYPE_NORMAL | 1. 不展示图标:BrnPrefixIconType.TYPE_NORMAL 2. 展示加号图标:BrnPrefixIconType.TYPE_ADD 3. 展示减号图标:BrnPrefixIconType.TYPE_REMOVE |
+| prefixIconType | String | 录入项前缀图标样式 "添加项" "删除项" 详见 **BrnPrefixIconType** 类 | 否 | BrnPrefixIconType.normal | 1. 不展示图标:BrnPrefixIconType.normal 2. 展示加号图标:BrnPrefixIconType.add 3. 展示减号图标:BrnPrefixIconType.remove |
| error | String | 录入项错误提示 | 否 | '' | |
| isRequire | bool | 录入项是否为必填项(展示`*`图标),默认为 false 不必填 | 否 | false | |
| isEdit | bool | 录入项 是否可编辑 | 否 | true | true:可编辑false:禁用 |
@@ -114,25 +113,25 @@ BrnRangeInputFormItem(
#### BrnPrefixIconType:
``` dart
-class BrnPrefixIconType {
- static const String TYPE_NORMAL = "type_normal";
- static const String TYPE_ADD = "type_add";
- static const String TYPE_REMOVE = "type_remove";
+class BrnPrefixIconType {
+ static const String normal = "type_normal";
+ static const String add = "type_add";
+ static const String remove = "type_remove";
}
```
#### BrnInputType
``` dart
class BrnInputType {
- static const String TEXT = "text";
- static const String MULTI_LINE = "multiline";
- static const String NUMBER = "number";
- static const String DECIMAL = "decimal";
- static const String PHONE = "phone";
- static const String DATE = "datetime";
- static const String EMAIL = "emailAddress";
- static const String URL = "url";
- static const String PWD = "visiblePassword";
+ static const String text = "text";
+ static const String multiLine = "multiline";
+ static const String number = "number";
+ static const String decimal = "decimal";
+ static const String phone = "phone";
+ static const String date = "datetime";
+ static const String email = "emailAddress";
+ static const String url = "url";
+ static const String pwd = "visiblePassword";
}
```
## 四、代码演示
@@ -178,7 +177,7 @@ BrnRangeInputFormItem(
BrnRangeInputFormItem(
minController: TextEditingController()..text = "10",
maxController: TextEditingController()..text = "100",
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
error: "必填项不能为空",
title: "保护期",
diff --git a/docs/components/form/BrnRatioInputFormItem/BrnRatioInputFormItem.md b/docs/components/form/BrnRatioInputFormItem/BrnRatioInputFormItem.md
index c8e6d691..a6548d3f 100644
--- a/docs/components/form/BrnRatioInputFormItem/BrnRatioInputFormItem.md
+++ b/docs/components/form/BrnRatioInputFormItem/BrnRatioInputFormItem.md
@@ -44,7 +44,7 @@ BrnRatioInputFormItem(
this.title: "",
this.subTitle,
this.tipLabel,
- this.prefixIconType: BrnPrefixIconType.TYPE_NORMAL,
+ this.prefixIconType: BrnPrefixIconType.normal,
this.error: "",
this.isEdit: true,
this.isRequire: false,
@@ -72,11 +72,11 @@ BrnRatioInputFormItem(
| **参数名** | **参数类型** | **描述** | **是否必填** | **默认值** | **备注** |
| --- | --- | --- | --- | --- | --- |
| label | String | 录入项的唯一标识,主要用于录入类型页面框架中 | 否 | 无 | |
-| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.TEXT_INPUT_RATIO_TYPE | 外部可根据此字段判断表单项类型 |
+| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.textInputRatioType | 外部可根据此字段判断表单项类型 |
| title | String | 录入项标题 | 否 | '' | |
| subTitle | String | 录入项子标题 | 否 | 无 | |
| tipLabel | String | 录入项提示(问号图标&文案) 用户点击时触发onTip回调。 | 否 | 备注中类型3 | 1. 设置"空字符串"时展示问号图标 2. 设置"非空字符串"时展示问号图标&文案 3. 若不赋值或赋值为null时,不显示提示项 |
-| prefixIconType | String | 录入项前缀图标样式 "添加项" "删除项" 详见 **BrnPrefixIconType** 类 | 否 | BrnPrefixIconType.TYPE_NORMAL | 1. 不展示图标:BrnPrefixIconType.TYPE_NORMAL 2. 展示加号图标:BrnPrefixIconType.TYPE_ADD 3. 展示减号图标:BrnPrefixIconType.TYPE_REMOVE |
+| prefixIconType | String | 录入项前缀图标样式 "添加项" "删除项" 详见 **BrnPrefixIconType** 类 | 否 | BrnPrefixIconType.normal | 1. 不展示图标:BrnPrefixIconType.normal 2. 展示加号图标:BrnPrefixIconType.add 3. 展示减号图标:BrnPrefixIconType.remove |
| error | String | 录入项错误提示 | 否 | '' | |
| isRequire | bool | 录入项是否为必填项(展示`*`图标) 默认为 false 不必填 | 否 | false | |
| isEdit | bool | 录入项 是否可编辑 | 否 | true | true:可编辑,false:禁用 |
diff --git a/docs/components/form/BrnStarsFormItem/BrnStarsFormItem.md b/docs/components/form/BrnStarsFormItem/BrnStarsFormItem.md
index b6a280fb..d98d3e3d 100644
--- a/docs/components/form/BrnStarsFormItem/BrnStarsFormItem.md
+++ b/docs/components/form/BrnStarsFormItem/BrnStarsFormItem.md
@@ -41,7 +41,7 @@ BrnStarsFormItem(
this.title: "",
this.subTitle,
this.tipLabel,
- this.prefixIconType: BrnPrefixIconType.TYPE_NORMAL,
+ this.prefixIconType: BrnPrefixIconType.normal,
this.error: "",
this.isEdit: true,
this.isRequire: false,
@@ -66,11 +66,11 @@ BrnStarsFormItem(
| **参数名** | **参数类型** | **描述** | **是否必填** | **默认值** | **备注** |
| --- | --- | --- | --- | --- | --- |
| label | String | 录入项的唯一标识,主要用于录入类型页面框架中 | 否 | 无 | |
-| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.STAR_INPUT_TYPE | 外部可根据此字段判断表单项类型 |
+| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.starInputType | 外部可根据此字段判断表单项类型 |
| title | String | 录入项标题 | 否 | '' | |
| subTitle | String | 录入项子标题 | 否 | 无 | |
| tipLabel | String | 录入项提示(问号图标&文案) 用户点击时触发onTip回调。 | 否 | 备注中类型3 | 1. 设置"空字符串"时展示问号图标 2. 设置"非空字符串"时展示问号图标&文案 3. 若不赋值或赋值为null时,不显示提示项 |
-| prefixIconType | String | 录入项前缀图标样式 "添加项" "删除项" 详见 **BrnPrefixIconType** 类 | 否 | BrnPrefixIconType.TYPE\_NORMAL | 1. 不展示图标:BrnPrefixIconType.TYPE\_NORMAL 2. 展示加号图标:BrnPrefixIconType.TYPE\_ADD 3. 展示减号图标:BrnPrefixIconType.TYPE\_REMOVE |
+| prefixIconType | String | 录入项前缀图标样式 "添加项" "删除项" 详见 **BrnPrefixIconType** 类 | 否 | BrnPrefixIconType.normal | 1. 不展示图标:BrnPrefixIconType.normal 2. 展示加号图标:BrnPrefixIconType.add 3. 展示减号图标:BrnPrefixIconType.remove |
| error | String | 录入项错误提示 | 否 | '' | |
| isRequire | bool | 录入项是否为必填项(展示`*`图标) 默认为 false 不必填 | 否 | false | |
| isEdit | bool | 录入项 是否可编辑 | 否 | true | true:可编辑false:禁用 |
diff --git a/docs/components/form/BrnStepInputFormItem/BrnStepInputFormItem.md b/docs/components/form/BrnStepInputFormItem/BrnStepInputFormItem.md
index f388bbd6..b97f5f2d 100644
--- a/docs/components/form/BrnStepInputFormItem/BrnStepInputFormItem.md
+++ b/docs/components/form/BrnStepInputFormItem/BrnStepInputFormItem.md
@@ -42,7 +42,7 @@ BrnStepInputFormItem(
this.title: "",
this.subTitle,
this.tipLabel,
- this.prefixIconType: BrnPrefixIconType.TYPE_NORMAL,
+ this.prefixIconType: BrnPrefixIconType.normal,
this.error: "",
this.isEdit: true,
this.isRequire: false,
@@ -69,11 +69,10 @@ BrnStepInputFormItem(
| **参数名** | **参数类型** | **描述** | **是否必填** | **默认值** | **备注** |
| --- | --- | --- | --- | --- | --- |
| label | String | 录入项的唯一标识,主要用于录入类型页面框架中 | 否 | 无 | |
-| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.TYPE_NORMAL | 外部可根据此字段判断表单项类型 |
| title | String | 录入项标题 | 否 | '' | |
| subTitle | String | 录入项子标题 | 否 | 无 | |
| tipLabel | String | 录入项提示(问号图标&文案) 用户点击时触发onTip回调。 | 否 | 备注中类型3 | 1. 设置"空字符串"时展示问号图标 2. 设置"非空字符串"时展示问号图标&文案 3. 若不赋值或赋值为null时,不显示提示项 |
-| prefixIconType | String | 录入项前缀图标样式 "添加项" "删除项" 详见 **BrnPrefixIconType** 类 | 否 | BrnPrefixIconType.TYPE\_NORMAL | 1. 不展示图标:BrnPrefixIconType.TYPE\_NORMAL 2. 展示加号图标:BrnPrefixIconType.TYPE\_ADD 3. 展示减号图标:BrnPrefixIconType.TYPE\_REMOVE |
+| prefixIconType | String | 录入项前缀图标样式 "添加项" "删除项" 详见 **BrnPrefixIconType** 类 | 否 | BrnPrefixIconType.normal | 1. 不展示图标:BrnPrefixIconType.normal 2. 展示加号图标:BrnPrefixIconType.add 3. 展示减号图标:BrnPrefixIconType.remove |
| error | String | 录入项错误提示 | 否 | '' | |
| isRequire | bool | 录入项是否为必填项(展示`*`图标) 默认为 false 不必填 | 否 | false | |
| isEdit | bool | 录入项 是否可编辑 | 否 | true | true:可编辑false:禁用 |
diff --git a/docs/components/form/BrnTextBlockInputFormItem/BrnTextBlockInputFormItem.md b/docs/components/form/BrnTextBlockInputFormItem/BrnTextBlockInputFormItem.md
index 5c764ac7..4c07ac49 100644
--- a/docs/components/form/BrnTextBlockInputFormItem/BrnTextBlockInputFormItem.md
+++ b/docs/components/form/BrnTextBlockInputFormItem/BrnTextBlockInputFormItem.md
@@ -43,11 +43,11 @@ group:
BrnTextBlockInputFormItem(
{Key key,
this.label,
- this.type: BrnInputItemType.TEXT_BLOCK_INPUT_TYPE,
+ this.type: BrnInputItemType.textBlockInputType,
this.title: "",
this.subTitle,
this.tipLabel,
- this.prefixIconType: BrnPrefixIconType.TYPE_NORMAL,
+ this.prefixIconType: BrnPrefixIconType.normal,
this.error: "",
this.isEdit: true,
this.isRequire: false,
@@ -77,11 +77,11 @@ BrnTextBlockInputFormItem(
| **参数名** | **参数类型** | **描述** | **是否必填** | **默认值** | **备注** |
| --- | --- | --- | --- | --- | --- |
| label | String | 录入项的唯一标识,主要用于录入类型页面框架中 | 否 | 无 | |
-| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.TEXT_BLOCK_INPUT_TYPE | 外部可根据此字段判断表单项类型 |
+| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.textBlockInputType | 外部可根据此字段判断表单项类型 |
| title | String | 录入项标题 | 否 | '' | |
| subTitle | String | 录入项子标题 | 否 | 无 | |
| tipLabel | String | 录入项提示(问号图标&文案) 用户点击时触发onTip回调。 | 否 | 备注中类型3 | 1. 设置"空字符串"时展示问号图标 2. 设置"非空字符串"时展示问号图标&文案 3. 若不赋值或赋值为null时,不显示提示项 |
-| prefixIconType | String | 录入项前缀图标样式 "添加项" "删除项" 详见 **BrnPrefixIconType** 类 | 否 | BrnPrefixIconType.TYPE_NORMAL | 1. 不展示图标:BrnPrefixIconType.TYPE_NORMAL 2. 展示加号图标:BrnPrefixIconType.TYPE_ADD3. 展示减号图标:BrnPrefixIconType.TYPE_REMOVE |
+| prefixIconType | String | 录入项前缀图标样式 "添加项" "删除项" 详见 **BrnPrefixIconType** 类 | 否 | BrnPrefixIconType.normal | 1. 不展示图标:BrnPrefixIconType.normal 2. 展示加号图标:BrnPrefixIconType.add3. 展示减号图标:BrnPrefixIconType.remove |
| error | String | 录入项错误提示 | 否 | '' | |
| isRequire | bool | 录入项是否为必填项(展示`*`图标) 默认为 false 不必填 | 否 | false | |
| isEdit | bool | 录入项 是否可编辑 | 否 | true | true:可编辑false:禁用 |
@@ -106,26 +106,26 @@ BrnTextBlockInputFormItem(
```dart
-class BrnPrefixIconType {
- static const String TYPE_NORMAL = "type_normal";
- static const String TYPE_ADD = "type_add";
- static const String TYPE_REMOVE = "type_remove";
+class BrnPrefixIconType {
+ static const String normal = "type_normal";
+ static const String add = "type_add";
+ static const String remove = "type_remove";
}
```
#### BrnInputType
-```dart r
+```dart
class BrnInputType {
- static const String TEXT = "text";
- static const String MULTI_LINE = "multiline";
- static const String NUMBER = "number";
- static const String DECIMAL = "decimal";
- static const String PHONE = "phone";
- static const String DATE = "datetime";
- static const String EMAIL = "emailAddress";
- static const String URL = "url";
- static const String PWD = "visiblePassword";
+ static const String text = "text";
+ static const String multiLine = "multiline";
+ static const String number = "number";
+ static const String decimal = "decimal";
+ static const String phone = "phone";
+ static const String date = "datetime";
+ static const String email = "emailAddress";
+ static const String url = "url";
+ static const String pwd = "visiblePassword";
}
```
## 四、代码演示
@@ -160,7 +160,7 @@ BrnTextBlockInputFormItem(
```dart
BrnTextBlockInputFormItem(
controller: TextEditingController()..text = "hello",
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
isEdit: true,
error: "必填项不能为空",
@@ -189,7 +189,7 @@ BrnTextBlockInputFormItem(
```dart
BrnTextBlockInputFormItem(
controller: TextEditingController()..text = "hello",
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
isEdit: true,
title: "备注",
@@ -217,7 +217,7 @@ BrnTextBlockInputFormItem(
```dart
BrnTextBlockInputFormItem(
controller: TextEditingController()..text = "hello",
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
isEdit: false,
isPrefixIconEnabled: true,
diff --git a/docs/components/form/BrnTextInputFormItem/BrnTextInputFormItem.md b/docs/components/form/BrnTextInputFormItem/BrnTextInputFormItem.md
index ca77d8f8..284cc1ba 100644
--- a/docs/components/form/BrnTextInputFormItem/BrnTextInputFormItem.md
+++ b/docs/components/form/BrnTextInputFormItem/BrnTextInputFormItem.md
@@ -43,11 +43,11 @@ group:
BrnTextInputFormItem({
Key key,
this.label,
- this.type: BrnInputItemType.TEXT_INPUT_TYPE,
+ this.type: BrnInputItemType.textInputType,
this.title: "",
this.subTitle,
this.tipLabel,
- this.prefixIconType: BrnPrefixIconType.TYPE_NORMAL,
+ this.prefixIconType: BrnPrefixIconType.normal,
this.error: "",
this.isEdit: true,
this.isRequire: false,
@@ -77,11 +77,11 @@ BrnTextInputFormItem({
| **参数名** | **参数类型** | **描述** | **是否必填** | **默认值** | **备注** |
| --- | --- | --- | --- | --- | --- |
| label | String | 录入项的唯一标识,主要用于录入类型页面框架中 | 否 | 无 | |
-| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.TEXT_INPUT_TYPE | 外部可根据此字段判断表单项类型 |
+| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.textInputType | 外部可根据此字段判断表单项类型 |
| title | String | 录入项标题 | 否 | '' | |
| subTitle | String | 录入项子标题 | 否 | 无 | |
| tipLabel | String | 录入项提示(问号图标&文案) 用户点击时触发onTip回调。 | 否 | 备注中类型3 | 1. 设置"空字符串"时展示问号图标 2. 设置"非空字符串"时展示问号图标&文案 3. 若不赋值或赋值为null时,不显示提示项 |
-| prefixIconType | String | 录入项前缀图标样式 "添加项" "删除项" 详见 **BrnPrefixIconType** 类 | 否 | BrnPrefixIconType.TYPE_NORMAL | 1. 不展示图标:BrnPrefixIconType.TYPE\_NORMAL 2. 展示加号图标:BrnPrefixIconType.TYPE_ADD 3. 展示减号图标:BrnPrefixIconType.TYPE\_REMOVE |
+| prefixIconType | String | 录入项前缀图标样式 "添加项" "删除项" 详见 **BrnPrefixIconType** 类 | 否 | BrnPrefixIconType.normal | 1. 不展示图标:BrnPrefixIconType.normal 2. 展示加号图标:BrnPrefixIconType.add 3. 展示减号图标:BrnPrefixIconType.remove |
| error | String | 录入项错误提示 | 否 | '' | |
| isRequire | bool | 录入项是否为必填项(展示`*`图标) 默认为 false 不必填 | 否 | false | |
| isEdit | bool | 录入项 是否可编辑 | 否 | true | true:可编辑false:禁用 |
@@ -158,7 +158,7 @@ BrnTextInputFormItem(
```dart
BrnTextInputFormItem(
controller: TextEditingController()..text = "300",
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
isEdit: true,
error: "必填项不能为空",
@@ -188,7 +188,7 @@ BrnTextInputFormItem(
```dart
BrnTextInputFormItem(
controller: TextEditingController()..text = "300",
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
isEdit: true,
title: "房屋总价",
@@ -217,7 +217,7 @@ BrnTextInputFormItem(
```dart
BrnTextInputFormItem(
controller: TextEditingController()..text = "300",
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
isEdit: false,
isPrefixIconEnabled: true,
diff --git a/docs/components/form/BrnTextQuickSelectFormItem/BrnTextQuickSelectFormItem.md b/docs/components/form/BrnTextQuickSelectFormItem/BrnTextQuickSelectFormItem.md
index cbc675e5..b174a09a 100644
--- a/docs/components/form/BrnTextQuickSelectFormItem/BrnTextQuickSelectFormItem.md
+++ b/docs/components/form/BrnTextQuickSelectFormItem/BrnTextQuickSelectFormItem.md
@@ -39,7 +39,7 @@ BrnTextQuickSelectFormItem(
this.title: "",
this.subTitle,
this.tipLabel,
- this.prefixIconType: BrnPrefixIconType.TYPE_NORMAL,
+ this.prefixIconType: BrnPrefixIconType.normal,
this.error: "",
this.isEdit: true,
this.isRequire: false,
@@ -69,14 +69,14 @@ BrnTextQuickSelectFormItem(
| **参数名** | **参数类型** | **描述** | **是否必填** | **默认值** | **备注** |
| --- | --- | --- | --- | --- | --- |
| label | String | 录入项的唯一标识,主要用于录入类型页面框架中 | 否 | 无 | |
-| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.TEXT_QUICK_SELECT_INPUT_TYPE | 外部可根据此字段判断表单项类型 |
+| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.textQuickSelectInputType | 外部可根据此字段判断表单项类型 |
| title | String | 录入项标题 | 否 | '' | |
| subTitle | String | 录入项子标题 | 否 | 无 | |
| tipLabel | String | 录入项提示(问号图标&文案) 用户点击时触发onTip回调。 | 否 | 备注中类型3 | 1. 设置"空字符串"时展示问号图标 2. 设置"非空字符串"时展示问号图标&文案 3. 若不赋值或赋值为null时,不显示提示项 |
| error | String | 录入项错误提示 | 否 | '' | |
| isRequire | bool | 录入项是否为必填项(展示`*`图标) 默认为 false 不必填 | 否 | false | |
| isEdit | bool | 录入项 是否可编辑 | 否 | true | true:可编辑false:禁用 |
-| prefixIconType | String | 录入项前缀图标样式 "添加项" "删除项" 详见 BrnPrefixIconType 类 | 否 | BrnPrefixIconType.TYPE\_NORMAL | 1. 不展示图标:BrnPrefixIconType.TYPE\_NORMAL2. 展示加号图标:BrnPrefixIconType.TYPE\_ADD3. 展示减号图标:BrnPrefixIconType.TYPE\_REMOVE |
+| prefixIconType | String | 录入项前缀图标样式 "添加项" "删除项" 详见 BrnPrefixIconType 类 | 否 | BrnPrefixIconType.normal | 1. 不展示图标:BrnPrefixIconType.normal2. 展示加号图标:BrnPrefixIconType.add3. 展示减号图标:BrnPrefixIconType.remove |
| isBtnsScroll | bool | 快捷按钮是否可滑动 | 否 | 无 | true:可滚动false:不可滚动 |
| btnsTxt | List | 按钮文案 | 否 | 无 | |
| selectBtnList | List | 按钮是否默认选中 | 否 | 无 | true:选中false:未选中 |
@@ -150,7 +150,7 @@ List options = ['选项1', '选项2', '选项3', '选项4'];
List statusAllFunctionDemo = [false, false, false, false];
BrnTextQuickSelectFormItem(
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
btnsTxt: options,
selectBtnList: statusAllFunctionDemo,
diff --git a/docs/components/form/BrnTextSelectFormItem/BrnTextSelectFormItem.md b/docs/components/form/BrnTextSelectFormItem/BrnTextSelectFormItem.md
index bf41b71b..3cfee756 100644
--- a/docs/components/form/BrnTextSelectFormItem/BrnTextSelectFormItem.md
+++ b/docs/components/form/BrnTextSelectFormItem/BrnTextSelectFormItem.md
@@ -40,7 +40,7 @@ BrnTextSelectFormItem({
this.title: "",
this.subTitle,
this.tipLabel,
- this.prefixIconType: BrnPrefixIconType.TYPE_NORMAL,
+ this.prefixIconType: BrnPrefixIconType.normal,
this.error: "",
this.isEdit: true,
this.isRequire: false,
@@ -68,7 +68,7 @@ BrnTextSelectFormItem({
| **参数名** | **参数类型** | **描述** | **是否必填** | **默认值** | **备注** |
| --- | --- | --- | --- | --- | --- |
| label | String | 录入项的唯一标识,主要用于录入类型页面框架中 | 否 | 无 | |
-| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.TEXT_SELECT_INPUT_TYPE | 外部可根据此字段判断表单项类型 |
+| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.textSelectInputType | 外部可根据此字段判断表单项类型 |
| title | String | 录入项标题 | 否 | '' | |
| subTitle | String | 录入项子标题 | 否 | 无 | |
| tipLabel | String | 录入项提示(问号图标&文案) 用户点击时触发onTip回调。 | 否 | 备注中类型3 | 1. 设置"空字符串"时展示问号图标 2. 设置"非空字符串"时展示问号图标&文案 3. 若不赋值或赋值为null时,不显示提示项 |
@@ -92,10 +92,10 @@ BrnTextSelectFormItem({
#### BrnPrefixIconType:
```dart
-class BrnPrefixIconType{
- static const String TYPE_NORMAL = "type_normal";
- static const String TYPE_ADD = "type_add";
- static const String TYPE_REMOVE = "type_remove";
+class BrnPrefixIconType {
+ static const String normal = "type_normal";
+ static const String add = "type_add";
+ static const String remove = "type_remove";
}
```
## 四、代码演示
@@ -125,7 +125,7 @@ BrnTextSelectFormItem(
![](./img/BrnTextSelectFormItemDemo2.png)
```dart
BrnTextSelectFormItem(
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
error: "必填项不能为空",
title: "证件类型",
@@ -151,7 +151,7 @@ BrnTextSelectFormItem(
```dart
BrnTextSelectFormItem(
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
title: "证件类型",
subTitle: "这里是副标题",
@@ -176,7 +176,7 @@ BrnTextSelectFormItem(
```dart
BrnTextSelectFormItem.autoLayout(
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
error: "必填项不能为空",
title: "证件类型",
diff --git a/docs/components/form/BrnTitleFormItem/BrnTitleFormItem.md b/docs/components/form/BrnTitleFormItem/BrnTitleFormItem.md
index ac2f6d85..68776bf8 100644
--- a/docs/components/form/BrnTitleFormItem/BrnTitleFormItem.md
+++ b/docs/components/form/BrnTitleFormItem/BrnTitleFormItem.md
@@ -32,7 +32,7 @@ BrnTitleFormItem(
this.title: "",
this.subTitle,
this.tipLabel,
- this.prefixIconType: BrnPrefixIconType.TYPE_NORMAL,
+ this.prefixIconType: BrnPrefixIconType.normal,
this.error: "",
this.isEdit: true,
this.isRequire: false,
@@ -53,11 +53,11 @@ BrnTitleFormItem(
| **参数名** | **参数类型** | **描述** | **是否必填** | **默认值** | **备注** |
| --- | --- | --- | --- | --- | --- |
| label | String | 录入项的唯一标识,主要用于录入类型页面框架中 | 否 | 无 | |
-| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.LABEL_TITLE | 外部可根据此字段判断表单项类型 |
+| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.labelTitle | 外部可根据此字段判断表单项类型 |
| title | String | 录入项标题 | 否 | '' | |
| subTitle | String | 录入项子标题 | 否 | 无 | |
| tipLabel | String | 录入项提示(问号图标&文案) 用户点击时触发onTip回调。 | 否 | 备注中类型3 | 1. 设置"空字符串"时展示问号图标 2. 设置"非空字符串"时展示问号图标&文案 3. 若不赋值或赋值为null时,不显示提示项 |
-| prefixIconType | String | 录入项前缀图标样式 "添加项" "删除项" 详见 **BrnPrefixIconType** 类 | 否 | BrnPrefixIconType.TYPE\_NORMAL | 1. 不展示图标:BrnPrefixIconType.TYPE\_NORMAL2. 展示加号图标:BrnPrefixIconType.TYPE\_ADD3. 展示减号图标:BrnPrefixIconType.TYPE\_REMOVE |
+| prefixIconType | String | 录入项前缀图标样式 "添加项" "删除项" 详见 **BrnPrefixIconType** 类 | 否 | BrnPrefixIconType.normal | 1. 不展示图标:BrnPrefixIconType.normal2. 展示加号图标:BrnPrefixIconType.add3. 展示减号图标:BrnPrefixIconType.remove |
| error | String | 录入项错误提示 | 否 | '' | |
| isRequire | bool | 录入项是否为必填项(展示`*`图标), 默认为 false 不必填 | 否 | false | |
| isEdit | bool | 录入项 是否可编辑 | 否 | true | true:可编辑,false:禁用 |
diff --git a/docs/components/form/BrnTitleSelectInputFormItem/BrnTitleSelectInputFormItem.md b/docs/components/form/BrnTitleSelectInputFormItem/BrnTitleSelectInputFormItem.md
index fe8f77d6..810e1cd3 100644
--- a/docs/components/form/BrnTitleSelectInputFormItem/BrnTitleSelectInputFormItem.md
+++ b/docs/components/form/BrnTitleSelectInputFormItem/BrnTitleSelectInputFormItem.md
@@ -44,7 +44,7 @@ BrnTitleSelectInputFormItem(
this.title: "",
this.subTitle,
this.tipLabel,
- this.prefixIconType: BrnPrefixIconType.TYPE_NORMAL,
+ this.prefixIconType: BrnPrefixIconType.normal,
this.error: "",
this.isEdit: true,
this.isRequire: false,
@@ -76,11 +76,11 @@ BrnTitleSelectInputFormItem(
| **参数名** | **参数类型** | **描述** | **是否必填** | **默认值** | **备注** |
| --- | --- | --- | --- | --- | --- |
| label | String | 录入项的唯一标识,主要用于录入类型页面框架中 | 否 | 无 | |
-| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType
.TEXT_INPUT_TITLE_SELECT_TYPE | 外部可根据此字段判断表单项类型 |
+| type | Stirng | 录入项类型,主要用于录入类型页面框架中 | 否 | BrnInputItemType.textInputTitleSelectType | 外部可根据此字段判断表单项类型 |
| title | String | 录入项标题 | 否 | '' | |
| subTitle | String | 录入项子标题 | 否 | 无 | |
| tipLabel | String | 录入项提示(问号图标&文案) 用户点击时触发onTip回调。 | 否 | 备注中类型3 | 1. 设置"空字符串"时展示问号图标 2. 设置"非空字符串"时展示问号图标&文案 3. 若不赋值或赋值为null时,不显示提示项 |
-| prefixIconType | String | 录入项前缀图标样式 "添加项" "删除项" 详见 **BrnPrefixIconType** 类 | 否 | BrnPrefixIconType.TYPE_NORMAL | 1. 不展示图标:BrnPrefixIconType.TYPE_NORMAL 2. 展示加号图标:BrnPrefixIconType.TYPE_ADD 3. 展示减号图标:BrnPrefixIconType.TYPE_REMOVE |
+| prefixIconType | String | 录入项前缀图标样式 "添加项" "删除项" 详见 **BrnPrefixIconType** 类 | 否 | BrnPrefixIconType.normal | 1. 不展示图标:BrnPrefixIconType.normal 2. 展示加号图标:BrnPrefixIconType.add 3. 展示减号图标:BrnPrefixIconType.remove |
| error | String | 录入项错误提示 | 否 | '' | |
| isRequire | bool | 录入项是否为必填项(展示`*`图标) 默认为 false 不必填 | 否 | false | |
| isPrefixIconEnabled | bool | 录入项不可编辑时(isEdit: false) "+"、"-"号是否可点击,true: 可点击回调false: 不可点击回调 | 否 | false | |
@@ -104,9 +104,9 @@ BrnTitleSelectInputFormItem(
```dart
class BrnPrefixIconType {
- static const String TYPE_NORMAL = "type_normal";
- static const String TYPE_ADD = "type_add";
- static const String TYPE_REMOVE = "type_remove";
+ static const String normal = "type_normal";
+ static const String add = "type_add";
+ static const String remove = "type_remove";
}
```
@@ -114,15 +114,15 @@ class BrnPrefixIconType {
```dart
class BrnInputType {
- static const String TEXT = "text";
- static const String MULTI_LINE = "multiline";
- static const String NUMBER = "number";
- static const String DECIMAL = "decimal";
- static const String PHONE = "phone";
- static const String DATE = "datetime";
- static const String EMAIL = "emailAddress";
- static const String URL = "url";
- static const String PWD = "visiblePassword";
+ static const String text = "text";
+ static const String multiLine = "multiline";
+ static const String number = "number";
+ static const String decimal = "decimal";
+ static const String phone = "phone";
+ static const String date = "datetime";
+ static const String email = "emailAddress";
+ static const String url = "url";
+ static const String pwd = "visiblePassword";
}
```
@@ -174,7 +174,7 @@ _list.add('手机号');
_list.add('座机');
BrnTitleSelectInputFormItem(
controller: TextEditingController()..text = "124",
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
isEdit: false,
error: "必填项不能为空",
diff --git a/docs/components/picker/BrnMultiColumnPicker/BrnMultiColumnPicker.md b/docs/components/picker/BrnMultiColumnPicker/BrnMultiColumnPicker.md
index 23bba47b..0781a113 100644
--- a/docs/components/picker/BrnMultiColumnPicker/BrnMultiColumnPicker.md
+++ b/docs/components/picker/BrnMultiColumnPicker/BrnMultiColumnPicker.md
@@ -58,9 +58,9 @@ BrnMultiColumnPicker(
```dart
enum PickerFilterType {
- None, //未设置
- Radio, //单选项,对应 type 为 radio
- Checkbox, //多选项,对应 type 为 checkbox
+ none, //未设置
+ radio, //单选项,对应 type 为 radio
+ checkbox, //多选项,对应 type 为 checkbox
}
```
diff --git a/docs/components/selection/BrnSelectionView/BrnSelectionView.md b/docs/components/selection/BrnSelectionView/BrnSelectionView.md
index 3ce81f6d..8e84a036 100644
--- a/docs/components/selection/BrnSelectionView/BrnSelectionView.md
+++ b/docs/components/selection/BrnSelectionView/BrnSelectionView.md
@@ -107,40 +107,40 @@ BrnSelectionView(
```dart
enum BrnSelectionFilterType {
/// 未设置
- None,
+ none,
/// 不限类型
- UnLimit,
+ unLimit,
/// 单选列表、单选项 type 为 radio
- Radio,
+ radio,
/// 多选列表、多选项 type 为 checkbox
- Checkbox,
+ checkbox,
/// 一般的值范围自定义区间 type 为 range
- Range,
+ range,
/// 日期选择,普通筛选时使用 CalendarView 展示选择时间,更多情况下使用 DatePicker 选择时间
- Date,
+ date,
/// 自定义选择日期区间, type 为 dateRange
- DateRange,
+ dateRange,
/// 自定义通过 Calendar 选择日期区间,type 为 dateRangeCalendar
- DateRangeCalendar,
+ dateRangeCalendar,
/// 标签筛选 type 为 customerTag
- CustomHandle,
+ customHandle,
/// 更多列表、多选项 无 type
- More,
+ more,
/// 去二级页面
- Layer,
+ layer,
/// 去自定义二级页面
- CustomLayer,
+ customLayer,
}
```
@@ -165,8 +165,8 @@ enum BrnSelectionFilterType {
```dart
enum SelectionWindowType {
- List, //列表类型筛选弹窗,使用列表展示。
- Range, //标签类型筛选弹窗,使用 Tag + Range 的方式展示
+ list, //列表类型筛选弹窗,使用列表展示。
+ range, //标签类型筛选弹窗,使用 Tag + Range 的方式展示
}
```
diff --git a/docs/sketch.md b/docs/sketch.md
index 03d90a2f..81ef8b53 100644
--- a/docs/sketch.md
+++ b/docs/sketch.md
@@ -2,24 +2,24 @@
order: 4
---
-# Sketch 设计指南
+# Sketch 设计指引
阅读本章内容你将学到如何使用 Bruno 配套的 Sketch 文件快速设计页面,并通过定制化标注插件导出可识别组件的设计稿。
-在开始之前需要先从 Bruno 主页下载 [UI 资源文件](https://bruno.ke.com:3008/download/sketch),得到 Sketch 文件和定制标注插件。
+在开始之前需要先从 Bruno 主页下载 [UI 资源文件](https://bruno.ke.com/download/sketch),得到 Sketch 文件和定制标注插件。
## 第一部分 安装插件&选取所需组件
-
+
## 第二部分 关于组件的解绑与使用
-
+
## 第三部分 配合 Sketch 插件导出设计稿
-
+
## 第四部分 查看标注中引用的组件信息
-
+
diff --git a/example/ios/Podfile b/example/ios/Podfile
index b30a428b..ff7ef5e8 100644
--- a/example/ios/Podfile
+++ b/example/ios/Podfile
@@ -10,81 +10,32 @@ project 'Runner', {
'Release' => :release,
}
-def parse_KV_file(file, separator='=')
- file_abs_path = File.expand_path(file)
- if !File.exists? file_abs_path
- return [];
+def flutter_root
+ generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
+ unless File.exist?(generated_xcode_build_settings_path)
+ raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
- generated_key_values = {}
- skip_line_start_symbols = ["#", "/"]
- File.foreach(file_abs_path) do |line|
- next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
- plugin = line.split(pattern=separator)
- if plugin.length == 2
- podname = plugin[0].strip()
- path = plugin[1].strip()
- podpath = File.expand_path("#{path}", file_abs_path)
- generated_key_values[podname] = podpath
- else
- puts "Invalid plugin specification: #{line}"
- end
+
+ File.foreach(generated_xcode_build_settings_path) do |line|
+ matches = line.match(/FLUTTER_ROOT\=(.*)/)
+ return matches[1].strip if matches
end
- generated_key_values
+ raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
+require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
+
+flutter_ios_podfile_setup
+
target 'Runner' do
use_frameworks!
use_modular_headers!
-
- # Flutter Pod
- copied_flutter_dir = File.join(__dir__, 'Flutter')
- copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
- copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
- unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path)
- # Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet.
- # That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration.
- # CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.
-
- generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig')
- unless File.exist?(generated_xcode_build_settings_path)
- raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first"
- end
- generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path)
- cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR'];
-
- unless File.exist?(copied_framework_path)
- FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)
- end
- unless File.exist?(copied_podspec_path)
- FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir)
- end
- end
-
- # Keep pod path relative so it can be checked into Podfile.lock.
- pod 'Flutter', :path => 'Flutter'
-
- # Plugin Pods
-
- # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
- # referring to absolute paths on developers' machines.
- system('rm -rf .symlinks')
- system('mkdir -p .symlinks/plugins')
- plugin_pods = parse_KV_file('../.flutter-plugins')
- plugin_pods.each do |name, path|
- symlink = File.join('.symlinks', 'plugins', name)
- File.symlink(path, symlink)
- pod name, :path => File.join(symlink, 'ios')
- end
+ flutter_install_all_ios_pods(File.dirname(File.realpath(__FILE__)))
end
-# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
-install! 'cocoapods', :disable_input_output_paths => true
-
post_install do |installer|
installer.pods_project.targets.each do |target|
- target.build_configurations.each do |config|
- config.build_settings['ENABLE_BITCODE'] = 'NO'
- end
+ flutter_additional_ios_build_settings(target)
end
end
diff --git a/example/lib/main.dart b/example/lib/main.dart
index 202b0652..dff77517 100644
--- a/example/lib/main.dart
+++ b/example/lib/main.dart
@@ -1,3 +1,5 @@
+
+
import 'package:example/sample/home/home.dart';
import 'package:flutter/material.dart';
diff --git a/example/lib/sample/components/actionsheet/actionsheet_entry_page.dart b/example/lib/sample/components/actionsheet/actionsheet_entry_page.dart
index c98f8c16..25b1c8c6 100644
--- a/example/lib/sample/components/actionsheet/actionsheet_entry_page.dart
+++ b/example/lib/sample/components/actionsheet/actionsheet_entry_page.dart
@@ -1,3 +1,5 @@
+
+
import 'dart:async';
import 'package:bruno/bruno.dart';
@@ -121,7 +123,7 @@ class _ActionSheetEntryPageState extends State {
}
void _showCommonStyle(BuildContext context) {
- List actions = List();
+ List actions = [];
actions.add(BrnCommonActionSheetItem(
'选项一(警示项)',
desc: '辅助信息辅助信息辅助信息',
@@ -156,7 +158,7 @@ class _ActionSheetEntryPageState extends State {
}
void _showCommonStylex(){
- List actions = List();
+ List actions = [];
// 构建标题+辅助信息的普通项
actions.add(BrnCommonActionSheetItem(
'选项一(警示项)',
@@ -191,7 +193,7 @@ class _ActionSheetEntryPageState extends State {
}
void _showCommonStyle1(BuildContext context) {
- List actions = List();
+ List actions = [];
actions.add(BrnCommonActionSheetItem(
'选项一(警示项)',
actionStyle: BrnCommonActionSheetItemStyle.alert,
@@ -224,7 +226,7 @@ class _ActionSheetEntryPageState extends State {
}
void _showCommonStyle2(BuildContext context) {
- List actions = List();
+ List actions = [];
actions.add(BrnCommonActionSheetItem(
'选项一: (010)1234567',
actionStyle: BrnCommonActionSheetItemStyle.link,
@@ -258,7 +260,7 @@ class _ActionSheetEntryPageState extends State {
}
void _showCommonCustomStyle(BuildContext context) {
- List actions = List();
+ List actions =[];
actions.add(
BrnCommonActionSheetItem(
'选项一: 自定义主标题样式',
@@ -332,8 +334,8 @@ class _ActionSheetEntryPageState extends State {
// 用于控制timer只加载一次
var started = false;
// 计时器
- var periodTimer;
- List actions = List();
+ late Timer periodTimer;
+ List actions = [];
actions.add(BrnCommonActionSheetItem(
'倒计时:$countdown',
actionStyle: BrnCommonActionSheetItemStyle.alert,
@@ -367,7 +369,7 @@ class _ActionSheetEntryPageState extends State {
actions[0].desc = '倒计时:$times';
});
} else if (countdown == 0) {
- periodTimer.onCancel();
+ periodTimer.cancel();
}
});
}
@@ -378,7 +380,7 @@ class _ActionSheetEntryPageState extends State {
BrnCommonActionSheetItem actionEle,
) {
// 点击后立即停止计时
- periodTimer.onCancel();
+ periodTimer.cancel();
var title = actionEle.title;
BrnToast.show("title: $title, index: $index", context);
},
@@ -386,38 +388,38 @@ class _ActionSheetEntryPageState extends State {
});
// then用来在pop折后停止timer,如果不需要在pop后进行操作,不需要使用then
}).then((value) {
- periodTimer.onCancel();
+ periodTimer.cancel();
});
}
void _showShareSevenStyle(BuildContext context) {
- List firstRowList = List();
+ List firstRowList = [];
firstRowList.add(BrnShareItem(
- BrnShareItemConstants.SHARE_WEIXIN,
+ BrnShareItemConstants.shareWeiXin,
canClick: true,
));
firstRowList.add(BrnShareItem(
- BrnShareItemConstants.SHARE_BROWSER,
+ BrnShareItemConstants.shareBrowser,
canClick: true,
));
firstRowList.add(BrnShareItem(
- BrnShareItemConstants.SHARE_COPY_LINK,
+ BrnShareItemConstants.shareCopyLink,
canClick: true,
));
firstRowList.add(BrnShareItem(
- BrnShareItemConstants.SHARE_FRIEND,
+ BrnShareItemConstants.shareFriend,
canClick: true,
));
firstRowList.add(BrnShareItem(
- BrnShareItemConstants.SHARE_LINK,
+ BrnShareItemConstants.shareLink,
canClick: true,
));
firstRowList.add(BrnShareItem(
- BrnShareItemConstants.SHARE_QQ,
+ BrnShareItemConstants.shareQQ,
canClick: true,
));
firstRowList.add(BrnShareItem(
- BrnShareItemConstants.SHARE_CUSTOM,
+ BrnShareItemConstants.shareCustom,
customImage: BrunoTools.getAssetImage("images/icon_custom_share.png"),
customTitle: "自定义",
canClick: true,
@@ -434,38 +436,38 @@ class _ActionSheetEntryPageState extends State {
}
void _showShareFourStyle(BuildContext context) {
- List firstRowList = List();
- List secondRowList = List();
+ List firstRowList = [];
+ List secondRowList = [];
firstRowList.add(BrnShareItem(
- BrnShareItemConstants.SHARE_QZONE,
+ BrnShareItemConstants.shareQZone,
canClick: true,
));
firstRowList.add(BrnShareItem(
- BrnShareItemConstants.SHARE_SAVE_IMAGE,
+ BrnShareItemConstants.shareSaveImage,
canClick: true,
));
firstRowList.add(BrnShareItem(
- BrnShareItemConstants.SHARE_SMS,
+ BrnShareItemConstants.shareSms,
canClick: true,
));
firstRowList.add(BrnShareItem(
- BrnShareItemConstants.SHARE_WEIBO,
+ BrnShareItemConstants.shareWeiBo,
canClick: true,
));
secondRowList.add(BrnShareItem(
- BrnShareItemConstants.SHARE_QZONE,
+ BrnShareItemConstants.shareQZone,
canClick: false,
));
secondRowList.add(BrnShareItem(
- BrnShareItemConstants.SHARE_SAVE_IMAGE,
+ BrnShareItemConstants.shareSaveImage,
canClick: false,
));
secondRowList.add(BrnShareItem(
- BrnShareItemConstants.SHARE_SMS,
+ BrnShareItemConstants.shareSms,
canClick: false,
));
secondRowList.add(BrnShareItem(
- BrnShareItemConstants.SHARE_WEIBO,
+ BrnShareItemConstants.shareWeiBo,
canClick: false,
));
BrnShareActionSheet actionSheet = new BrnShareActionSheet(
@@ -488,18 +490,18 @@ class _ActionSheetEntryPageState extends State {
}
void _showShareThreeStyle(BuildContext context) {
- List firstRowList = List();
- List secondRowList = List();
+ List firstRowList = [];
+ List secondRowList =[];
firstRowList.add(BrnShareItem(
- BrnShareItemConstants.SHARE_WEIXIN,
+ BrnShareItemConstants.shareWeiXin,
canClick: true,
));
firstRowList.add(BrnShareItem(
- BrnShareItemConstants.SHARE_FRIEND,
+ BrnShareItemConstants.shareFriend,
canClick: true,
));
secondRowList.add(BrnShareItem(
- BrnShareItemConstants.SHARE_CUSTOM,
+ BrnShareItemConstants.shareCustom,
customImage: BrunoTools.getAssetImage("images/icon_custom_share.png"),
customTitle: "自定义",
canClick: true,
@@ -516,13 +518,13 @@ class _ActionSheetEntryPageState extends State {
}
void _showShareTwoStyle(BuildContext context) {
- List firstRowList = List();
+ List firstRowList = [];
firstRowList.add(BrnShareItem(
- BrnShareItemConstants.SHARE_WEIXIN,
+ BrnShareItemConstants.shareWeiXin,
canClick: true,
));
firstRowList.add(BrnShareItem(
- BrnShareItemConstants.SHARE_FRIEND,
+ BrnShareItemConstants.shareFriend,
canClick: true,
));
BrnShareActionSheet actionSheet = new BrnShareActionSheet(
diff --git a/example/lib/sample/components/actionsheet/actionsheet_selected_list_custom_example.dart b/example/lib/sample/components/actionsheet/actionsheet_selected_list_custom_example.dart
index d018de8a..283dc591 100644
--- a/example/lib/sample/components/actionsheet/actionsheet_selected_list_custom_example.dart
+++ b/example/lib/sample/components/actionsheet/actionsheet_selected_list_custom_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -9,10 +11,10 @@ class SelectedListActionSheetCustomExamplePage extends StatefulWidget {
class SelectedListActionSheetCustomExamplePageState
extends State {
- BrnSelectedListActionSheetController controller;
+ late BrnSelectedListActionSheetController controller;
var _bottomActionKey = GlobalKey();
- List _data;
+ List? _data;
@override
void initState() {
@@ -51,18 +53,18 @@ class SelectedListActionSheetCustomExamplePageState
key: _bottomActionKey,
mainButtonName: 'BrnBottomButtonPanel',
mainButtonOnTap: () {
- BrnToast.show('确定!sheet 的数据源长度 ${_data.length}', context);
+ BrnToast.show('确定!sheet 的数据源长度 ${_data!.length}', context);
},
iconButtonList: [
BrnVerticalIconButton(
- name: '已选(${_data.length})',
+ name: '已选(${_data!.length})',
iconWidget: BrunoTools.getAssetImage(
'icons/grey_place_holder.png'),
onTap: () {
if (!controller.isHidden) {
controller.dismiss();
} else {
- if (_data == null || _data.length <= 0) {
+ if (_data == null || _data!.length <= 0) {
BrnToast.show('数据为空,弹窗不展示', context);
return;
}
@@ -70,12 +72,12 @@ class SelectedListActionSheetCustomExamplePageState
context: context,
isClearButtonHidden: false,
isDeleteButtonHidden: true,
- items: _data,
+ items: _data!,
bottomOffset: 82,
maxHeight: 400,
controller: controller,
title: '自定义行视图例子',
- itemTitleBuilder: (int index, String entity) {
+ itemTitleBuilder: (int index, String? entity) {
return Material(
child: BrnStepInputFormItem(
title: 'BrnStepInputFormItemWidget',
@@ -100,7 +102,7 @@ class SelectedListActionSheetCustomExamplePageState
cancel: '取消',
confirm: '确定', onConfirm: () {
setState(() {});
- _data.clear();
+ _data!.clear();
}, onCancel: () {});
})
.showWithTargetKey(
diff --git a/example/lib/sample/components/actionsheet/actionsheet_selected_list_example.dart b/example/lib/sample/components/actionsheet/actionsheet_selected_list_example.dart
index e4d14f88..9dd1c195 100644
--- a/example/lib/sample/components/actionsheet/actionsheet_selected_list_example.dart
+++ b/example/lib/sample/components/actionsheet/actionsheet_selected_list_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -8,21 +10,18 @@ class SelectedListActionSheetExamplePage extends StatefulWidget {
class SelectedListActionSheetExamplePageState
extends State {
- BrnSelectedListActionSheetController controller;
- List _data;
+ late BrnSelectedListActionSheetController controller;
+ List _data = [
+ '1. 可以只指定要显示的文案,后边的 delete icon 是组件自带',
+ '2. delete icon 可以控制全部显示或者隐藏,但不支持某一行独立控制',
+ '3. 每一行的视图支持完全自定义',
+ '4. 如果要刷新列表,请调用 controller 调用 reloadData() 方法 ',
+ '5. 该例子中,点击最后一行的删除图表,可以更新当前行的文案'
+ ];
@override
void initState() {
- _data = [
- '1. 可以只指定要显示的文案,后边的 delete icon 是组件自带',
- '2. delete icon 可以控制全部显示或者隐藏,但不支持某一行独立控制',
- '3. 每一行的视图支持完全自定义',
- '4. 如果要刷新列表,请调用 controller 调用 reloadData() 方法 ',
- '5. 该例子中,点击最后一行的删除图表,可以更新当前行的文案'
- ];
-
controller = BrnSelectedListActionSheetController();
-
super.initState();
}
@@ -65,7 +64,7 @@ class SelectedListActionSheetExamplePageState
if (!controller.isHidden) {
controller.dismiss();
} else {
- if (_data == null || _data.length <= 0) {
+ if ( _data.length <= 0) {
BrnToast.show('数据为空,弹窗不展示', context);
return;
}
@@ -90,7 +89,7 @@ class SelectedListActionSheetExamplePageState
),
),
),
- itemTitleBuilder: (int index, String entity) {
+ itemTitleBuilder: (int index, String? entity) {
return entity;
},
onClear: () {
diff --git a/example/lib/sample/components/appraise/appraise_example.dart b/example/lib/sample/components/appraise/appraise_example.dart
index c092d228..8cb7791d 100644
--- a/example/lib/sample/components/appraise/appraise_example.dart
+++ b/example/lib/sample/components/appraise/appraise_example.dart
@@ -67,7 +67,7 @@ class _AppraiseExampleState extends State {
BrnAppraise(
title: "这里是标题文字",
headerType: BrnAppraiseHeaderType.center,
- type: BrnAppraiseType.Star,
+ type: BrnAppraiseType.star,
tags: tags,
inputHintText: '这里是文本输入的组件',
iconDescriptions: [
@@ -80,6 +80,7 @@ class _AppraiseExampleState extends State {
config: BrnAppraiseConfig(
showConfirmButton: false,
starAppraiseHint: '星星未选择时的文案',
+ inputDefaultText: '这是一段默认文字',
inputTextChangeCallback: (input) {
BrnToast.show('输入的内容为' + input, context);
},
@@ -171,7 +172,7 @@ class _AppraiseExampleState extends State {
},
///必须传入5个字符串,没有的位置传''
- type: BrnAppraiseType.Emoji,
+ type: BrnAppraiseType.emoji,
iconDescriptions: ['很差', '', '可以', '', '非常好'],
config: BrnAppraiseConfig(
indexes: [0, 2, 4], titleMaxLines: 3),
@@ -205,7 +206,7 @@ class _AppraiseExampleState extends State {
showToast(index, list, input, context);
Navigator.pop(context);
},
- type: BrnAppraiseType.Star,
+ type: BrnAppraiseType.star,
iconDescriptions: ['很差', '不行', '可以', '好'],
config: BrnAppraiseConfig(
showTextInput: false,
@@ -228,10 +229,10 @@ class _AppraiseExampleState extends State {
void showToast(int index, List selectedTags, String input,
BuildContext context) {
String str = '选中的评价为$index';
- if (selectedTags?.isNotEmpty ?? false) {
+ if (selectedTags.isNotEmpty) {
str = str + ',选中的标签为:' + selectedTags.toString();
}
- if (input?.isNotEmpty ?? false) {
+ if (input.isNotEmpty) {
str = str + ',输入的内容为:' + input;
}
BrnToast.show(str, context);
diff --git a/example/lib/sample/components/bottom_tabbar/bottom_tabbar_example.dart b/example/lib/sample/components/bottom_tabbar/bottom_tabbar_example.dart
index c63100a0..5cadf9f9 100644
--- a/example/lib/sample/components/bottom_tabbar/bottom_tabbar_example.dart
+++ b/example/lib/sample/components/bottom_tabbar/bottom_tabbar_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -23,7 +25,7 @@ class BottomTabbarExampleState extends State with SingleTic
int _selectedIndexTest3 = 0;
/// 未读消息数量
- String badgeNo1;
+ String badgeNo1 = '100';
/// title数组
var titles = ['One', 'Two', 'Three', 'Four', 'Five', 'Six'];
@@ -38,14 +40,6 @@ class BottomTabbarExampleState extends State with SingleTic
Icons.star
];
- @override
- void initState() {
- super.initState();
-
- /// 初始化某个未读消息的数量
- badgeNo1 = '100';
- }
-
/// 选中状态时state设置
void _onItemSelected(int index) {
setState(() {
diff --git a/example/lib/sample/components/button/common_collection_example.dart b/example/lib/sample/components/button/common_collection_example.dart
index 249d6bd0..da249615 100644
--- a/example/lib/sample/components/button/common_collection_example.dart
+++ b/example/lib/sample/components/button/common_collection_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -250,7 +252,7 @@ class BrnCommonBottomExample extends StatelessWidget {
],
),
Text(
- '异常案例:按钮文本长为0',
+ '异常案例:按钮文本长为空串',
style: TextStyle(
color: Color(0xFF222222),
fontSize: 28,
diff --git a/example/lib/sample/components/button/selection_collection_example.dart b/example/lib/sample/components/button/selection_collection_example.dart
index 40bcbe64..42723669 100644
--- a/example/lib/sample/components/button/selection_collection_example.dart
+++ b/example/lib/sample/components/button/selection_collection_example.dart
@@ -7,13 +7,8 @@ class BrnSelectionBottomButtonExample extends StatefulWidget {
}
class _BrnSelectionBottomButtonExampleState extends State {
- BrnMultipleBottomController controller;
- @override
- void initState() {
- super.initState();
- controller = BrnMultipleBottomController();
- }
+ BrnMultipleBottomController controller = BrnMultipleBottomController();
@override
Widget build(BuildContext context) {
diff --git a/example/lib/sample/components/calendar/calendarview_example.dart b/example/lib/sample/components/calendar/calendarview_example.dart
index 26e4178e..25e9f568 100644
--- a/example/lib/sample/components/calendar/calendarview_example.dart
+++ b/example/lib/sample/components/calendar/calendarview_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -56,69 +58,66 @@ class TagViewExamplePageState extends State {
}
Widget _calendarViewWeekNocontroll(context) {
- return BrnCalendarView(
- displayMode: DisplayMode.Week,
- selectMode: SelectMode.SINGLE,
+ return BrnCalendarView.single(
+ displayMode: DisplayMode.week,
showControllerBar: false,
- startEndDateChange: (startDate, endDate) {
- BrnToast.show('开始时间: $startDate , 结束时间:$endDate', context);
+ dateChange: (date) {
+ BrnToast.show('选中的时间: $date', context);
},
);
}
Widget _calendarViewWeekNocontrollCustomWeekName(context) {
- return BrnCalendarView(
- displayMode: DisplayMode.Week,
- selectMode: SelectMode.SINGLE,
+ return BrnCalendarView.single(
+ displayMode: DisplayMode.week,
showControllerBar: false,
weekNames: ['星期天', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
- startEndDateChange: (startDate, endDate) {
- BrnToast.show('开始时间: $startDate , 结束时间:$endDate', context);
+ dateChange: (date) {
+ BrnToast.show('选中的时间: $date', context);
},
);
}
Widget _calendarViewWeek(context) {
- return BrnCalendarView(
- displayMode: DisplayMode.Week,
+ return BrnCalendarView.single(
+ displayMode: DisplayMode.week,
initDisplayDate: DateTime.parse('2020-06-01'),
minDate: DateTime(2020),
maxDate: DateTime(2021),
- startEndDateChange: (startDate, endDate) {
- BrnToast.show('开始时间: $startDate , 结束时间:$endDate', context);
+ dateChange: (date) {
+ BrnToast.show('选中的时间: $date', context);
},
);
}
Widget _calendarViewWeekRange(context) {
- return BrnCalendarView(
- displayMode: DisplayMode.Week,
- selectMode: SelectMode.RANGE,
- startEndDateChange: (startDate, endDate) {
- BrnToast.show('开始时间: $startDate , 结束时间:$endDate', context);
+ return BrnCalendarView.range(
+ displayMode: DisplayMode.week,
+ rangeDateChange: (rangeDate) {
+ BrnToast.show(
+ '开始时间: ${rangeDate.start} , 结束时间:${rangeDate.end}', context);
},
);
}
Widget _calendarViewMonth(context) {
- return BrnCalendarView(
- selectMode: SelectMode.SINGLE,
+ return BrnCalendarView.single(
initDisplayDate: DateTime.parse('2020-06-01'),
minDate: DateTime(2020),
maxDate: DateTime(2021),
- startEndDateChange: (startDate, endDate) {
- BrnToast.show('开始时间: $startDate , 结束时间:$endDate', context);
+ dateChange: (date) {
+ BrnToast.show('选中的时间: $date', context);
},
);
}
Widget _calendarViewMonthRange(context) {
- return BrnCalendarView(
- selectMode: SelectMode.RANGE,
+ return BrnCalendarView.range(
minDate: DateTime(2020),
maxDate: DateTime(2023),
- startEndDateChange: (startDate, endDate) {
- BrnToast.show('开始时间: $startDate , 结束时间:$endDate', context);
+ rangeDateChange: (rangeDate) {
+ BrnToast.show(
+ '开始时间: ${rangeDate.start} , 结束时间:${rangeDate.end}', context);
},
);
}
diff --git a/example/lib/sample/components/card/brn_shadow_example.dart b/example/lib/sample/components/card/brn_shadow_example.dart
index 679166c7..8579a95a 100644
--- a/example/lib/sample/components/card/brn_shadow_example.dart
+++ b/example/lib/sample/components/card/brn_shadow_example.dart
@@ -1,3 +1,5 @@
+
+
import 'dart:math';
import 'package:bruno/bruno.dart';
@@ -9,14 +11,6 @@ class BrnShadowExample extends StatefulWidget {
}
class _BrnShadowExampleState extends State {
- int count;
-
- @override
- void initState() {
- super.initState();
- count = 0;
- }
-
@override
Widget build(BuildContext context) {
return Scaffold(
diff --git a/example/lib/sample/components/card/bubble/brn_expanded_bubble_example.dart b/example/lib/sample/components/card/bubble/brn_expanded_bubble_example.dart
index 1c8754c0..46b50a47 100644
--- a/example/lib/sample/components/card/bubble/brn_expanded_bubble_example.dart
+++ b/example/lib/sample/components/card/bubble/brn_expanded_bubble_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -38,7 +40,7 @@ class BrnBubbleExample2 extends StatelessWidget {
maxLines: 2,
text: '推荐理由:“满五唯一”“临近地铁”“首付低”,多出折行显示,文字展开的样式文式文文字展开的样式文式文。问我',
onExpanded: (isExpanded){
- String str = isExpanded?"展开了":"收起了";
+ String str = isExpanded ? "展开了" : "收起了";
BrnToast.show("我$str", context);
},
),
diff --git a/example/lib/sample/components/card/bubble/bubble_entry_page.dart b/example/lib/sample/components/card/bubble/bubble_entry_page.dart
index 550304cc..66346dcd 100644
--- a/example/lib/sample/components/card/bubble/bubble_entry_page.dart
+++ b/example/lib/sample/components/card/bubble/bubble_entry_page.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:example/sample/components/card/bubble/common_bubble_example.dart';
import 'package:example/sample/components/card/bubble/brn_expanded_bubble_example.dart';
diff --git a/example/lib/sample/components/card/bubble/common_bubble_example.dart b/example/lib/sample/components/card/bubble/common_bubble_example.dart
index 86532787..0468c77a 100644
--- a/example/lib/sample/components/card/bubble/common_bubble_example.dart
+++ b/example/lib/sample/components/card/bubble/common_bubble_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
diff --git a/example/lib/sample/components/card/content/brn_two_rich_content_example.dart b/example/lib/sample/components/card/content/brn_two_rich_content_example.dart
index fc9c112d..36f082ef 100644
--- a/example/lib/sample/components/card/content/brn_two_rich_content_example.dart
+++ b/example/lib/sample/components/card/content/brn_two_rich_content_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
diff --git a/example/lib/sample/components/card/content/brn_two_text_content_example.dart b/example/lib/sample/components/card/content/brn_two_text_content_example.dart
index 3f011d6e..19ecbdff 100644
--- a/example/lib/sample/components/card/content/brn_two_text_content_example.dart
+++ b/example/lib/sample/components/card/content/brn_two_text_content_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
diff --git a/example/lib/sample/components/card/content/keyvalue_align_content_example.dart b/example/lib/sample/components/card/content/keyvalue_align_content_example.dart
index 57527374..d959c039 100644
--- a/example/lib/sample/components/card/content/keyvalue_align_content_example.dart
+++ b/example/lib/sample/components/card/content/keyvalue_align_content_example.dart
@@ -1,3 +1,5 @@
+
+
import 'dart:math';
import 'package:bruno/bruno.dart';
@@ -9,7 +11,7 @@ class TextContentExample extends StatefulWidget {
}
class _TextContentExampleState extends State {
- List list;
+ late List list;
@override
void initState() {
@@ -23,7 +25,7 @@ class _TextContentExampleState extends State {
BrnInfoModal(keyPart: "名称名称名:", valuePart: "内容内容内容内容内容"),
BrnInfoModal(keyPart: "名称名称名称名称:", valuePart: "内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容"),
BrnInfoModal.valueLastClickInfo("名称名:", '内容内容内容内容内容', '可点击内容', clickCallback: (text) {
- BrnToast.show(text, context);
+ BrnToast.show(text!, context);
})
];
}
@@ -231,7 +233,7 @@ class _TextContentExampleState extends State {
keyPart: "名称名称名称名称:", valuePart: "内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容"),
BrnInfoModal.valueLastClickInfo("名称名:", '11111111', '22222222',
clickCallback: (text) {
- BrnToast.show(text, context);
+ BrnToast.show(text!, context);
}),
],
),
@@ -257,7 +259,7 @@ class _TextContentExampleState extends State {
keyPart: "名称名称名称名称:", valuePart: "内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容"),
BrnInfoModal.valueLastClickInfo("名称名:", '内容内容内容内容内容', '可点击内容',
clickCallback: (text) {
- BrnToast.show(text, context);
+ BrnToast.show(text!, context);
}),
],
),
@@ -301,7 +303,7 @@ class _TextContentExampleState extends State {
),
Transform.rotate(
angle: pi,
- child: BrunoTools.getAssetImage('icons/icon_uparrow.png')),
+ child: BrunoTools.getAssetImage('icons/icon_up_arrow.png')),
],
),
decoration: BoxDecoration(
@@ -381,7 +383,7 @@ class _TextContentExampleState extends State {
BrnInfoModal(keyPart: "名称名称名:", valuePart: "内容内容内容内容内容"),
BrnInfoModal.valueLastClickInfo("名称十分的长名称十分的长名称十分的长名称十分的长:", '内容内容内容内容内容', '可点击内容',
clickCallback: (text) {
- BrnToast.show(text, context);
+ BrnToast.show(text!, context);
}),
],
),
@@ -401,7 +403,7 @@ class _TextContentExampleState extends State {
BrnInfoModal.valueLastClickInfo(
"名称十分的长名称十分的长名称十分的长名称十分的长:", '内容内容内容内容内容', '可点击内容可点击内容可点击内容可点击内容可点击内容可点击内容',
clickCallback: (text) {
- BrnToast.show(text, context);
+ BrnToast.show(text!, context);
}),
],
),
diff --git a/example/lib/sample/components/card/content/keyvalue_close_content_example.dart b/example/lib/sample/components/card/content/keyvalue_close_content_example.dart
index acf2022c..2d6d8053 100644
--- a/example/lib/sample/components/card/content/keyvalue_close_content_example.dart
+++ b/example/lib/sample/components/card/content/keyvalue_close_content_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -62,7 +64,7 @@ class _KeyTextCloseContentExampleState extends State
BrnInfoModal(keyPart: "名称名称名:", valuePart: "内容内容内容内容内容"),
BrnInfoModal.valueLastClickInfo("名称名:", '内容内容内容内容内容', '可点击内容',
clickCallback: (text) {
- BrnToast.show(text, context);
+ BrnToast.show(text!, context);
}),
],
),
@@ -132,12 +134,12 @@ class _KeyTextCloseContentExampleState extends State
"内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内"),
BrnInfoModal.valueLastClickInfo("名称十分的长名:", '内容内容内容内容内容', '可点击内容可点击内容可点击内容可点击内容',
clickCallback: (text) {
- BrnToast.show(text, context);
+ BrnToast.show(text!, context);
}),
BrnInfoModal.valueLastClickInfo(
"名称十分的长名:", '内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容', '可点击内容可点击内容可点击内容可点击内容',
clickCallback: (text) {
- BrnToast.show(text, context);
+ BrnToast.show(text!, context);
}),
],
),
diff --git a/example/lib/sample/components/card/content/number_item_example.dart b/example/lib/sample/components/card/content/number_item_example.dart
index 552ee602..f1a4df94 100644
--- a/example/lib/sample/components/card/content/number_item_example.dart
+++ b/example/lib/sample/components/card/content/number_item_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -60,7 +62,7 @@ class _NumberItemRowExampleState extends State {
number: '3',
preDesc: '前',
lastDesc: '后',
- numberInfoIcon: BrnNumberInfoIcon.ARROW,
+ numberInfoIcon: BrnNumberInfoIcon.arrow,
iconTapCallBack: (data) {}),
],
),
@@ -79,9 +81,9 @@ class _NumberItemRowExampleState extends State {
number: '3',
preDesc: '前',
lastDesc: '后',
- numberInfoIcon: BrnNumberInfoIcon.ARROW,
+ numberInfoIcon: BrnNumberInfoIcon.arrow,
iconTapCallBack: (data) {
- BrnToast.show(data.title, context);
+ BrnToast.show(data.title!, context);
}),
BrnNumberInfoItemModel(
title: '数字信息数字信息数字信息数字信息数字信息数字信息',
diff --git a/example/lib/sample/components/card/content/text_content_entry_page.dart b/example/lib/sample/components/card/content/text_content_entry_page.dart
index 2a3dfe12..e16e0aec 100644
--- a/example/lib/sample/components/card/content/text_content_entry_page.dart
+++ b/example/lib/sample/components/card/content/text_content_entry_page.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:example/sample/components/card/content/keyvalue_align_content_example.dart';
import 'package:example/sample/components/card/content/keyvalue_close_content_example.dart';
diff --git a/example/lib/sample/components/card/content/text_value_arrow_example.dart b/example/lib/sample/components/card/content/text_value_arrow_example.dart
index 56d52af9..e902465a 100644
--- a/example/lib/sample/components/card/content/text_value_arrow_example.dart
+++ b/example/lib/sample/components/card/content/text_value_arrow_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -66,7 +68,7 @@ class _TextValueArrowContentExampleState extends State {
children: [
Text(
'规则',
- style: TextStyle(color: Color(0xFF222222), fontSize: 28, fontWeight: FontWeight.bold),
+ style: TextStyle(
+ color: Color(0xFF222222),
+ fontSize: 28,
+ fontWeight: FontWeight.bold),
),
BrnBubbleText(
maxLines: 4,
diff --git a/example/lib/sample/components/card_title/title_example.dart b/example/lib/sample/components/card_title/title_example.dart
index 66b73224..084cce7a 100644
--- a/example/lib/sample/components/card_title/title_example.dart
+++ b/example/lib/sample/components/card_title/title_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:example/sample/components/card_title/brn_action_title_example.dart';
import 'package:example/sample/components/card_title/brn_common_title_example.dart';
diff --git a/example/lib/sample/components/charts/chart_entry_example.dart b/example/lib/sample/components/charts/chart_entry_example.dart
index d66f5f19..64dd6ea0 100644
--- a/example/lib/sample/components/charts/chart_entry_example.dart
+++ b/example/lib/sample/components/charts/chart_entry_example.dart
@@ -1,3 +1,5 @@
+
+
import 'dart:math';
import 'package:bruno/bruno.dart';
@@ -18,21 +20,21 @@ class FunnelChartExamplePage extends StatelessWidget {
}
class FunnelChartExample extends StatefulWidget {
- FunnelChartExample({Key key}) : super(key: key);
+ FunnelChartExample({Key? key}) : super(key: key);
@override
_FunnelChartExampleState createState() => _FunnelChartExampleState();
}
class _FunnelChartExampleState extends State {
- double maxLayerWidth;
- double minLayerWidth;
- double layerMargin;
- double layerHeight;
- double offsetX;
- double offsetY;
- MarkerAlignment alignment;
- FunnelShape shape;
+ late double maxLayerWidth;
+ late double minLayerWidth;
+ late double layerMargin;
+ late double layerHeight;
+ late double offsetX;
+ late double offsetY;
+ late MarkerAlignment alignment;
+ FunnelShape? shape;
bool defaultStyle = false;
@override
@@ -53,7 +55,7 @@ class _FunnelChartExampleState extends State {
child: Column(
children: [
BrnFunnelChart(
- shape: FunnelShape.LeftOrRight,
+ shape: FunnelShape.leftOrRight,
alignment: MarkerAlignment.right,
maxLayerWidth: maxLayerWidth,
minLayerWidth: minLayerWidth,
@@ -82,7 +84,7 @@ class _FunnelChartExampleState extends State {
height: 10,
),
BrnFunnelChart(
- shape: FunnelShape.LeftAndRight,
+ shape: FunnelShape.leftAndRight,
alignment: alignment,
maxLayerWidth: maxLayerWidth,
minLayerWidth: minLayerWidth,
@@ -359,7 +361,7 @@ class _FunnelChartExampleState extends State {
padding: EdgeInsets.only(left: 20),
child: Text('标签位置'),
),
- FlatButton(
+ TextButton(
onPressed: () {
setState(() {
alignment = MarkerAlignment.left;
@@ -367,7 +369,7 @@ class _FunnelChartExampleState extends State {
},
child: Text('居左'),
),
- FlatButton(
+ TextButton(
onPressed: () {
setState(() {
alignment = MarkerAlignment.center;
@@ -375,7 +377,7 @@ class _FunnelChartExampleState extends State {
},
child: Text('居中'),
),
- FlatButton(
+ TextButton(
onPressed: () {
setState(() {
alignment = MarkerAlignment.right;
@@ -413,16 +415,16 @@ class RadarChartExample extends StatefulWidget {
}
class _RadarChartExampleState extends State with SingleTickerProviderStateMixin {
- double radius;
- int sideCount;
- double angle;
- double padding;
+ late double radius;
+ int? sideCount;
+ double? angle;
+ late double padding;
Map> dataList1 = Map();
Map> dataList2 = Map();
- AnimationController controller;
- Animation animation;
+ late AnimationController controller;
+ late Animation animation;
bool defaultStyle = false;
@override
@@ -433,8 +435,8 @@ class _RadarChartExampleState extends State with SingleTicker
padding = 4;
angle = 0;
for (int i = 3; i <= 8; i++) {
- List data1 = List();
- List data2 = List();
+ List data1 = [];
+ List data2 = [];
for (int j = 0; j < i; j++) {
data1.add(Random().nextDouble() * 10);
@@ -461,18 +463,18 @@ class _RadarChartExampleState extends State with SingleTicker
radius: radius,
sidesCount: 5,
markerMargin: padding,
- rotateAngle: angle * 2 * pi / 360,
- data: [dataList1[sideCount.toString()], dataList2[sideCount.toString()]],
+ rotateAngle: angle! * 2 * pi / 360,
+ data: [dataList1[sideCount.toString()]!, dataList2[sideCount.toString()]!],
tagNames: ['合作共赢诚实守信', '合作共赢诚实守信', '合作共赢诚实守信', '合作共赢诚实守信', '合作共赢诚实守信'],
);
} else {
return BrnRadarChart(
radius: radius,
provider: RadarProvider(sideCount, dataList1, dataList2),
- sidesCount: sideCount,
+ sidesCount: sideCount!,
markerMargin: padding,
crossedAxisLine: true,
- rotateAngle: angle * 2 * pi / 360,
+ rotateAngle: angle! * 2 * pi / 360,
animateProgress: animation.value,
builder: (index) {
return Text(
@@ -560,7 +562,7 @@ class _RadarChartExampleState extends State with SingleTicker
),
Expanded(
child: Slider(
- value: sideCount.toDouble(),
+ value: sideCount!.toDouble(),
divisions: 6,
onChanged: (data) {
if (data.toInt() != sideCount) {
@@ -577,9 +579,9 @@ class _RadarChartExampleState extends State with SingleTicker
onChangeEnd: (data) {
debugPrint('end:$data');
},
- min: defaultStyle ? sideCount.toDouble() : 3,
- max: defaultStyle ? sideCount.toDouble() : 8,
- label: '${sideCount.toStringAsFixed(0)}',
+ min: defaultStyle ? sideCount!.toDouble() : 3,
+ max: defaultStyle ? sideCount!.toDouble() : 8,
+ label: '${sideCount!.toStringAsFixed(0)}',
activeColor: Colors.green,
inactiveColor: Colors.grey,
semanticFormatterCallback: (double newValue) {
@@ -597,7 +599,7 @@ class _RadarChartExampleState extends State with SingleTicker
),
Expanded(
child: Slider(
- value: angle.toDouble(),
+ value: angle!.toDouble(),
divisions: 360,
onChanged: (data) {
if (data.toDouble() != angle) {
@@ -616,7 +618,7 @@ class _RadarChartExampleState extends State with SingleTicker
},
min: 0,
max: 360,
- label: '${angle.toStringAsFixed(0)}',
+ label: '${angle!.toStringAsFixed(0)}',
activeColor: Colors.green,
inactiveColor: Colors.grey,
semanticFormatterCallback: (double newValue) {
@@ -645,7 +647,7 @@ class RadarProvider extends BrnRadarChartDataProvider {
final Map> dataList2;
- final int sideCount;
+ final int? sideCount;
RadarProvider(this.sideCount, this.dataList1, this.dataList2);
@@ -686,10 +688,10 @@ class RadarProvider extends BrnRadarChartDataProvider {
List getRadarValues(int radarIndex) {
switch (radarIndex) {
case 0:
- return dataList1[sideCount.toString()];
+ return dataList1[sideCount.toString()]!;
case 1:
- return dataList2[sideCount.toString()];
+ return dataList2[sideCount.toString()]!;
}
- return dataList1[sideCount.toString()];
+ return dataList1[sideCount.toString()]!;
}
}
diff --git a/example/lib/sample/components/charts/doughnut_chart_example.dart b/example/lib/sample/components/charts/doughnut_chart_example.dart
index 49d6c6dd..b653326a 100644
--- a/example/lib/sample/components/charts/doughnut_chart_example.dart
+++ b/example/lib/sample/components/charts/doughnut_chart_example.dart
@@ -1,3 +1,5 @@
+
+
import 'dart:math';
import 'package:bruno/bruno.dart';
@@ -11,9 +13,9 @@ class DoughnutChartExample extends StatefulWidget {
}
class DoughnutChartExampleState extends State {
- BrnDoughnutDataItem selectedItem;
+ BrnDoughnutDataItem? selectedItem;
- List dataList = List();
+ List dataList = [];
List preinstallColors = [
Color(0xffFF862D),
Color(0xff26BB7D),
@@ -55,7 +57,7 @@ class DoughnutChartExampleState extends State {
data: dataList,
selectedItem: selectedItem,
showTitleWhenSelected: true,
- selectCallback: (BrnDoughnutDataItem selectedItem) {
+ selectCallback: (BrnDoughnutDataItem? selectedItem) {
setState(() {
this.selectedItem = selectedItem;
});
diff --git a/example/lib/sample/components/charts/line/brn_broken_line_example.dart b/example/lib/sample/components/charts/line/brn_broken_line_example.dart
index fe4b71b2..46cce542 100644
--- a/example/lib/sample/components/charts/line/brn_broken_line_example.dart
+++ b/example/lib/sample/components/charts/line/brn_broken_line_example.dart
@@ -1,3 +1,5 @@
+
+
import 'dart:math';
import 'package:bruno/bruno.dart';
@@ -98,7 +100,7 @@ class _BrokenLineExampleState extends State {
.map((_) => BrnPointData(
pointText: _.value,
x: brokenData.indexOf(_).toDouble(),
- y: double.parse(_.value),
+ y: double.parse(_.value!),
lineTouchData: BrnLineTouchData(
tipWindowSize: Size(60, 40),
@@ -129,17 +131,17 @@ class _BrokenLineExampleState extends State {
}
double _getMinValueForExample1(List brokenData) {
- double minValue = double.tryParse(brokenData[0]?.value) ?? 0;
+ double minValue = double.tryParse(brokenData[0].value!) ?? 0;
for (DBDataNodeModel point in brokenData) {
- minValue = min(double.tryParse(point.value) ?? 0, minValue);
+ minValue = min(double.tryParse(point.value!) ?? 0, minValue);
}
return minValue;
}
double _getMaxValueForExample1(List brokenData) {
- double maxValue = double.tryParse(brokenData[0]?.value) ?? 0;
+ double maxValue = double.tryParse(brokenData[0].value!) ?? 0;
for (DBDataNodeModel point in brokenData) {
- maxValue = max(double.tryParse(point.value) ?? 0, maxValue);
+ maxValue = max(double.tryParse(point.value!) ?? 0, maxValue);
}
return maxValue;
}
@@ -190,7 +192,7 @@ class _BrokenLineExampleState extends State {
List _linesForExample2() {
BrnPointsLine _pointsLine;
BrnPointsLine _pointsLine1;
- List pointsLineList = List();
+ List pointsLineList = [];
_pointsLine = BrnPointsLine(
isShowPointText: true,
isShowXDial: true,
@@ -420,7 +422,7 @@ class _BrokenLineExampleState extends State {
List _getPointsLinesForExample3() {
BrnPointsLine pointsLine, _pointsLine2;
- List pointsLineList = List();
+ List pointsLineList = [];
pointsLine = BrnPointsLine(
isShowXDial: true,
lineWidth: 3,
@@ -486,13 +488,13 @@ class _BrokenLineExampleState extends State {
],
),
);
- })),
+ }, tipWindowSize:Size(60, 40) )),
BrnPointData(
pointText: '20',
y: 20,
x: 3,
lineTouchData: BrnLineTouchData(
-
+ tipWindowSize: Size(60, 40),
onTouch: () {
return '20';
})),
@@ -501,7 +503,7 @@ class _BrokenLineExampleState extends State {
y: 67,
x: 4,
lineTouchData: BrnLineTouchData(
-
+ tipWindowSize:Size(60, 40),
onTouch: () {
return '66';
})),
@@ -661,7 +663,7 @@ class _BrokenLineExampleState extends State {
y: 66,
x: 8,
lineTouchData: BrnLineTouchData(
-
+ tipWindowSize: Size(60, 40),
onTouch: () {
return '66';
})),
@@ -790,7 +792,7 @@ class _BrokenLineExampleState extends State {
List _getPointsLinesForExample4() {
BrnPointsLine pointsLine, _pointsLine2;
- List pointsLineList = List();
+ List pointsLineList = [];
pointsLine = BrnPointsLine(
isShowXDial: true,
lineWidth: 3,
@@ -834,7 +836,7 @@ class _BrokenLineExampleState extends State {
y: 80,
x: 2,
lineTouchData: BrnLineTouchData(
-
+ tipWindowSize: Size(60, 40),
onTouch: () {
return Container(
padding: EdgeInsets.only(left: 10, right: 10, top: 8, bottom: 8),
@@ -862,7 +864,7 @@ class _BrokenLineExampleState extends State {
y: 20,
x: 3,
lineTouchData: BrnLineTouchData(
-
+ tipWindowSize: Size(60, 40),
onTouch: () {
return '20';
})),
@@ -871,7 +873,7 @@ class _BrokenLineExampleState extends State {
y: 67,
x: 4,
lineTouchData: BrnLineTouchData(
-
+ tipWindowSize: Size(60, 40),
onTouch: () {
return '66';
})),
@@ -1031,7 +1033,7 @@ class _BrokenLineExampleState extends State {
y: 66,
x: 8,
lineTouchData: BrnLineTouchData(
-
+ tipWindowSize: Size(60, 40),
onTouch: () {
return '66';
})),
@@ -1193,7 +1195,7 @@ class _BrokenLineExampleState extends State {
List _getPointsLineListWithShowPointText() {
BrnPointsLine pointsLine, _pointsLine2;
- List pointsLineList = List();
+ List pointsLineList = [];
pointsLine = BrnPointsLine(
isShowXDial: true,
lineWidth: 3,
@@ -1247,7 +1249,7 @@ class _BrokenLineExampleState extends State {
y: 80,
x: 2,
lineTouchData: BrnLineTouchData(
-
+ tipWindowSize: Size(60, 40),
onTouch: () {
return Container(
padding: EdgeInsets.only(left: 10, right: 10, top: 8, bottom: 8),
@@ -1285,7 +1287,7 @@ class _BrokenLineExampleState extends State {
y: 67,
x: 4,
lineTouchData: BrnLineTouchData(
-
+ tipWindowSize: Size(60, 40),
onTouch: () {
return '66';
})),
@@ -1490,7 +1492,7 @@ class _BrokenLineExampleState extends State {
}
Widget _buildIdentificationList() {
- List widgetList = List();
+ List widgetList = [];
for (BrnPointsLine bean in _getPointsLinesForExample3()) {
Widget widget = Row(children: [
Container(
diff --git a/example/lib/sample/components/charts/line/db_data_node_model.dart b/example/lib/sample/components/charts/line/db_data_node_model.dart
index 7e0464e4..fc5928b8 100644
--- a/example/lib/sample/components/charts/line/db_data_node_model.dart
+++ b/example/lib/sample/components/charts/line/db_data_node_model.dart
@@ -1,34 +1,35 @@
/// @desc 看板卡片中用于描述数据指标的模型,也能用于数据块的定义,内部嵌套了一个itemList
+
+
class DBDataNodeModel {
- String key;
- String name;
- String value;
- String unit;
- String percent;
- String order;
+ String? key;
+ String? name;
+ String? value;
+ String? unit;
+ String? percent;
+ String? order;
/// If tip.isNullOrEmpty == false, a question icon will be displayed on right of the label.
/// A tip pop window would be displayed when icon was clicked.
- String tipTitle;
+ String? tipTitle;
- List tipList;
+ List? tipList;
/// 1: up direction, green label, green arrow
/// 0: gray label, no arrow
/// -1: down direction, red label, red arrow
- int trend;
+ int? trend;
- List itemList;
+ List? itemList;
/// section data field
- String url;
- DBDataNodeModel total;
-
+ String? url;
+ DBDataNodeModel? total;
DBDataNodeModel();
- factory DBDataNodeModel.fromJson(Map json) {
- if (json == null) return null;
+ factory DBDataNodeModel.fromJson(Map? json) {
+ if (json == null) return DBDataNodeModel();
DBDataNodeModel entity = DBDataNodeModel();
entity.name = json['name'] ?? "";
entity.key = json['key'] ?? "";
diff --git a/example/lib/sample/components/charts/progress_bar_chart_example.dart b/example/lib/sample/components/charts/progress_bar_chart_example.dart
index 0b6c98c4..b0563676 100644
--- a/example/lib/sample/components/charts/progress_bar_chart_example.dart
+++ b/example/lib/sample/components/charts/progress_bar_chart_example.dart
@@ -1,3 +1,5 @@
+
+
import 'dart:math';
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
diff --git a/example/lib/sample/components/charts/progress_chart_entry_page.dart b/example/lib/sample/components/charts/progress_chart_entry_page.dart
index bb0b34c9..6d71c9dc 100644
--- a/example/lib/sample/components/charts/progress_chart_entry_page.dart
+++ b/example/lib/sample/components/charts/progress_chart_entry_page.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
diff --git a/example/lib/sample/components/dialog/dialog_entry_page.dart b/example/lib/sample/components/dialog/dialog_entry_page.dart
index ff961be6..f53999bf 100644
--- a/example/lib/sample/components/dialog/dialog_entry_page.dart
+++ b/example/lib/sample/components/dialog/dialog_entry_page.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:example/sample/home/list_item.dart';
import 'package:flutter/material.dart';
@@ -299,7 +301,7 @@ class DialogEntryPage extends StatelessWidget {
//光标圆角弧度
cursorRadius: Radius.circular(2.0),
style: TextStyle(fontSize: 14, color: Color(0xFF222222)),
- maxLengthEnforced: true,
+ maxLengthEnforcement: MaxLengthEnforcement.enforced,
onChanged: (value) {},
decoration: InputDecoration(
contentPadding: EdgeInsets.all(8.0),
@@ -326,7 +328,7 @@ class DialogEntryPage extends StatelessWidget {
state(() {});
},
onSubmitClick: (data) {
- BrnToast.show(data, context);
+ BrnToast.show(data!, context);
});
},
));
@@ -334,7 +336,7 @@ class DialogEntryPage extends StatelessWidget {
///多选弹框
void _showMiddleMultiSelectDialog(BuildContext context) {
- List data = new List();
+ List data = [];
data.add(new MultiSelectItem("100", "感兴趣待跟进"));
data.add(new MultiSelectItem("101", "感兴趣但对本商圈没兴趣", isChecked: true));
data.add(new MultiSelectItem("102", "接通后挂断/不感兴趣", isChecked: true));
@@ -361,7 +363,7 @@ class DialogEntryPage extends StatelessWidget {
void _showMiddleMultiSelectWithMessageWidgetDialog(BuildContext context) {
String hintText = "感兴趣待跟进";
- List data = new List();
+ List data = [];
data.add(new MultiSelectItem("100", "感兴趣待跟进"));
data.add(new MultiSelectItem("101", "感兴趣但对本商圈没兴趣", isChecked: true));
data.add(new MultiSelectItem("102", "接通后挂断/不感兴趣", isChecked: true));
@@ -392,7 +394,7 @@ class DialogEntryPage extends StatelessWidget {
//光标圆角弧度
cursorRadius: Radius.circular(2.0),
style: TextStyle(fontSize: 14, color: Color(0xFF222222)),
- maxLengthEnforced: true,
+ maxLengthEnforcement: MaxLengthEnforcement.enforced,
onChanged: (value) {},
decoration: InputDecoration(
contentPadding: EdgeInsets.all(8.0),
@@ -413,7 +415,7 @@ class DialogEntryPage extends StatelessWidget {
)),
),
),
- onItemClick: (BuildContext contex, int index) {
+ onItemClick: (BuildContext context, int index) {
hintText = data[index].content;
state(() {});
},
@@ -430,7 +432,7 @@ class DialogEntryPage extends StatelessWidget {
///多选弹框
void _showMiddleMultiSelectWithMessageDialog(BuildContext context) {
- List data = new List();
+ List data = [];
data.add(new MultiSelectItem("100", "感兴趣待跟进"));
data.add(new MultiSelectItem("101", "感兴趣但对本商圈没兴趣", isChecked: true));
data.add(new MultiSelectItem("102", "接通后挂断/不感兴趣", isChecked: true));
@@ -467,7 +469,7 @@ class DialogEntryPage extends StatelessWidget {
padding: const EdgeInsets.only(top: 6, left: 24, right: 24),
child: BrnCSS2Text.toTextView(
"这是一条增使用标签修改文字颜色的example\我是带颜色的文字,"
- "这是颜色标签后边的文字", linksCallback: (String text, String linkUrl) {
+ "这是颜色标签后边的文字", linksCallback: (String? text, String? linkUrl) {
BrnToast.show('$text clicked! Url is $linkUrl', context);
}),
),
@@ -721,7 +723,7 @@ class DialogEntryPage extends StatelessWidget {
///对话框样式九:标准的对话框:有标题、双按钮、有警示文案和辅助信息
void _showStyle9_1Dialog(BuildContext context) {
- bool status = false;
+ bool? status = false;
BrnDialogManager.showConfirmDialog(context,
title: "标题内容?",
cancel: '取消',
@@ -730,7 +732,7 @@ class DialogEntryPage extends StatelessWidget {
return Row(children: [
Checkbox(
value: status,
- onChanged: (bool aaa) {
+ onChanged: (bool? aaa) {
status = aaa;
setState(() {});
},
@@ -762,9 +764,9 @@ class DialogEntryPage extends StatelessWidget {
BrnShareDialog brnShareDialog = new BrnShareDialog(
context: context,
shareChannels: [
- BrnShareItemConstants.SHARE_WEIXIN,
- BrnShareItemConstants.SHARE_LINK,
- BrnShareItemConstants.SHARE_CUSTOM
+ BrnShareItemConstants.shareWeiXin,
+ BrnShareItemConstants.shareLink,
+ BrnShareItemConstants.shareCustom
],
titleText: "测试标题",
descText: "测试辅助信息测试辅助信息测试辅助信息测试辅助信息测试辅助信息",
@@ -792,11 +794,11 @@ class DialogEntryPage extends StatelessWidget {
BrnShareDialog brnShareDialog = new BrnShareDialog(
context: context,
shareChannels: [
- BrnShareItemConstants.SHARE_WEIXIN,
- BrnShareItemConstants.SHARE_CUSTOM,
- BrnShareItemConstants.SHARE_CUSTOM,
- BrnShareItemConstants.SHARE_LINK,
- BrnShareItemConstants.SHARE_CUSTOM
+ BrnShareItemConstants.shareWeiXin,
+ BrnShareItemConstants.shareCustom,
+ BrnShareItemConstants.shareCustom,
+ BrnShareItemConstants.shareLink,
+ BrnShareItemConstants.shareCustom
],
titleText: "测试标题",
descText: "测试辅助信息测试辅助信息测试辅助信息测试辅助信息测试辅助信息",
@@ -831,7 +833,7 @@ class DialogEntryPage extends StatelessWidget {
void _showBrnTwoVerticalButtonDialogDialog(BuildContext context) {
BrnEnhanceOperationDialog brnShareDialog = new BrnEnhanceOperationDialog(
context: context,
- iconType: BrnDialogConstants.ICON_ALERT,
+ iconType: BrnDialogConstants.iconAlert,
titleText: "强提示文案",
descText: "这里是文案这里是文案这里是文案这里是文案这里是文案这里是文案这里是文案这里是文案",
mainButtonText: "主要按钮",
@@ -848,7 +850,7 @@ class DialogEntryPage extends StatelessWidget {
void _showBrnOneVerticalButtonDialogDialog(BuildContext context) {
BrnEnhanceOperationDialog brnShareDialog = new BrnEnhanceOperationDialog(
- iconType: BrnDialogConstants.ICON_WARNING,
+ iconType: BrnDialogConstants.iconWarning,
context: context,
titleText: "强提示文案",
descText: "这里是文案这里是文案这里是文案这里是文案这里是文案这里是文案这里是文案这里是文案",
@@ -878,8 +880,8 @@ class DialogEntryPage extends StatelessWidget {
"文呢表纯本文呢表纯本文呢表纯本文呢表纯本文呢表纯本文呢表纯本文呢表纯本文呢表纯本文呢表纯本文呢表纯本文呢表纯本文呢表纯本文"
"呢表纯本文呢表纯本文呢表纯本文呢表纯本文呢表纯本文呢表纯本文呢表纯本文呢表纯本文呢表纯本文呢表",
submitText: "提交",
- linksCallback: (String text, String url) {
- BrnToast.show(text, context);
+ linksCallback: (String? text, String? url) {
+ BrnToast.show(text!, context);
},
onSubmitClick: () {
BrnToast.show("点击了纯文本弹框", context);
diff --git a/example/lib/sample/components/empty/abnormal_entry_page.dart b/example/lib/sample/components/empty/abnormal_entry_page.dart
index a0fa3ffa..3cfddc66 100644
--- a/example/lib/sample/components/empty/abnormal_entry_page.dart
+++ b/example/lib/sample/components/empty/abnormal_entry_page.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:example/sample/components/empty/abnormal_state_example.dart';
import 'package:example/sample/home/list_item.dart';
diff --git a/example/lib/sample/components/empty/abnormal_state_example.dart b/example/lib/sample/components/empty/abnormal_state_example.dart
index 8fa335fc..9ec98bd5 100644
--- a/example/lib/sample/components/empty/abnormal_state_example.dart
+++ b/example/lib/sample/components/empty/abnormal_state_example.dart
@@ -1,8 +1,10 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
class AbnomalStateExample extends StatelessWidget {
- final int caseIndex;
+ final int? caseIndex;
AbnomalStateExample({this.caseIndex});
@@ -15,8 +17,8 @@ class AbnomalStateExample extends StatelessWidget {
body: _buildEmpty(caseIndex, context));
}
- Widget _buildEmpty(int index, BuildContext context) {
- Widget widget;
+ Widget? _buildEmpty(int? index, BuildContext context) {
+ Widget? widget;
switch (index) {
case 0:
widget = BrnAbnormalStateWidget(
@@ -27,7 +29,7 @@ class AbnomalStateExample extends StatelessWidget {
isCenterVertical: true,
title: BrnStrings.getDateFailed,
operateTexts: [BrnStrings.clickPageRetry],
- operateAreaType: OperateAreaType.TextButton,
+ operateAreaType: OperateAreaType.textButton,
action: (index) {
BrnToast.show(BrnStrings.getDateFailed, context);
},
@@ -69,7 +71,7 @@ class AbnomalStateExample extends StatelessWidget {
),
title: "这是副标题内容这是副标题内容这是副标",
content: '您的门店暂无用户',
- operateAreaType: OperateAreaType.SingleButton,
+ operateAreaType: OperateAreaType.singleButton,
operateTexts: ["切换账号"],
action: (_) {
BrnToast.show("第$_个按钮被点击了", context);
@@ -84,7 +86,7 @@ class AbnomalStateExample extends StatelessWidget {
),
title: "暂无",
content: '您还没有在维护的信息哦',
- operateAreaType: OperateAreaType.DoubleButton,
+ operateAreaType: OperateAreaType.doubleButton,
operateTexts: ['去添加', '去修改'],
action: (_) {
BrnToast.show("第$_个按钮被点击了", context);
diff --git a/example/lib/sample/components/form/all_item_style_example.dart b/example/lib/sample/components/form/all_item_style_example.dart
index ab695efd..6084e42f 100644
--- a/example/lib/sample/components/form/all_item_style_example.dart
+++ b/example/lib/sample/components/form/all_item_style_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:example/sample/components/form/group_example/expansion_group_example.dart';
import 'package:example/sample/components/form/group_example/group_add_example.dart';
diff --git a/example/lib/sample/components/form/form_item_entry_example.dart b/example/lib/sample/components/form/form_item_entry_example.dart
index 25b63537..d655dda2 100644
--- a/example/lib/sample/components/form/form_item_entry_example.dart
+++ b/example/lib/sample/components/form/form_item_entry_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:example/sample/components/form/all_item_style_example.dart';
import 'package:example/sample/components/form/form_page_example.dart';
diff --git a/example/lib/sample/components/form/form_page_example.dart b/example/lib/sample/components/form/form_page_example.dart
index aa46c4bb..b55967d0 100644
--- a/example/lib/sample/components/form/form_page_example.dart
+++ b/example/lib/sample/components/form/form_page_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
/// 退回订单 页面展示
@@ -9,13 +11,14 @@ class FormPageExample extends StatefulWidget {
}
class _FormPageExampleState extends State {
- List selectedOptions = List();
- String commentStr;
- BrnPortraitRadioGroupOption selectedValue;
+ List selectedOptions = [];
+ String? commentStr;
+ late BrnPortraitRadioGroupOption selectedValue;
@override
void initState() {
super.initState();
+ selectedValue = BrnPortraitRadioGroupOption();
}
@override
@@ -43,10 +46,10 @@ class _FormPageExampleState extends State {
'$index 不在我服务范围',
'$index 其他'
],
- selectedOption: selectedValue?.title,
- onChanged: (BrnPortraitRadioGroupOption old,
+ selectedOption: selectedValue.title ?? '',
+ onChanged: (BrnPortraitRadioGroupOption? old,
BrnPortraitRadioGroupOption newList) {
- BrnToast.show(newList.title, context);
+ BrnToast.show(newList.title!, context);
selectedValue = newList;
commentStr = '';
setState(() {});
@@ -69,9 +72,9 @@ class _FormPageExampleState extends State {
subTitle: 'subtitlesubtn你好 哈哈哈哈哈哈啊哈哈哈哈哈子标题哈哈哈 子标题子标题');
}),
selectedOption: selectedValue,
- onChanged: (BrnPortraitRadioGroupOption old,
+ onChanged: (BrnPortraitRadioGroupOption? old,
BrnPortraitRadioGroupOption newList) {
- BrnToast.show(newList.title, context);
+ BrnToast.show(newList.title!, context);
selectedValue = newList;
commentStr = '';
setState(() {});
diff --git a/example/lib/sample/components/form/group_example/expansion_group_example.dart b/example/lib/sample/components/form/group_example/expansion_group_example.dart
index 248937bb..9d2f2d98 100644
--- a/example/lib/sample/components/form/group_example/expansion_group_example.dart
+++ b/example/lib/sample/components/form/group_example/expansion_group_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
diff --git a/example/lib/sample/components/form/group_example/group_add_example.dart b/example/lib/sample/components/form/group_example/group_add_example.dart
index 7516c930..2e810ecf 100644
--- a/example/lib/sample/components/form/group_example/group_add_example.dart
+++ b/example/lib/sample/components/form/group_example/group_add_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
diff --git a/example/lib/sample/components/form/group_example/normal_group_example.dart b/example/lib/sample/components/form/group_example/normal_group_example.dart
index 8edefddd..5b4b133a 100644
--- a/example/lib/sample/components/form/group_example/normal_group_example.dart
+++ b/example/lib/sample/components/form/group_example/normal_group_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
diff --git a/example/lib/sample/components/form/items_example/base_title_example.dart b/example/lib/sample/components/form/items_example/base_title_example.dart
index f251cb35..b2e8b9d7 100644
--- a/example/lib/sample/components/form/items_example/base_title_example.dart
+++ b/example/lib/sample/components/form/items_example/base_title_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
diff --git a/example/lib/sample/components/form/items_example/multi_choice_example.dart b/example/lib/sample/components/form/items_example/multi_choice_example.dart
index bae807bf..204e8f4b 100644
--- a/example/lib/sample/components/form/items_example/multi_choice_example.dart
+++ b/example/lib/sample/components/form/items_example/multi_choice_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -40,9 +42,9 @@ class MultiChoiceInputExamplePage extends StatelessWidget {
onRemoveTap: () {
BrnToast.show("点击触发onRemoveTap回调", context);
},
- onChanged: (List oldValue, List newValue) {
+ onChanged: (List oldValue, List? newValue) {
BrnToast.show(
- "点击触发onChanged回调${oldValue.length}_${newValue.length}_onChanged", context);
+ "点击触发onChanged回调${oldValue.length}_${newValue!.length}_onChanged", context);
},
),
Container(
@@ -56,7 +58,7 @@ class MultiChoiceInputExamplePage extends StatelessWidget {
),
),
BrnMultiChoiceInputFormItem(
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
error: "必填项不能为空",
title: "自然",
@@ -79,9 +81,9 @@ class MultiChoiceInputExamplePage extends StatelessWidget {
onRemoveTap: () {
BrnToast.show("点击触发onRemoveTap回调", context);
},
- onChanged: (List oldValue, List newValue) {
+ onChanged: (List oldValue, List? newValue) {
BrnToast.show(
- "点击触发onChanged回调${oldValue.length}_${newValue.length}_onChanged", context);
+ "点击触发onChanged回调${oldValue.length}_${newValue!.length}_onChanged", context);
},
),
Container(
@@ -95,7 +97,7 @@ class MultiChoiceInputExamplePage extends StatelessWidget {
),
),
BrnMultiChoiceInputFormItem(
- prefixIconType: BrnPrefixIconType.TYPE_REMOVE,
+ prefixIconType: BrnPrefixIconType.remove,
isRequire: true,
title: "自然到",
subTitle: "这里是副标题",
diff --git a/example/lib/sample/components/form/items_example/multi_choice_protrait_example.dart b/example/lib/sample/components/form/items_example/multi_choice_protrait_example.dart
index 9621128e..e74e91aa 100644
--- a/example/lib/sample/components/form/items_example/multi_choice_protrait_example.dart
+++ b/example/lib/sample/components/form/items_example/multi_choice_protrait_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -60,7 +62,7 @@ class MultiChoicePortraitInputExamplePage extends StatelessWidget {
),
),
BrnMultiChoicePortraitInputFormItem(
- prefixIconType: BrnPrefixIconType.TYPE_REMOVE,
+ prefixIconType: BrnPrefixIconType.remove,
isRequire: true,
error: "必填项不能为空",
title: "自然到访保护期",
@@ -101,7 +103,7 @@ class MultiChoicePortraitInputExamplePage extends StatelessWidget {
),
),
BrnMultiChoicePortraitInputFormItem(
- prefixIconType: BrnPrefixIconType.TYPE_REMOVE,
+ prefixIconType: BrnPrefixIconType.remove,
isRequire: true,
title: "自然到访保护期",
subTitle: "这里是副标题",
diff --git a/example/lib/sample/components/form/items_example/radio_input_example.dart b/example/lib/sample/components/form/items_example/radio_input_example.dart
index cf2045dd..f05edb6e 100644
--- a/example/lib/sample/components/form/items_example/radio_input_example.dart
+++ b/example/lib/sample/components/form/items_example/radio_input_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -55,7 +57,7 @@ class RadioInputExamplePage extends StatelessWidget {
),
),
BrnRadioInputFormItem(
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
error: "必填项不能为空",
title: "自然到访保护期",
@@ -90,7 +92,7 @@ class RadioInputExamplePage extends StatelessWidget {
),
),
BrnRadioInputFormItem(
- prefixIconType: BrnPrefixIconType.TYPE_REMOVE,
+ prefixIconType: BrnPrefixIconType.remove,
isRequire: true,
title: "自然到访保护期",
subTitle: "这里是副标题",
@@ -124,7 +126,7 @@ class RadioInputExamplePage extends StatelessWidget {
),
),
BrnRadioInputFormItem.autoLayout(
- prefixIconType: BrnPrefixIconType.TYPE_REMOVE,
+ prefixIconType: BrnPrefixIconType.remove,
isRequire: true,
error: "必填项不能为空",
title: "autoLayout",
diff --git a/example/lib/sample/components/form/items_example/radio_protrait_example.dart b/example/lib/sample/components/form/items_example/radio_protrait_example.dart
index 27b60220..b4c3949d 100644
--- a/example/lib/sample/components/form/items_example/radio_protrait_example.dart
+++ b/example/lib/sample/components/form/items_example/radio_protrait_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -56,7 +58,7 @@ class RadioPortraitInputExamplePage extends StatelessWidget {
),
),
BrnRadioPortraitInputFormItem(
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
error: "必填项不能为空",
title: "自然到访保护期",
@@ -93,7 +95,7 @@ class RadioPortraitInputExamplePage extends StatelessWidget {
),
),
BrnRadioPortraitInputFormItem(
- prefixIconType: BrnPrefixIconType.TYPE_REMOVE,
+ prefixIconType: BrnPrefixIconType.remove,
isRequire: true,
title: "自然到访保护期",
subTitle: "这里是副标题",
diff --git a/example/lib/sample/components/form/items_example/range_input_example.dart b/example/lib/sample/components/form/items_example/range_input_example.dart
index b04a42d9..0e207851 100644
--- a/example/lib/sample/components/form/items_example/range_input_example.dart
+++ b/example/lib/sample/components/form/items_example/range_input_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -34,7 +36,7 @@ class RangeInputExamplePage extends StatelessWidget {
maxUnit: "天",
leftMaxCount: 1,
rightMaxCount: 3,
- inputType: BrnInputType.NUMBER,
+ inputType: BrnInputType.number,
onTip: () {
BrnToast.show("点击触发onTip回调", context);
},
@@ -64,7 +66,7 @@ class RangeInputExamplePage extends StatelessWidget {
BrnRangeInputFormItem(
minController: TextEditingController()..text = "10",
maxController: TextEditingController()..text = "100",
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
error: "必填项不能为空",
title: "保护期",
@@ -77,7 +79,7 @@ class RangeInputExamplePage extends StatelessWidget {
maxUnit: "天",
leftMaxCount: 1,
rightMaxCount: 3,
- inputType: BrnInputType.NUMBER,
+ inputType: BrnInputType.number,
onTip: () {
BrnToast.show("点击触发onTip回调", context);
},
@@ -107,7 +109,7 @@ class RangeInputExamplePage extends StatelessWidget {
BrnRangeInputFormItem(
minController: TextEditingController()..text = "10",
maxController: TextEditingController()..text = "100",
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
title: "保护期",
subTitle: "这里是副标题",
@@ -119,7 +121,7 @@ class RangeInputExamplePage extends StatelessWidget {
maxUnit: "天",
leftMaxCount: 2,
rightMaxCount: 3,
- inputType: BrnInputType.NUMBER,
+ inputType: BrnInputType.number,
onTip: () {
BrnToast.show("点击触发onTip回调", context);
},
@@ -149,7 +151,7 @@ class RangeInputExamplePage extends StatelessWidget {
BrnRangeInputFormItem(
minController: TextEditingController()..text = "10",
maxController: TextEditingController()..text = "100",
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
title: "保护期",
subTitle: "这里是副标题",
@@ -162,7 +164,7 @@ class RangeInputExamplePage extends StatelessWidget {
maxUnit: "天",
leftMaxCount: 2,
rightMaxCount: 3,
- inputType: BrnInputType.NUMBER,
+ inputType: BrnInputType.number,
onTip: () {
BrnToast.show("点击触发onTip回调", context);
},
diff --git a/example/lib/sample/components/form/items_example/ratio_input_example.dart b/example/lib/sample/components/form/items_example/ratio_input_example.dart
index 72f19a93..5d374d59 100644
--- a/example/lib/sample/components/form/items_example/ratio_input_example.dart
+++ b/example/lib/sample/components/form/items_example/ratio_input_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -52,7 +54,7 @@ class RatioInputExamplePage extends StatelessWidget {
),
BrnRatioInputFormItem(
controller: TextEditingController()..text = "1.6",
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
isEdit: true,
error: "必填项不能为空",
@@ -84,7 +86,7 @@ class RatioInputExamplePage extends StatelessWidget {
),
BrnRatioInputFormItem(
controller: TextEditingController()..text = "1.6",
- prefixIconType: BrnPrefixIconType.TYPE_REMOVE,
+ prefixIconType: BrnPrefixIconType.remove,
isRequire: true,
isEdit: true,
title: "车位比",
@@ -115,7 +117,7 @@ class RatioInputExamplePage extends StatelessWidget {
),
BrnRatioInputFormItem(
controller: TextEditingController()..text = "1.6",
- prefixIconType: BrnPrefixIconType.TYPE_REMOVE,
+ prefixIconType: BrnPrefixIconType.remove,
isRequire: true,
isEdit: false,
isPrefixIconEnabled: true,
diff --git a/example/lib/sample/components/form/items_example/select_all_title_example.dart b/example/lib/sample/components/form/items_example/select_all_title_example.dart
index 2b2d991d..78507285 100644
--- a/example/lib/sample/components/form/items_example/select_all_title_example.dart
+++ b/example/lib/sample/components/form/items_example/select_all_title_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
diff --git a/example/lib/sample/components/form/items_example/star_example.dart b/example/lib/sample/components/form/items_example/star_example.dart
index 484bc0a4..d9f2f43f 100644
--- a/example/lib/sample/components/form/items_example/star_example.dart
+++ b/example/lib/sample/components/form/items_example/star_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -52,7 +54,7 @@ class StarInputExamplePage extends StatelessWidget {
),
),
BrnStarsFormItem(
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
isEdit: true,
error: "必填项不能为空",
@@ -85,7 +87,7 @@ class StarInputExamplePage extends StatelessWidget {
),
),
BrnStarsFormItem(
- prefixIconType: BrnPrefixIconType.TYPE_REMOVE,
+ prefixIconType: BrnPrefixIconType.remove,
isRequire: true,
isEdit: true,
title: "自然到访保护期",
diff --git a/example/lib/sample/components/form/items_example/step_input_example.dart b/example/lib/sample/components/form/items_example/step_input_example.dart
index ca1ea523..07a92d2f 100644
--- a/example/lib/sample/components/form/items_example/step_input_example.dart
+++ b/example/lib/sample/components/form/items_example/step_input_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -54,14 +56,13 @@ class StepInputExamplePage extends StatelessWidget {
),
),
BrnStepInputFormItem(
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
isEdit: true,
error: "必填项不能为空",
title: "自然到访保护期",
subTitle: "这里是副标题",
tipLabel: "标签",
- value: 0,
maxLimit: 5,
minLimit: 1,
onTip: () {
@@ -88,13 +89,12 @@ class StepInputExamplePage extends StatelessWidget {
),
),
BrnStepInputFormItem(
- prefixIconType: BrnPrefixIconType.TYPE_REMOVE,
+ prefixIconType: BrnPrefixIconType.remove,
isRequire: true,
isEdit: true,
title: "自然到访保护期",
subTitle: "这里是副标题",
tipLabel: "标签",
- value: 0,
maxLimit: 5,
minLimit: 1,
onTip: () {
diff --git a/example/lib/sample/components/form/items_example/text_block_input_example.dart b/example/lib/sample/components/form/items_example/text_block_input_example.dart
index bd15cc0a..9d05ba9f 100644
--- a/example/lib/sample/components/form/items_example/text_block_input_example.dart
+++ b/example/lib/sample/components/form/items_example/text_block_input_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -55,7 +57,7 @@ class TextBlockInputExamplePage extends StatelessWidget {
),
BrnTextBlockInputFormItem(
controller: TextEditingController()..text = "hello",
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
isEdit: true,
error: "必填项不能为空",
@@ -88,7 +90,7 @@ class TextBlockInputExamplePage extends StatelessWidget {
),
BrnTextBlockInputFormItem(
controller: TextEditingController()..text = "hello",
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
isEdit: true,
title: "备注",
@@ -120,7 +122,7 @@ class TextBlockInputExamplePage extends StatelessWidget {
),
BrnTextBlockInputFormItem(
controller: TextEditingController()..text = "hello",
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
isEdit: false,
isPrefixIconEnabled: true,
diff --git a/example/lib/sample/components/form/items_example/text_input_example.dart b/example/lib/sample/components/form/items_example/text_input_example.dart
index 401b42dc..2e3037d8 100644
--- a/example/lib/sample/components/form/items_example/text_input_example.dart
+++ b/example/lib/sample/components/form/items_example/text_input_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -54,7 +56,7 @@ class TextInputExamplePage extends StatelessWidget {
),
BrnTextInputFormItem(
controller: TextEditingController()..text = "300",
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
isEdit: true,
error: "必填项不能为空",
@@ -88,7 +90,7 @@ class TextInputExamplePage extends StatelessWidget {
),
BrnTextInputFormItem(
controller: TextEditingController()..text = "300",
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
isEdit: true,
title: "房屋总价",
@@ -121,7 +123,7 @@ class TextInputExamplePage extends StatelessWidget {
),
BrnTextInputFormItem(
controller: TextEditingController()..text = "300",
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
isEdit: false,
isPrefixIconEnabled: true,
diff --git a/example/lib/sample/components/form/items_example/text_quick_select_input_example.dart b/example/lib/sample/components/form/items_example/text_quick_select_input_example.dart
index 8703111f..28698733 100644
--- a/example/lib/sample/components/form/items_example/text_quick_select_input_example.dart
+++ b/example/lib/sample/components/form/items_example/text_quick_select_input_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
@@ -19,8 +21,8 @@ class _TextQuickSelectInputExamplePageState
String selectedStr = '';
String selectedStrAllFunctionExample = '';
List options = ['选项1', '选项2', '选项3', '选项4', '选项5', '选项6', '选项7'];
- List status;
- List statusAllFunctionExample;
+ late List status;
+ List? statusAllFunctionExample;
_TextQuickSelectInputExamplePageState(this._title);
@@ -92,7 +94,7 @@ class _TextQuickSelectInputExamplePageState
),
),
BrnTextQuickSelectFormItem(
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
btnsTxt: options,
selectBtnList: statusAllFunctionExample,
@@ -103,8 +105,8 @@ class _TextQuickSelectInputExamplePageState
subTitle: "这里是副标题",
tipLabel: "标签",
onBtnSelectChanged: (index) {
- statusAllFunctionExample[index] = !statusAllFunctionExample[index];
- if (statusAllFunctionExample[index]) {
+ statusAllFunctionExample![index] = !statusAllFunctionExample![index];
+ if (statusAllFunctionExample![index]) {
selectedStrAllFunctionExample += '${options[index]} ';
} else if (selectedStrAllFunctionExample.contains(options[index])) {
selectedStrAllFunctionExample = selectedStrAllFunctionExample.replaceFirst('${options[index]} ', '');
diff --git a/example/lib/sample/components/form/items_example/text_select_example.dart b/example/lib/sample/components/form/items_example/text_select_example.dart
index 3e8de41a..7a689bbd 100644
--- a/example/lib/sample/components/form/items_example/text_select_example.dart
+++ b/example/lib/sample/components/form/items_example/text_select_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
@@ -51,7 +53,7 @@ class TextSelectInputExamplePage extends StatelessWidget {
),
),
BrnTextSelectFormItem(
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
error: "必填项不能为空",
title: "证件类型",
@@ -81,7 +83,7 @@ class TextSelectInputExamplePage extends StatelessWidget {
),
),
BrnTextSelectFormItem(
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
title: "证件类型",
subTitle: "这里是副标题",
@@ -110,7 +112,7 @@ class TextSelectInputExamplePage extends StatelessWidget {
),
),
BrnTextSelectFormItem.autoLayout(
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
error: "必填项不能为空",
title: "证件类型",
diff --git a/example/lib/sample/components/form/items_example/title_example.dart b/example/lib/sample/components/form/items_example/title_example.dart
index 227cd61a..8bcd8bb2 100644
--- a/example/lib/sample/components/form/items_example/title_example.dart
+++ b/example/lib/sample/components/form/items_example/title_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
diff --git a/example/lib/sample/components/form/items_example/title_select_example.dart b/example/lib/sample/components/form/items_example/title_select_example.dart
index 698237bf..afaff9d7 100644
--- a/example/lib/sample/components/form/items_example/title_select_example.dart
+++ b/example/lib/sample/components/form/items_example/title_select_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
@@ -14,13 +16,13 @@ class TitleSelectInputExamplePage extends StatefulWidget {
}
class TitleSelectInputState extends State {
- List _list;
+ late List _list;
TextEditingController controller = TextEditingController()..text = '123456';
@override
void initState() {
super.initState();
- _list = List();
+ _list = [];
_list.add('手机号');
_list.add('座机');
}
@@ -47,7 +49,7 @@ class TitleSelectInputState extends State {
title: _list[0],
hint: "请输入",
controller: controller,
- inputFormatters: [FilteringTextInputFormatter(RegExp('[0-9"]'))],
+ inputFormatters: [FilteringTextInputFormatter.digitsOnly],
selectedIndex: -1,
selectList: _list,
onTip: () {
@@ -81,7 +83,7 @@ class TitleSelectInputState extends State {
),
BrnTitleSelectInputFormItem(
controller: TextEditingController()..text = "124",
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
isEdit: false,
error: "必填项不能为空",
@@ -119,7 +121,7 @@ class TitleSelectInputState extends State {
),
BrnTitleSelectInputFormItem(
controller: TextEditingController()..text = "124",
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
isEdit: false,
subTitle: "这里是副标题",
@@ -156,7 +158,7 @@ class TitleSelectInputState extends State {
),
BrnTitleSelectInputFormItem(
controller: TextEditingController()..text = "不可编辑时+ -号可点击",
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
isEdit: false,
isPrefixIconEnabled: false,
@@ -195,7 +197,7 @@ class TitleSelectInputState extends State {
),
BrnTitleSelectInputFormItem(
controller: TextEditingController()..text = "不可编辑时+ -号可点击",
- prefixIconType: BrnPrefixIconType.TYPE_ADD,
+ prefixIconType: BrnPrefixIconType.add,
isRequire: true,
isEdit: false,
isPrefixIconEnabled: true,
diff --git a/example/lib/sample/components/form/phote_picker_example/photo_preview_page.dart b/example/lib/sample/components/form/phote_picker_example/photo_preview_page.dart
deleted file mode 100644
index 5cd8fa5b..00000000
--- a/example/lib/sample/components/form/phote_picker_example/photo_preview_page.dart
+++ /dev/null
@@ -1,69 +0,0 @@
-import 'dart:io';
-import 'package:bruno/bruno.dart';
-import 'package:flutter/material.dart';
-import 'package:flutter_swiper/flutter_swiper.dart';
-
-/// @des:图片预览页面
-///
-
-// ignore: must_be_immutable
-class PhotoPreviewPage extends StatefulWidget {
- /// 图片地址
- List picUrl;
-
- /// 初始化角标
- int initialIndex;
-
- PhotoPreviewPage({@required this.picUrl, this.initialIndex: 0});
-
- @override
- _PhotoPreviewPageState createState() => _PhotoPreviewPageState();
-}
-
-class _PhotoPreviewPageState extends State {
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- appBar: _buildAppBar(context),
- body: _buildBody(context),
- );
- }
-
- ///
- /// 标题栏
- ///
- Widget _buildAppBar(BuildContext context) {
- return BrnAppBar(
- title: "图片详情",
- backLeadCallback: () {
- Navigator.pop(context);
- },
- );
- }
-
- ///
- /// 轮播图
- ///
- Widget _buildBody(BuildContext context) {
- return Swiper(
- itemCount: widget.picUrl.length,
- itemBuilder: (BuildContext context, int index) {
- String picUrl = widget.picUrl[index];
- if (picUrl.startsWith("http") || picUrl.startsWith("https")) {
- return FadeInImage.assetNetwork(
- placeholder: "packages/bruno/assets/" + "images/icon_alert",
- image: widget.picUrl[index],
- fit: BoxFit.fill,
- );
- } else {
- File file = File(picUrl);
- Image image = Image.file(file, fit: BoxFit.fill);
- return image;
- }
- },
- index: widget.initialIndex,
- control: new SwiperControl(),
- loop: false,
- );
- }
-}
diff --git a/example/lib/sample/components/gallery/gallery_detail_example.dart b/example/lib/sample/components/gallery/gallery_detail_example.dart
index 9680766f..1219679d 100644
--- a/example/lib/sample/components/gallery/gallery_detail_example.dart
+++ b/example/lib/sample/components/gallery/gallery_detail_example.dart
@@ -1,10 +1,12 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
enum PhotoGalleryTheme { dark, light }
class GalleryDetailExamplePage extends StatefulWidget {
- final String title;
+ final String? title;
final PhotoGalleryTheme photoGalleryTheme;
GalleryDetailExamplePage({this.title, this.photoGalleryTheme = PhotoGalleryTheme.dark});
@@ -16,8 +18,8 @@ class GalleryDetailExamplePage extends StatefulWidget {
}
class GalleryDetailExamplePageState extends State {
- List allConfig;
- BrnGalleryController controller;
+ late List allConfig;
+ late BrnGalleryController controller;
@override
void initState() {
@@ -171,8 +173,8 @@ class GalleryDetailExamplePageState extends State {
BrnToast.show("点击了$i $j", context);
// 移除第二组的最后一个配置,跳转到 第二组的第一张图
if (allConfig.length > 1) {
- if (allConfig[1].configList.length > 0) {
- allConfig[1].configList.removeLast();
+ if (allConfig[1].configList!.length > 0) {
+ allConfig[1].configList!.removeLast();
controller.refresh(1, 0);
} else {
allConfig.removeAt(1);
diff --git a/example/lib/sample/components/gallery/gallery_detail_page_theme_example.dart b/example/lib/sample/components/gallery/gallery_detail_page_theme_example.dart
index b47d65c6..88ea69ac 100644
--- a/example/lib/sample/components/gallery/gallery_detail_page_theme_example.dart
+++ b/example/lib/sample/components/gallery/gallery_detail_page_theme_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:example/sample/components/gallery/gallery_detail_example.dart';
import 'package:example/sample/home/list_item.dart';
diff --git a/example/lib/sample/components/gallery/gallery_example.dart b/example/lib/sample/components/gallery/gallery_example.dart
index 1df173bf..fe88e811 100644
--- a/example/lib/sample/components/gallery/gallery_example.dart
+++ b/example/lib/sample/components/gallery/gallery_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:example/sample/components/gallery/gallery_detail_page_theme_example.dart';
import 'package:example/sample/home/list_item.dart';
@@ -88,7 +90,7 @@ class GalleryExample extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
appBar: BrnAppBar(
- title: "步骤条示例",
+ title: "Gallery 图片",
),body: ListView(children: [
ListItem(
title: "图片选择控件",
diff --git a/example/lib/sample/components/guide/force_guide_example.dart b/example/lib/sample/components/guide/force_guide_example.dart
index 0803c653..e3e6b3c5 100644
--- a/example/lib/sample/components/guide/force_guide_example.dart
+++ b/example/lib/sample/components/guide/force_guide_example.dart
@@ -1,17 +1,19 @@
+
+
import 'dart:async';
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
/// @desc 强引导example
class ForceGuideExample extends StatefulWidget {
- ForceGuideExample({Key key}) : super(key: key);
+ ForceGuideExample({Key? key}) : super(key: key);
@override
_ForceGuideExampleState createState() => _ForceGuideExampleState();
}
class _ForceGuideExampleState extends State {
- BrnGuide intro;
+ late BrnGuide intro;
_ForceGuideExampleState() {
/// init Guide
diff --git a/example/lib/sample/components/guide/guide_entry_page.dart b/example/lib/sample/components/guide/guide_entry_page.dart
index a48c0515..f15dc4b7 100644
--- a/example/lib/sample/components/guide/guide_entry_page.dart
+++ b/example/lib/sample/components/guide/guide_entry_page.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:example/sample/components/guide/force_guide_example.dart';
import 'package:example/sample/components/guide/soft_intro_example.dart';
diff --git a/example/lib/sample/components/guide/soft_intro_example.dart b/example/lib/sample/components/guide/soft_intro_example.dart
index 2fed63f6..fcb0a12f 100644
--- a/example/lib/sample/components/guide/soft_intro_example.dart
+++ b/example/lib/sample/components/guide/soft_intro_example.dart
@@ -1,3 +1,5 @@
+
+
import 'dart:async';
import 'package:bruno/bruno.dart';
@@ -5,14 +7,14 @@ import 'package:flutter/material.dart';
/// @desc 弱引导example
class SoftGuideExample extends StatefulWidget {
- SoftGuideExample({Key key}) : super(key: key);
+ SoftGuideExample({Key? key}) : super(key: key);
@override
_SoftGuideExampleState createState() => _SoftGuideExampleState();
}
class _SoftGuideExampleState extends State {
- BrnGuide intro;
+ late BrnGuide intro;
_SoftGuideExampleState() {
/// init Guide
diff --git a/example/lib/sample/components/input/input_example.dart b/example/lib/sample/components/input/input_example.dart
index a6e654b9..0aceb62b 100644
--- a/example/lib/sample/components/input/input_example.dart
+++ b/example/lib/sample/components/input/input_example.dart
@@ -1,9 +1,11 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
class TextModel {
- String text;
+ String? text;
}
class BrnInputTextExample extends StatefulWidget {
@@ -46,8 +48,8 @@ class _BrnInputTextExampleState extends State {
minHeight: 30,
minLines: 1,
maxLength: 10,
- bgColor: Colors.grey[200],
- textString: model.text,
+ bgColor: Colors.grey[200]!,
+ textString: model.text ?? '',
textInputAction: TextInputAction.newline,
maxHintLines: 20,
hint: 'input动态算高input动态算高input动态算高input动态算高input动态算高',
diff --git a/example/lib/sample/components/line/dashed_line_example.dart b/example/lib/sample/components/line/dashed_line_example.dart
index 8ffd30a6..08cf4ff7 100644
--- a/example/lib/sample/components/line/dashed_line_example.dart
+++ b/example/lib/sample/components/line/dashed_line_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -33,7 +35,7 @@ class _DashedLineExampleState extends State {
axis: Axis.vertical,
color: Colors.red,
dashedOffset: 20,
- position: BrnDashedLinePosition.DashedLineLeading,
+ position: BrnDashedLinePosition.leading,
contentWidget: Container(
margin: EdgeInsets.only(left: 60, right: 20, top: 10, bottom: 10),
child:
@@ -54,7 +56,7 @@ class _DashedLineExampleState extends State {
axis: Axis.horizontal,
color: Colors.green,
dashedOffset: 20,
- position: BrnDashedLinePosition.DashedLineLeading,
+ position: BrnDashedLinePosition.leading,
contentWidget: Container(
width: 200,
height: 100,
@@ -75,7 +77,10 @@ class _DashedLineExampleState extends State {
color: Colors.red,
child: BrnDashedLine(
axis: Axis.horizontal,
- dashedOffset: 10,
+ dashedOffset: 10, contentWidget: Container(
+ width: 200,
+ height: 100,
+ ),
),
),
],
diff --git a/example/lib/sample/components/loading/loading_widget_example.dart b/example/lib/sample/components/loading/loading_widget_example.dart
index f1f64c84..53b9aa05 100644
--- a/example/lib/sample/components/loading/loading_widget_example.dart
+++ b/example/lib/sample/components/loading/loading_widget_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
diff --git a/example/lib/sample/components/navbar/appbar_entry_page.dart b/example/lib/sample/components/navbar/appbar_entry_page.dart
index 31f4f747..b800a595 100644
--- a/example/lib/sample/components/navbar/appbar_entry_page.dart
+++ b/example/lib/sample/components/navbar/appbar_entry_page.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:example/sample/home/list_item.dart';
import 'package:example/sample/components/navbar/nav_bar_example_page.dart';
diff --git a/example/lib/sample/components/navbar/nav_bar_example_page.dart b/example/lib/sample/components/navbar/nav_bar_example_page.dart
index fa51a1ef..d0870d2a 100644
--- a/example/lib/sample/components/navbar/nav_bar_example_page.dart
+++ b/example/lib/sample/components/navbar/nav_bar_example_page.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
@@ -12,25 +14,25 @@ class NavBarPage extends StatefulWidget {
}
class _NavBarPageState extends State with TickerProviderStateMixin {
- TextEditingController textEditingController;
+ TextEditingController? textEditingController;
- TextStyle selectedHeiStyle;
- TextStyle unSelectedHeiStyle;
- TextStyle commonHeiStyle;
+ TextStyle? selectedHeiStyle;
+ TextStyle? unSelectedHeiStyle;
+ TextStyle? commonHeiStyle;
- TextStyle selectedBaiStyle;
- TextStyle unSelectedBaiStyle;
- TextStyle commonBaiStyle;
+ TextStyle? selectedBaiStyle;
+ TextStyle? unSelectedBaiStyle;
+ TextStyle? commonBaiStyle;
int currentIndex = 0;
- ValueNotifier valueNotifier;
- FocusNode focusNode;
+ late ValueNotifier valueNotifier;
+ FocusNode? focusNode;
- TabController tabController;
+ TabController? tabController;
- var keyleading = GlobalKey();
+ GlobalKey keyLeading = GlobalKey();
- var actionKey = GlobalKey();
+ GlobalKey actionKey = GlobalKey();
@override
void initState() {
@@ -52,8 +54,8 @@ class _NavBarPageState extends State with TickerProviderStateMixin {
commonBaiStyle = TextStyle(fontSize: 18, fontWeight: FontWeight.w600, color: Color(0xFF222222));
focusNode = FocusNode();
- focusNode.addListener(() {
- if (focusNode.hasFocus) {
+ focusNode!.addListener(() {
+ if (focusNode!.hasFocus) {
valueNotifier.value = true;
}
});
@@ -69,8 +71,8 @@ class _NavBarPageState extends State with TickerProviderStateMixin {
);
}
- PreferredSizeWidget buildBarByIndex(BuildContext context) {
- PreferredSizeWidget appBar;
+ PreferredSizeWidget? buildBarByIndex(BuildContext context) {
+ PreferredSizeWidget? appBar;
switch (widget.index) {
case 0:
//2个文字模块切换 左右两个icon hei
@@ -142,8 +144,8 @@ class _NavBarPageState extends State with TickerProviderStateMixin {
return appBar;
}
- Widget buildContentByIndex(BuildContext context) {
- Widget widget;
+ Widget? buildContentByIndex(BuildContext context) {
+ Widget? widget;
switch (this.widget.index) {
case 0:
widget =
@@ -475,7 +477,7 @@ class _NavBarPageState extends State with TickerProviderStateMixin {
leading: Padding(
padding: const EdgeInsets.only(right: 16),
child: Row(
- key: keyleading,
+ key: keyLeading,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
@@ -501,7 +503,7 @@ class _NavBarPageState extends State with TickerProviderStateMixin {
//update 是setState方法的方法命,update() 就可以刷新输入框
BrnPopupListWindow.showPopListWindow(
context,
- keyleading,
+ keyLeading,
data: ["aaaa", "bbbbb"],
);
},
@@ -538,7 +540,7 @@ class _NavBarPageState extends State with TickerProviderStateMixin {
leading: Padding(
padding: const EdgeInsets.only(right: 16),
child: Row(
- key: keyleading,
+ key: keyLeading,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
@@ -561,7 +563,7 @@ class _NavBarPageState extends State with TickerProviderStateMixin {
leadClickCallback: (controller, update) {
//controller 是文本控制器,通过controller 可以拿到输入的内容 以及 对输入的内容更改
//update 是setState方法的方法命,update() 就可以刷新输入框
- BrnPopupListWindow.showPopListWindow(context, keyleading, data: ["aaaa", "bbbbb"]);
+ BrnPopupListWindow.showPopListWindow(context, keyLeading, data: ["aaaa", "bbbbb"]);
},
//输入框 文本内容变化的监听
searchBarInputChangeCallback: (input) {
diff --git a/example/lib/sample/components/noticebar/brn_notice_bar_example.dart b/example/lib/sample/components/noticebar/brn_notice_bar_example.dart
index fa7c06b2..94eec187 100644
--- a/example/lib/sample/components/noticebar/brn_notice_bar_example.dart
+++ b/example/lib/sample/components/noticebar/brn_notice_bar_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:example/sample/home/list_item.dart';
import 'package:example/sample/components/noticebar/notice_bar_example.dart';
diff --git a/example/lib/sample/components/noticebar/notice_bar_example.dart b/example/lib/sample/components/noticebar/notice_bar_example.dart
index 438dc52a..073ac2c4 100644
--- a/example/lib/sample/components/noticebar/notice_bar_example.dart
+++ b/example/lib/sample/components/noticebar/notice_bar_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
diff --git a/example/lib/sample/components/noticebar/notice_bar_with_button_example.dart b/example/lib/sample/components/noticebar/notice_bar_with_button_example.dart
index 4f710353..be11f666 100644
--- a/example/lib/sample/components/noticebar/notice_bar_with_button_example.dart
+++ b/example/lib/sample/components/noticebar/notice_bar_with_button_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
diff --git a/example/lib/sample/components/picker/cutomer_bottom_picker_example.dart b/example/lib/sample/components/picker/cutomer_bottom_picker_example.dart
index 144f9981..e63e6188 100644
--- a/example/lib/sample/components/picker/cutomer_bottom_picker_example.dart
+++ b/example/lib/sample/components/picker/cutomer_bottom_picker_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:example/sample/home/list_item.dart';
import 'package:flutter/material.dart';
diff --git a/example/lib/sample/components/picker/date_picker_example.dart b/example/lib/sample/components/picker/date_picker_example.dart
index 46408e2b..ece9492a 100644
--- a/example/lib/sample/components/picker/date_picker_example.dart
+++ b/example/lib/sample/components/picker/date_picker_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:example/sample/home/list_item.dart';
import 'package:flutter/material.dart';
@@ -154,7 +156,7 @@ class DatePickerExamplePage extends StatelessWidget {
format = 'HH时:mm分';
BrnPickerTitleConfig timePickerTheme = BrnPickerTitleConfig(
title: BrnPickerTitleConfig.Default.title,
- showTitle: PICKER_SHOW_TITLE_DEFAULT,
+ showTitle: pickerShowTitleDefault,
titleContent: "选择时间范围");
BrnDateRangePicker.showDatePicker(context,
minDateTime: DateTime.parse(MIN_DATETIME),
diff --git a/example/lib/sample/components/picker/multi_picker_example.dart b/example/lib/sample/components/picker/multi_picker_example.dart
index 00ff73c3..b1aa2b87 100644
--- a/example/lib/sample/components/picker/multi_picker_example.dart
+++ b/example/lib/sample/components/picker/multi_picker_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:example/sample/home/list_item.dart';
import 'package:flutter/material.dart';
@@ -180,7 +182,7 @@ class Brn1RowDelegate implements BrnMultiDataPickerDelegate {
}
@override
- double rowHeightForComponent(int component) {
+ double? rowHeightForComponent(int component) {
return null;
}
@@ -247,7 +249,7 @@ class Brn2RowDelegate implements BrnMultiDataPickerDelegate {
}
@override
- double rowHeightForComponent(int component) {
+ double? rowHeightForComponent(int component) {
return null;
}
@@ -324,7 +326,7 @@ class Brn3RowDelegate implements BrnMultiDataPickerDelegate {
}
@override
- double rowHeightForComponent(int component) {
+ double? rowHeightForComponent(int component) {
return null;
}
@@ -384,7 +386,7 @@ class Brn2RowCustomDelegate implements BrnMultiDataPickerDelegate {
}
@override
- double rowHeightForComponent(int component) {
+ double? rowHeightForComponent(int component) {
return null;
}
diff --git a/example/lib/sample/components/picker/picker_entry_page.dart b/example/lib/sample/components/picker/picker_entry_page.dart
index 508db7ca..33b907a5 100644
--- a/example/lib/sample/components/picker/picker_entry_page.dart
+++ b/example/lib/sample/components/picker/picker_entry_page.dart
@@ -1,3 +1,5 @@
+
+
import 'dart:convert';
import 'package:bruno/bruno.dart';
@@ -11,7 +13,7 @@ import 'multi_picker_example.dart';
class PickerEntryPage extends StatelessWidget {
final String _title;
- List dataList = List();
+ List dataList = [];
PickerEntryPage(this._title);
@@ -80,11 +82,11 @@ class PickerEntryPage extends StatelessWidget {
describe: "底部级联选择框",
onPressed: () {
rootBundle.loadString('assets/list_picker.json').then((data) {
- List _selectionData = List()
- ..addAll((JsonDecoder().convert(data)["data"]['list'] as List ?? [])
+ List _selectionData = []
+ ..addAll((JsonDecoder().convert(data)["data"]['list'] as List? ?? [])
.map((o) => BrnPickerEntity.fromMap(o)));
- if (_selectionData != null && _selectionData.length > 0) {
- _selectionData?.forEach((f) => f.configChild());
+ if ( _selectionData.length > 0) {
+ _selectionData.forEach((f) => f.configChild());
if (dataList.length == 0) {
dataList.addAll(_selectionData);
}
@@ -98,11 +100,11 @@ class PickerEntryPage extends StatelessWidget {
describe: "底部级联选择框(Title 动态改变)",
onPressed: () {
rootBundle.loadString('assets/list_picker.json').then((data) {
- List _selectionData = List()
- ..addAll((JsonDecoder().convert(data)["data"]['list'] as List ?? [])
+ List _selectionData = []
+ ..addAll((JsonDecoder().convert(data)["data"]['list'] as List? ?? [])
.map((o) => BrnPickerEntity.fromMap(o)));
- if (_selectionData != null && _selectionData.length > 0) {
- _selectionData?.forEach((f) => f.configChild());
+ if (_selectionData.length > 0) {
+ _selectionData.forEach((f) => f.configChild());
if (dataList.length == 0) {
dataList.addAll(_selectionData);
}
@@ -129,7 +131,7 @@ class PickerEntryPage extends StatelessWidget {
///多选弹框
void _showBottomMultiSelectPicker(BuildContext context) {
- List items = new List();
+ List items = [];
items.add(new BrnMultiSelectBottomPickerItem("100", "这里是标题1"));
items.add(new BrnMultiSelectBottomPickerItem("101", "这里是标题2"));
items.add(new BrnMultiSelectBottomPickerItem("102", "这里是标题3", isChecked: true));
@@ -153,7 +155,7 @@ class PickerEntryPage extends StatelessWidget {
/// 实现限制选择数量的情况
void _showCountLimitBottomMultiSelectPicker(BuildContext context) {
- List items = new List();
+ List items = [];
items.add(new BrnMultiSelectBottomPickerItem("100", "这里是标题1"));
items.add(new BrnMultiSelectBottomPickerItem("101", "这里是标题2"));
items.add(new BrnMultiSelectBottomPickerItem("102", "这里是标题3", isChecked: true));
@@ -201,7 +203,7 @@ class PickerEntryPage extends StatelessWidget {
cancelDismiss: true,
confirmDismiss: false,
onConfirm: (context, string) {
- BrnToast.show(string, context);
+ BrnToast.show(string ?? '', context);
return;
},
onCancel: (_) {
@@ -213,15 +215,15 @@ class PickerEntryPage extends StatelessWidget {
}
void _showRangePicker(BuildContext context, List _selectionData) {
- _selectionData?.forEach((f) => f.configChild());
+ _selectionData.forEach((f) => f.configChild());
var selectionMenuView = BrnMultiColumnPicker(
entity: _selectionData[3],
defaultFocusedIndexes: [0, -1, -1],
- onConfirm: (Map> result, int firstIndex,
- int secondIndex, int thirdIndex) {
- List pickResult = List();
+ onConfirm: (Map> result, int? firstIndex,
+ int? secondIndex, int? thirdIndex) {
+ List pickResult = [];
result.forEach((key, val) {
- List tmp = List();
+ List tmp = [];
val.forEach((item) {
tmp.add(item.name);
});
@@ -243,7 +245,7 @@ class PickerEntryPage extends StatelessWidget {
}
void _showRangePicker1(BuildContext context, List _selectionData) {
- _selectionData?.forEach((f) => f.configChild());
+ _selectionData.forEach((f) => f.configChild());
String titleName = "测试标题";
showModalBottomSheet(
context: context,
@@ -253,11 +255,11 @@ class PickerEntryPage extends StatelessWidget {
pickerTitleConfig: BrnPickerTitleConfig(titleContent: titleName),
entity: _selectionData[3],
defaultFocusedIndexes: [0, -1, -1],
- onConfirm: (Map> result, int firstIndex,
- int secondIndex, int thirdIndex) {
- List pickResult = List();
+ onConfirm: (Map> result, int? firstIndex,
+ int? secondIndex, int? thirdIndex) {
+ List pickResult = [];
result.forEach((key, val) {
- List tmp = List();
+ List tmp = [];
val.forEach((item) {
tmp.add(item.name);
});
@@ -291,7 +293,7 @@ class PickerEntryPage extends StatelessWidget {
'可爱多池',
];
- List items = List();
+ List items = [];
for (int i = 0; i < tags.length; i++) {
String it = tags[i];
BrnTagItemBean item = BrnTagItemBean(name: it, code: it, index: i);
@@ -348,10 +350,10 @@ class PickerEntryPage extends StatelessWidget {
'我是可选择的标签1',
];
- List items = List();
+ List items = [];
for (int i = 0; i < tags.length; i++) {
String it = tags[i];
- BrnTagInputItemBean item = BrnTagInputItemBean(name: it, index: i, needExplane: (i % 2 == 0));
+ BrnTagInputItemBean item = BrnTagInputItemBean(name: it, index: i, needExpend: (i % 2 == 0));
items.add(item);
}
@@ -369,8 +371,8 @@ class PickerEntryPage extends StatelessWidget {
tagItemSource: items,
tagTitleFontSize: 12,
tagTitleColor: Color(0xff222222),
- tagBackgroudColor: Color(0xffF8F8F8),
- selectedTagBackgroudColor: Color(0x140984F9),
+ tagBackgroundColor: Color(0xffF8F8F8),
+ selectedTagBackgroundColor: Color(0x140984F9),
selectedTagTitleColor: Color(0xFF0984F9),
),
onTagValueGetter: (choice) {
diff --git a/example/lib/sample/components/popup/overlay_window_example.dart b/example/lib/sample/components/popup/overlay_window_example.dart
index cad07a2c..458ba188 100644
--- a/example/lib/sample/components/popup/overlay_window_example.dart
+++ b/example/lib/sample/components/popup/overlay_window_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -11,9 +13,9 @@ class OverlayWindowExample extends StatefulWidget {
}
class OverlayWindowExamplePageState extends State {
- BrnOverlayController _overlayController;
- var _focusNode = FocusNode();
- var _searchBarKey = GlobalKey();
+ BrnOverlayController? _overlayController;
+ FocusNode _focusNode = FocusNode();
+ GlobalKey _searchBarKey = GlobalKey();
@override
void initState() {
@@ -66,7 +68,7 @@ class OverlayWindowExamplePageState extends State {
_overlayController?.removeOverlay();
return;
}
- if (_overlayController == null || _overlayController.isOverlayShowing == false) {
+ if (_overlayController == null || _overlayController!.isOverlayShowing == false) {
_overlayController = BrnOverlayWindow.showOverlayWindow(context, _searchBarKey,
content: _sugListView(),
autoDismissOnTouchOutSide: true,
diff --git a/example/lib/sample/components/popup/popwindow_example.dart b/example/lib/sample/components/popup/popwindow_example.dart
index cb01d1d6..0645716f 100644
--- a/example/lib/sample/components/popup/popwindow_example.dart
+++ b/example/lib/sample/components/popup/popwindow_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -11,19 +13,19 @@ class PopWindowExamplePage extends StatefulWidget {
}
class PopWindowExamplePageState extends State {
- GlobalKey _leftKeylist0;
- GlobalKey _leftKeylist1;
- GlobalKey _leftKeylist2;
- GlobalKey _leftKey;
- GlobalKey _leftKey1;
- GlobalKey _leftKey2;
- GlobalKey _leftKey3;
- GlobalKey _leftKey4;
- GlobalKey _leftKey5;
- GlobalKey _leftKey6;
- GlobalKey _leftKey7;
+ GlobalKey? _leftKeylist0;
+ GlobalKey? _leftKeylist1;
+ GlobalKey? _leftKeylist2;
+ GlobalKey? _leftKey;
+ GlobalKey? _leftKey1;
+ GlobalKey? _leftKey2;
+ GlobalKey? _leftKey3;
+ GlobalKey? _leftKey4;
+ GlobalKey? _leftKey5;
+ GlobalKey? _leftKey6;
+ GlobalKey? _leftKey7;
- BrnOverlayController overlayController;
+ BrnOverlayController? overlayController;
@override
void initState() {
@@ -43,7 +45,6 @@ class PopWindowExamplePageState extends State {
@override
Widget build(BuildContext context) {
- double top = MediaQuery.of(context).padding.top ?? 0;
return Scaffold(
appBar: BrnAppBar(
title: widget._title,
@@ -57,7 +58,7 @@ class PopWindowExamplePageState extends State {
child: RaisedButton(
key: _leftKey,
onPressed: () {
- BrnPopupWindow.showPopWindow(context, "提示内容", _leftKey,
+ BrnPopupWindow.showPopWindow(context, "提示内容", _leftKey!,
hasCloseIcon: true);
},
child: Text("左侧带关闭Tips"),
@@ -68,7 +69,7 @@ class PopWindowExamplePageState extends State {
child: RaisedButton(
key: _leftKey1,
onPressed: () {
- BrnPopupWindow.showPopWindow(context, "提示内容提示内容提示内容提示内容提示内容提示内容提示内容提示内容", _leftKey1,
+ BrnPopupWindow.showPopWindow(context, "提示内容提示内容提示内容提示内容提示内容提示内容提示内容提示内容", _leftKey1!,
hasCloseIcon: false);
},
child: Text("左侧带无关闭Tips"),
@@ -79,7 +80,7 @@ class PopWindowExamplePageState extends State {
child: RaisedButton(
key: _leftKey2,
onPressed: () {
- BrnPopupWindow.showPopWindow(context, "提示内容提示内容提示内容提示内容提示内容提示内容提示内容提示内容提示内容", _leftKey2,
+ BrnPopupWindow.showPopWindow(context, "提示内容提示内容提示内容提示内容提示内容提示内容提示内容提示内容提示内容", _leftKey2!,
popDirection: BrnPopupDirection.top, hasCloseIcon: true);
},
child: Text("左侧带关闭,箭头朝下Tips"),
@@ -90,7 +91,7 @@ class PopWindowExamplePageState extends State {
child: RaisedButton(
key: _leftKey3,
onPressed: () {
- BrnPopupWindow.showPopWindow(context, "提示内容提示内容提示内容提示内容提示内容提示内容提示内容提示内容", _leftKey3,
+ BrnPopupWindow.showPopWindow(context, "提示内容提示内容提示内容提示内容提示内容提示内容提示内容提示内容", _leftKey3!,
dismissCallback: () {}, popDirection: BrnPopupDirection.top);
},
child: Text("左侧无关闭,箭头朝下Tips"),
@@ -101,7 +102,7 @@ class PopWindowExamplePageState extends State {
child: RaisedButton(
key: _leftKey4,
onPressed: () {
- BrnPopupWindow.showPopWindow(context, "提示内容提示内容提示内容提示内容提示内容提示内容提示内容提示内容", _leftKey4,
+ BrnPopupWindow.showPopWindow(context, "提示内容提示内容提示内容提示内容提示内容提示内容提示内容提示内容", _leftKey4!,
hasCloseIcon: true,
dismissCallback: () {},
popDirection: BrnPopupDirection.bottom);
@@ -114,7 +115,7 @@ class PopWindowExamplePageState extends State {
child: RaisedButton(
key: _leftKey5,
onPressed: () {
- BrnPopupWindow.showPopWindow(context, "提示内容提示内容提示内容提示内容", _leftKey5,
+ BrnPopupWindow.showPopWindow(context, "提示内容提示内容提示内容提示内容", _leftKey5!,
hasCloseIcon: false,
dismissCallback: () {},
popDirection: BrnPopupDirection.bottom);
@@ -127,7 +128,7 @@ class PopWindowExamplePageState extends State {
child: RaisedButton(
key: _leftKey6,
onPressed: () {
- BrnPopupWindow.showPopWindow(context, "提示内容提示内容提示内容提示内容提示内容提示内容", _leftKey6,
+ BrnPopupWindow.showPopWindow(context, "提示内容提示内容提示内容提示内容提示内容提示内容", _leftKey6!,
hasCloseIcon: true,
canWrap: false,
dismissCallback: () {},
@@ -141,7 +142,7 @@ class PopWindowExamplePageState extends State {
child: RaisedButton(
key: _leftKey7,
onPressed: () {
- BrnPopupWindow.showPopWindow(context, "提示内容提示内容提示内容提示内容提示内容提示内容", _leftKey7,
+ BrnPopupWindow.showPopWindow(context, "提示内容提示内容提示内容提示内容提示内容提示内容", _leftKey7!,
hasCloseIcon: false,
dismissCallback: () {},
popDirection: BrnPopupDirection.top);
diff --git a/example/lib/sample/components/rating/rating_example.dart b/example/lib/sample/components/rating/rating_example.dart
index 4c1addfc..61acdb71 100644
--- a/example/lib/sample/components/rating/rating_example.dart
+++ b/example/lib/sample/components/rating/rating_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -72,12 +74,12 @@ class _RatingExampleState extends State {
Widget _buildRating(RatingState state) {
switch (state) {
case RatingState.select:
- return BrunoTools.getAssetSizeImage(BrnAsset.ICON_STAR, 16, 16, color: Color(0xFF3571DC));
+ return BrunoTools.getAssetSizeImage(BrnAsset.iconStar, 16, 16, color: Color(0xFF3571DC));
case RatingState.half:
- return BrunoTools.getAssetSizeImage(BrnAsset.ICON_STAR_HALF, 16, 16);
+ return BrunoTools.getAssetSizeImage(BrnAsset.iconStarHalf, 16, 16);
case RatingState.unselect:
default:
- return BrunoTools.getAssetSizeImage(BrnAsset.ICON_STAR, 16, 16, color: Color(0xFFF0F0F0));
+ return BrunoTools.getAssetSizeImage(BrnAsset.iconStar, 16, 16, color: Color(0xFFF0F0F0));
}
}
}
diff --git a/example/lib/sample/components/scroll_anchor/scroll_actor_tab_example.dart b/example/lib/sample/components/scroll_anchor/scroll_actor_tab_example.dart
index 9060636a..ffba733b 100644
--- a/example/lib/sample/components/scroll_anchor/scroll_actor_tab_example.dart
+++ b/example/lib/sample/components/scroll_anchor/scroll_actor_tab_example.dart
@@ -1,3 +1,5 @@
+
+
import 'dart:math';
import 'package:bruno/bruno.dart';
diff --git a/example/lib/sample/components/selectcity/selected_city_example.dart b/example/lib/sample/components/selectcity/selected_city_example.dart
index 9082bd77..0f6fdfb6 100644
--- a/example/lib/sample/components/selectcity/selected_city_example.dart
+++ b/example/lib/sample/components/selectcity/selected_city_example.dart
@@ -1,3 +1,5 @@
+
+
import 'dart:convert';
import 'package:bruno/bruno.dart';
@@ -13,8 +15,8 @@ class CitySelectRoute extends StatefulWidget {
}
class _CitySelectRouteState extends State {
- List _cityList = List();
- List _hotCityList = List();
+ List _cityList = [];
+ List _hotCityList = [];
int _suspensionHeight = 40;
int _itemHeight = 50;
@@ -44,7 +46,7 @@ class _CitySelectRouteState extends State {
}
void _handleList(List list) {
- if (list == null || list.isEmpty) return;
+ if (list.isEmpty) return;
for (int i = 0, length = list.length; i < length; i++) {
String pinyin = PinyinHelper.getPinyinE(list[i].name);
String tag = pinyin.substring(0, 1).toUpperCase();
@@ -132,7 +134,7 @@ class _CitySelectRouteState extends State {
flex: 1,
child: AzListView(
data: _cityList,
- itemBuilder: (context, model) => _buildListItem(model),
+ itemBuilder: (context, model) => _buildListItem(model as BrnSelectCityModel),
suspensionWidget: _buildSusWidget(_suspensionTag),
isUseRealIndex: true,
itemHeight: _itemHeight,
diff --git a/example/lib/sample/components/selection/filter_entity.dart b/example/lib/sample/components/selection/filter_entity.dart
index 23f2d8e5..50d19dfb 100644
--- a/example/lib/sample/components/selection/filter_entity.dart
+++ b/example/lib/sample/components/selection/filter_entity.dart
@@ -1,17 +1,17 @@
+
+
import 'package:bruno/bruno.dart';
class BrnFilterEntity {
- String key;
- String name;
- String defaultValue;
- List children;
+ String? key;
+ late String name;
+ String? defaultValue;
+ late List children;
BrnFilterEntity.fromJson(Map map) {
- if (map == null) return;
- key = map['key'] ?? "";
- name = map['title'] ?? "";
- defaultValue = map['defaultValue'] ?? "";
- children = List()
- ..addAll((map['children'] as List ?? []).map((o) => ItemEntity.fromJson(o)));
+ key = map['key'] ?? '';
+ name = map['title'] ?? '';
+ defaultValue = map['defaultValue'] ?? '';
+ children = []..addAll((map['children'] as List? ?? []).map((o) => ItemEntity.fromJson(o)));
}
}
diff --git a/example/lib/sample/components/selection/flat_selection_five_tags_example.dart b/example/lib/sample/components/selection/flat_selection_five_tags_example.dart
index e4e7f2e6..6cd63d43 100644
--- a/example/lib/sample/components/selection/flat_selection_five_tags_example.dart
+++ b/example/lib/sample/components/selection/flat_selection_five_tags_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -12,11 +14,11 @@ class NewSelectionViewExamplePage23 extends StatefulWidget {
}
class _SelectionViewExamplePageState extends State {
- BrnSelectionEntity entity;
+ BrnSelectionEntity? entity;
- BrnFlatSelectionController controller;
+ BrnFlatSelectionController? controller;
- var selectionKey = GlobalKey();
+ GlobalKey selectionKey = GlobalKey();
bool _isShow = true;
@@ -29,7 +31,7 @@ class _SelectionViewExamplePageState extends State {
- BrnSelectionEntity entity;
+ BrnSelectionEntity? entity;
- BrnFlatSelectionController controller;
+ BrnFlatSelectionController? controller;
var selectionKey = GlobalKey();
@@ -29,7 +31,7 @@ class _SelectionViewExamplePageState extends State
@override
void dispose() {
- controller.dispose();
+ controller!.dispose();
controller = null;
super.dispose();
}
@@ -109,7 +111,7 @@ class _SelectionViewExamplePageState extends State
),
onTap: () {
if (controller != null) {
- controller.resetSelectedOptions();
+ controller!.resetSelectedOptions();
}
},
),
@@ -122,7 +124,7 @@ class _SelectionViewExamplePageState extends State
title: "取消",
onTap: () {
if (controller != null) {
- controller.cancelSelectedOptions();
+ controller!.cancelSelectedOptions();
setState(() {
_isShow = false;
});
@@ -136,7 +138,7 @@ class _SelectionViewExamplePageState extends State
title: "确定",
onTap: () {
if (controller != null) {
- controller.confirmSelectedOptions();
+ controller!.confirmSelectedOptions();
setState(() {
_isShow = false;
});
diff --git a/example/lib/sample/components/selection/flat_selection_three_tags_example.dart b/example/lib/sample/components/selection/flat_selection_three_tags_example.dart
index 16de0f0a..73f60dbc 100644
--- a/example/lib/sample/components/selection/flat_selection_three_tags_example.dart
+++ b/example/lib/sample/components/selection/flat_selection_three_tags_example.dart
@@ -1,3 +1,5 @@
+
+
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -12,9 +14,9 @@ class FlatSelectionThreeTagsExample extends StatefulWidget {
}
class _SelectionViewExamplePageState extends State