diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8b8c0e59..0f588ea9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,7 +6,6 @@
- **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
- **Breaking change**: remove BrnHorizontalStepsManager
and put function forwardStep()
backStep()
into BrnStepsController
thanks to leftcoding.
@@ -14,8 +13,9 @@
- 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
-- BrnPairInfoTable
: add attribute defaultVerticalAlignment
+- BrnBubbleText
: add attribute bgColor
and textStyle
.
+- BrnPairInfoTable
: add attribute defaultVerticalAlignment
.
+- BrnDialog
: remove BrnDialogStyle
and replace with BrnDialogConfig
.
diff --git a/example/lib/main.dart b/example/lib/main.dart
index dff77517..202b0652 100644
--- a/example/lib/main.dart
+++ b/example/lib/main.dart
@@ -1,5 +1,3 @@
-
-
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 7ce508f2..88d57b90 100644
--- a/example/lib/sample/components/actionsheet/actionsheet_entry_page.dart
+++ b/example/lib/sample/components/actionsheet/actionsheet_entry_page.dart
@@ -1,5 +1,3 @@
-
-
import 'dart:async';
import 'package:bruno/bruno.dart';
@@ -157,18 +155,18 @@ class _ActionSheetEntryPageState extends State {
});
}
- void _showCommonStylex(){
+ void _showCommonStylex() {
List actions = [];
// 构建标题+辅助信息的普通项
actions.add(BrnCommonActionSheetItem(
- '选项一(警示项)',
- desc:'辅助信息辅助信息辅助信息辅助信息',
+ '选项一(警示项)',
+ desc: '辅助信息辅助信息辅助信息辅助信息',
actionStyle: BrnCommonActionSheetItemStyle.alert,
));
// 构建标题+辅助信息的普通项
actions.add(BrnCommonActionSheetItem(
- '选项二',
- desc:'辅助信息辅助信息辅助信息',
+ '选项二',
+ desc: '辅助信息辅助信息辅助信息',
actionStyle: BrnCommonActionSheetItemStyle.normal,
));
// 构建只有标题的普通项
@@ -189,7 +187,6 @@ class _ActionSheetEntryPageState extends State {
},
);
});
-
}
void _showCommonStyle1(BuildContext context) {
@@ -260,7 +257,7 @@ class _ActionSheetEntryPageState extends State {
}
void _showCommonCustomStyle(BuildContext context) {
- List actions =[];
+ List actions = [];
actions.add(
BrnCommonActionSheetItem(
'选项一: 自定义主标题样式',
@@ -354,7 +351,8 @@ class _ActionSheetEntryPageState extends State {
backgroundColor: Colors.transparent,
builder: (BuildContext context) {
// 通过statefulBuilder可以实现动态变换选项文案(本example只作为使用参考,请根据具体情况选择方式)
- return StatefulBuilder(builder: (BuildContext context, StateSetter setState) {
+ return StatefulBuilder(
+ builder: (BuildContext context, StateSetter setState) {
if (!started) {
started = true;
// 设置timer,每1秒循环一次
@@ -428,7 +426,8 @@ class _ActionSheetEntryPageState extends State {
firstShareChannels: firstRowList,
clickCallBack: (int section, int index, BrnShareItem shareItem) {
int channel = shareItem.shareType;
- BrnToast.show("channel: $channel, section: $section, index: $index", context);
+ BrnToast.show(
+ "channel: $channel, section: $section, index: $index", context);
},
cancelTitle: "自定义取消名字", // 取消按钮title可自定义
);
@@ -475,7 +474,8 @@ class _ActionSheetEntryPageState extends State {
secondShareChannels: secondRowList,
clickCallBack: (int section, int index, BrnShareItem shareItem) {
int channel = shareItem.shareType;
- BrnToast.show("channel: $channel, section: $section, index: $index", context);
+ BrnToast.show(
+ "channel: $channel, section: $section, index: $index", context);
},
clickInterceptor: (int section, int index, BrnShareItem shareItem) {
if (shareItem.canClick) {
@@ -491,7 +491,7 @@ class _ActionSheetEntryPageState extends State {
void _showShareThreeStyle(BuildContext context) {
List firstRowList = [];
- List secondRowList =[];
+ List secondRowList = [];
firstRowList.add(BrnShareItem(
BrnShareItemConstants.shareWeiXin,
canClick: true,
@@ -511,7 +511,8 @@ class _ActionSheetEntryPageState extends State {
secondShareChannels: secondRowList,
clickCallBack: (int section, int index, BrnShareItem shareItem) {
int channel = shareItem.shareType;
- BrnToast.show("channel: $channel, section: $section, index: $index", context);
+ BrnToast.show(
+ "channel: $channel, section: $section, index: $index", context);
},
);
actionSheet.show(context);
@@ -531,7 +532,8 @@ class _ActionSheetEntryPageState extends State {
firstShareChannels: firstRowList,
clickCallBack: (int section, int index, BrnShareItem shareItem) {
int channel = shareItem.shareType;
- BrnToast.show("channel: $channel, section: $section, index: $index", context);
+ BrnToast.show(
+ "channel: $channel, section: $section, index: $index", context);
},
);
actionSheet.show(context);
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 283dc591..e2fc5ba2 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,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
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 9dd1c195..fd68e9ca 100644
--- a/example/lib/sample/components/actionsheet/actionsheet_selected_list_example.dart
+++ b/example/lib/sample/components/actionsheet/actionsheet_selected_list_example.dart
@@ -1,11 +1,10 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
class SelectedListActionSheetExamplePage extends StatefulWidget {
@override
- State createState() => SelectedListActionSheetExamplePageState();
+ State createState() =>
+ SelectedListActionSheetExamplePageState();
}
class SelectedListActionSheetExamplePageState
@@ -64,7 +63,7 @@ class SelectedListActionSheetExamplePageState
if (!controller.isHidden) {
controller.dismiss();
} else {
- if ( _data.length <= 0) {
+ if (_data.length <= 0) {
BrnToast.show('数据为空,弹窗不展示', context);
return;
}
@@ -89,7 +88,8 @@ class SelectedListActionSheetExamplePageState
),
),
),
- itemTitleBuilder: (int index, String? entity) {
+ itemTitleBuilder:
+ (int index, String? entity) {
return entity;
},
onClear: () {
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 5cadf9f9..1c1d5f5d 100644
--- a/example/lib/sample/components/bottom_tabbar/bottom_tabbar_example.dart
+++ b/example/lib/sample/components/bottom_tabbar/bottom_tabbar_example.dart
@@ -1,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -11,7 +9,8 @@ class BottomTabbarExample extends StatefulWidget {
}
}
-class BottomTabbarExampleState extends State with SingleTickerProviderStateMixin {
+class BottomTabbarExampleState extends State
+ with SingleTickerProviderStateMixin {
/// 选中的index
int _selectedIndex = 0;
@@ -97,24 +96,32 @@ class BottomTabbarExampleState extends State with SingleTic
items: [
// 定义每个BottomTabBarItem,子属性请看源码
BrnBottomTabBarItem(
- icon: Image(image: AssetImage("assets/icons/navbar_house.png")),
- activeIcon: Image(image: AssetImage("assets/icons/navbar_house.png")),
+ icon:
+ Image(image: AssetImage("assets/icons/navbar_house.png")),
+ activeIcon:
+ Image(image: AssetImage("assets/icons/navbar_house.png")),
title: Text(titles[0])),
BrnBottomTabBarItem(
- icon: Image(image: AssetImage("assets/icons/navbar_house.png")),
+ icon:
+ Image(image: AssetImage("assets/icons/navbar_house.png")),
title: Text(titles[1])),
BrnBottomTabBarItem(
- icon: Image(image: AssetImage("assets/icons/navbar_house.png")),
+ icon:
+ Image(image: AssetImage("assets/icons/navbar_house.png")),
title: Text(titles[2])),
BrnBottomTabBarItem(
- icon: Image(image: AssetImage("assets/icons/navbar_house.png")),
- activeIcon: Image(image: AssetImage("assets/icons/navbar_house.png")),
+ icon:
+ Image(image: AssetImage("assets/icons/navbar_house.png")),
+ activeIcon:
+ Image(image: AssetImage("assets/icons/navbar_house.png")),
title: Text(titles[3])),
BrnBottomTabBarItem(
- icon: Image(image: AssetImage("assets/icons/navbar_house.png")),
+ icon:
+ Image(image: AssetImage("assets/icons/navbar_house.png")),
title: Text(titles[4])),
BrnBottomTabBarItem(
- icon: Image(image: AssetImage("assets/icons/navbar_house.png")),
+ icon:
+ Image(image: AssetImage("assets/icons/navbar_house.png")),
title: Text(titles[5])),
],
),
@@ -129,7 +136,8 @@ class BottomTabbarExampleState extends State with SingleTic
currentIndex: _selectedIndexTest1,
onTap: _onItemSelectedTest1,
items: [
- BrnBottomTabBarItem(icon: Icon(icons[0]), title: Text(titles[0])),
+ BrnBottomTabBarItem(
+ icon: Icon(icons[0]), title: Text(titles[0])),
],
),
Padding(
@@ -141,14 +149,22 @@ class BottomTabbarExampleState extends State with SingleTic
currentIndex: _selectedIndexTest2,
onTap: _onItemSelectedTest2,
items: [
- BrnBottomTabBarItem(icon: Icon(icons[0]), title: Text(titles[0])),
- BrnBottomTabBarItem(icon: Icon(icons[0]), title: Text(titles[0])),
- BrnBottomTabBarItem(icon: Icon(icons[0]), title: Text(titles[0])),
- BrnBottomTabBarItem(icon: Icon(icons[0]), title: Text(titles[0])),
- BrnBottomTabBarItem(icon: Icon(icons[0]), title: Text(titles[0])),
- BrnBottomTabBarItem(icon: Icon(icons[0]), title: Text(titles[0])),
- BrnBottomTabBarItem(icon: Icon(icons[0]), title: Text(titles[0])),
- BrnBottomTabBarItem(icon: Icon(icons[0]), title: Text(titles[0])),
+ BrnBottomTabBarItem(
+ icon: Icon(icons[0]), title: Text(titles[0])),
+ BrnBottomTabBarItem(
+ icon: Icon(icons[0]), title: Text(titles[0])),
+ BrnBottomTabBarItem(
+ icon: Icon(icons[0]), title: Text(titles[0])),
+ BrnBottomTabBarItem(
+ icon: Icon(icons[0]), title: Text(titles[0])),
+ BrnBottomTabBarItem(
+ icon: Icon(icons[0]), title: Text(titles[0])),
+ BrnBottomTabBarItem(
+ icon: Icon(icons[0]), title: Text(titles[0])),
+ BrnBottomTabBarItem(
+ icon: Icon(icons[0]), title: Text(titles[0])),
+ BrnBottomTabBarItem(
+ icon: Icon(icons[0]), title: Text(titles[0])),
],
),
Padding(
@@ -160,14 +176,22 @@ class BottomTabbarExampleState extends State with SingleTic
currentIndex: _selectedIndexTest3,
onTap: _onItemSelectedTest3,
items: [
- BrnBottomTabBarItem(icon: Icon(icons[0]), title: Text("1111111111")),
- BrnBottomTabBarItem(icon: Icon(icons[0]), title: Text("2222222222")),
- BrnBottomTabBarItem(icon: Icon(icons[0]), title: Text("3333333333")),
- BrnBottomTabBarItem(icon: Icon(icons[0]), title: Text("4444444444")),
- BrnBottomTabBarItem(icon: Icon(icons[0]), title: Text("5555555555")),
- BrnBottomTabBarItem(icon: Icon(icons[0]), title: Text("6666666666")),
- BrnBottomTabBarItem(icon: Icon(icons[0]), title: Text("7777777777")),
- BrnBottomTabBarItem(icon: Icon(icons[0]), title: Text("8888888888")),
+ BrnBottomTabBarItem(
+ icon: Icon(icons[0]), title: Text("1111111111")),
+ BrnBottomTabBarItem(
+ icon: Icon(icons[0]), title: Text("2222222222")),
+ BrnBottomTabBarItem(
+ icon: Icon(icons[0]), title: Text("3333333333")),
+ BrnBottomTabBarItem(
+ icon: Icon(icons[0]), title: Text("4444444444")),
+ BrnBottomTabBarItem(
+ icon: Icon(icons[0]), title: Text("5555555555")),
+ BrnBottomTabBarItem(
+ icon: Icon(icons[0]), title: Text("6666666666")),
+ BrnBottomTabBarItem(
+ icon: Icon(icons[0]), title: Text("7777777777")),
+ BrnBottomTabBarItem(
+ icon: Icon(icons[0]), title: Text("8888888888")),
],
),
],
diff --git a/example/lib/sample/components/button/bottom_button_entry_page.dart b/example/lib/sample/components/button/bottom_button_entry_page.dart
index 314ceeb8..9bead413 100644
--- a/example/lib/sample/components/button/bottom_button_entry_page.dart
+++ b/example/lib/sample/components/button/bottom_button_entry_page.dart
@@ -22,7 +22,8 @@ class BottomButtonEntryWidget extends StatelessWidget {
isShowLine: false,
describeColor: Color(0xFF222222),
onPressed: () {
- Navigator.of(context).push(MaterialPageRoute(builder: (context) {
+ Navigator.of(context)
+ .push(MaterialPageRoute(builder: (context) {
return BrnCommonBottomExample();
}));
},
@@ -32,7 +33,8 @@ class BottomButtonEntryWidget extends StatelessWidget {
describe: '全选、已选、主按钮、次按钮',
describeColor: Color(0xFF222222),
onPressed: () {
- Navigator.of(context).push(MaterialPageRoute(builder: (context) {
+ Navigator.of(context)
+ .push(MaterialPageRoute(builder: (context) {
return BrnSelectionBottomButtonExample();
}));
},
diff --git a/example/lib/sample/components/button/button_entry_page.dart b/example/lib/sample/components/button/button_entry_page.dart
index c851ed43..bf461842 100644
--- a/example/lib/sample/components/button/button_entry_page.dart
+++ b/example/lib/sample/components/button/button_entry_page.dart
@@ -28,7 +28,8 @@ class ButtonEntryPage extends StatelessWidget {
isSupportTheme: true,
describeColor: Color(0xFF222222),
onPressed: () {
- Navigator.of(context).push(MaterialPageRoute(builder: (context) {
+ Navigator.of(context)
+ .push(MaterialPageRoute(builder: (context) {
return BigMainButtonExample();
}));
},
@@ -39,7 +40,8 @@ class ButtonEntryPage extends StatelessWidget {
describe: '宽度为屏幕宽度,背景色为白色,带有边框线',
describeColor: Color(0xFF222222),
onPressed: () {
- Navigator.of(context).push(MaterialPageRoute(builder: (context) {
+ Navigator.of(context)
+ .push(MaterialPageRoute(builder: (context) {
return BigOutlineButtonExample();
}));
},
@@ -49,7 +51,8 @@ class ButtonEntryPage extends StatelessWidget {
describe: '宽度为屏幕宽度,背景色为次级辅助色',
describeColor: Color(0xFF222222),
onPressed: () {
- Navigator.of(context).push(MaterialPageRoute(builder: (context) {
+ Navigator.of(context)
+ .push(MaterialPageRoute(builder: (context) {
return BigFuButtonExample();
}));
},
@@ -60,7 +63,8 @@ class ButtonEntryPage extends StatelessWidget {
describe: '宽度为屏幕宽度,背景色为浅主题色',
describeColor: Color(0xFF222222),
onPressed: () {
- Navigator.of(context).push(MaterialPageRoute(builder: (context) {
+ Navigator.of(context)
+ .push(MaterialPageRoute(builder: (context) {
return BigGhostButtonExample();
}));
},
@@ -71,7 +75,8 @@ class ButtonEntryPage extends StatelessWidget {
isSupportTheme: true,
describeColor: Color(0xFF222222),
onPressed: () {
- Navigator.of(context).push(MaterialPageRoute(builder: (context) {
+ Navigator.of(context)
+ .push(MaterialPageRoute(builder: (context) {
return BrnSmallMainButtonExample();
}));
},
@@ -82,12 +87,12 @@ class ButtonEntryPage extends StatelessWidget {
describe: '最小宽度为84,宽度自适应文字',
describeColor: Color(0xFF222222),
onPressed: () {
- Navigator.of(context).push(MaterialPageRoute(builder: (context) {
+ Navigator.of(context)
+ .push(MaterialPageRoute(builder: (context) {
return BrnSmallOutlineButtonExample();
}));
},
),
-
],
),
),
diff --git a/example/lib/sample/components/button/button_panel_entry_page.dart b/example/lib/sample/components/button/button_panel_entry_page.dart
index 3d6ef593..61e9c2f6 100644
--- a/example/lib/sample/components/button/button_panel_entry_page.dart
+++ b/example/lib/sample/components/button/button_panel_entry_page.dart
@@ -4,8 +4,7 @@ import 'package:example/sample/components/button/button_panel_example.dart';
import 'package:example/sample/home/list_item.dart';
import 'package:flutter/material.dart';
-class ButtonPanelEntryPage extends StatelessWidget{
-
+class ButtonPanelEntryPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
@@ -23,7 +22,8 @@ class ButtonPanelEntryPage extends StatelessWidget{
isShowLine: false,
describeColor: Color(0xFF222222),
onPressed: () {
- Navigator.of(context).push(MaterialPageRoute(builder: (context) {
+ Navigator.of(context)
+ .push(MaterialPageRoute(builder: (context) {
return ButtonPanelExample();
}));
},
@@ -33,7 +33,8 @@ class ButtonPanelEntryPage extends StatelessWidget{
describe: '文本类型按钮集合',
describeColor: Color(0xFF222222),
onPressed: () {
- Navigator.of(context).push(MaterialPageRoute(builder: (context) {
+ Navigator.of(context)
+ .push(MaterialPageRoute(builder: (context) {
return BrnTextButtonPanelExample();
}));
},
diff --git a/example/lib/sample/components/button/common_collection_example.dart b/example/lib/sample/components/button/common_collection_example.dart
index da249615..ebab07a9 100644
--- a/example/lib/sample/components/button/common_collection_example.dart
+++ b/example/lib/sample/components/button/common_collection_example.dart
@@ -1,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
diff --git a/example/lib/sample/components/button/icon_button_example.dart b/example/lib/sample/components/button/icon_button_example.dart
index b67f415e..cceae256 100644
--- a/example/lib/sample/components/button/icon_button_example.dart
+++ b/example/lib/sample/components/button/icon_button_example.dart
@@ -8,7 +8,8 @@ class BrnIconBtnExample extends StatefulWidget {
_BrnIconBtnExampleState createState() => _BrnIconBtnExampleState();
}
-class _BrnIconBtnExampleState extends State with TickerProviderStateMixin {
+class _BrnIconBtnExampleState extends State
+ with TickerProviderStateMixin {
@override
Widget build(BuildContext context) {
return Scaffold(
diff --git a/example/lib/sample/components/button/selection_collection_example.dart b/example/lib/sample/components/button/selection_collection_example.dart
index 42723669..b6dd10a8 100644
--- a/example/lib/sample/components/button/selection_collection_example.dart
+++ b/example/lib/sample/components/button/selection_collection_example.dart
@@ -3,11 +3,12 @@ import 'package:flutter/material.dart';
class BrnSelectionBottomButtonExample extends StatefulWidget {
@override
- _BrnSelectionBottomButtonExampleState createState() => _BrnSelectionBottomButtonExampleState();
+ _BrnSelectionBottomButtonExampleState createState() =>
+ _BrnSelectionBottomButtonExampleState();
}
-class _BrnSelectionBottomButtonExampleState extends State {
-
+class _BrnSelectionBottomButtonExampleState
+ extends State {
BrnMultipleBottomController controller = BrnMultipleBottomController();
@override
@@ -83,7 +84,8 @@ class _BrnSelectionBottomButtonExampleState 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: 2,
@@ -92,7 +92,7 @@ class _BrnShadowExampleState extends State {
}
Color getRandomColor() {
- return Color.fromARGB(
- Random().nextInt(255), Random().nextInt(255), Random().nextInt(255), Random().nextInt(255));
+ return Color.fromARGB(Random().nextInt(255), Random().nextInt(255),
+ Random().nextInt(255), Random().nextInt(255));
}
}
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 46b50a47..687f33f0 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,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -27,7 +25,6 @@ class BrnBubbleExample2 extends StatelessWidget {
maxLines: 3,
text: '支持指定行数的展开收起,背景边框的圆角是4,左上角是特殊的形状,\n '
'文本的字号是14,颜色为深色',
-
),
Text(
'正常案例',
@@ -39,7 +36,7 @@ class BrnBubbleExample2 extends StatelessWidget {
BrnBubbleText(
maxLines: 2,
text: '推荐理由:“满五唯一”“临近地铁”“首付低”,多出折行显示,文字展开的样式文式文文字展开的样式文式文。问我',
- onExpanded: (isExpanded){
+ onExpanded: (isExpanded) {
String str = isExpanded ? "展开了" : "收起了";
BrnToast.show("我$str", context);
},
@@ -53,7 +50,8 @@ class BrnBubbleExample2 extends StatelessWidget {
),
BrnBubbleText(
maxLines: 2,
- text: '推荐理由:“满五唯一”“临近地铁”“首付低”,多出折行显示,文字展开的样式文。按钮的文案特别长按钮的文案特别长按钮的文案特别长按钮的文案特别长',
+ text:
+ '推荐理由:“满五唯一”“临近地铁”“首付低”,多出折行显示,文字展开的样式文。按钮的文案特别长按钮的文案特别长按钮的文案特别长按钮的文案特别长',
),
Text(
'异常案例文案过少',
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 66346dcd..386008be 100644
--- a/example/lib/sample/components/card/bubble/bubble_entry_page.dart
+++ b/example/lib/sample/components/card/bubble/bubble_entry_page.dart
@@ -1,5 +1,3 @@
-
-
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';
@@ -8,36 +6,39 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class BubbleEntryPage extends StatelessWidget {
-
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: BrnAppBar(
title: "气泡示例",
- ),body: ListView(children: [
- ListItem(
- title: "普通气泡",
- isShowLine: false,
- describe: '通栏分割线',
- onPressed: () {
- Navigator.push(context, MaterialPageRoute(
- builder: (BuildContext context) {
- return BubbleExample();
- },
- ));
- },
),
- ListItem(
- title: "展开收起气泡",
- describe: '左右有20dp间距的分割线',
- onPressed: () {
- Navigator.push(context, MaterialPageRoute(
- builder: (BuildContext context) {
- return BrnBubbleExample2();
+ body: ListView(
+ children: [
+ ListItem(
+ title: "普通气泡",
+ isShowLine: false,
+ describe: '通栏分割线',
+ onPressed: () {
+ Navigator.push(context, MaterialPageRoute(
+ builder: (BuildContext context) {
+ return BubbleExample();
+ },
+ ));
+ },
+ ),
+ ListItem(
+ title: "展开收起气泡",
+ describe: '左右有20dp间距的分割线',
+ onPressed: () {
+ Navigator.push(context, MaterialPageRoute(
+ builder: (BuildContext context) {
+ return BrnBubbleExample2();
+ },
+ ));
},
- ));
- },
+ ),
+ ],
),
- ],),);
+ );
}
}
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 0468c77a..06d53c24 100644
--- a/example/lib/sample/components/card/bubble/common_bubble_example.dart
+++ b/example/lib/sample/components/card/bubble/common_bubble_example.dart
@@ -1,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -46,7 +44,8 @@ class BubbleExample extends StatelessWidget {
),
),
BrnInsertInfo(
- infoText: '推荐理由:“满五唯一”“临近地铁”“首付低”,多出折行显示,文字展开的样式文。按钮的文案特别长按钮的文案特别长按钮的文案特别长按钮的文案特别长',
+ infoText:
+ '推荐理由:“满五唯一”“临近地铁”“首付低”,多出折行显示,文字展开的样式文。按钮的文案特别长按钮的文案特别长按钮的文案特别长按钮的文案特别长',
),
Text(
'异常案例文案过少',
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 36f082ef..6062e2f0 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,11 +1,10 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
class BrnTwoRichContentExample extends StatefulWidget {
@override
- _BrnTwoRichContentExampleState createState() => _BrnTwoRichContentExampleState();
+ _BrnTwoRichContentExampleState createState() =>
+ _BrnTwoRichContentExampleState();
}
class _BrnTwoRichContentExampleState extends State {
@@ -23,7 +22,10 @@ class _BrnTwoRichContentExampleState 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,
@@ -42,10 +44,12 @@ class _BrnTwoRichContentExampleState extends State {
BrnRichGridInfo("名称:", '内容内容内容内容'),
BrnRichGridInfo("名称:", '内容内容内容'),
BrnRichGridInfo("名称:", '内容内容'),
- BrnRichGridInfo.valueLastClickInfo('名称', '内容内容', keyQuestionCallback: (value) {
+ BrnRichGridInfo.valueLastClickInfo('名称', '内容内容',
+ keyQuestionCallback: (value) {
BrnToast.show(value, context);
}),
- BrnRichGridInfo.valueLastClickInfo('名称', '内容内容', valueQuestionCallback: (value) {
+ BrnRichGridInfo.valueLastClickInfo('名称', '内容内容',
+ valueQuestionCallback: (value) {
BrnToast.show(value, context);
}),
BrnRichGridInfo.valueLastClickInfo('名称', '内容内容',
@@ -56,8 +60,8 @@ class _BrnTwoRichContentExampleState extends State {
clickCallback: (value) {
BrnToast.show(value, context);
}),
- BrnRichGridInfo.valueLastClickInfo('名称', '内容内容', clickTitle: "可点击内容",
- clickCallback: (value) {
+ BrnRichGridInfo.valueLastClickInfo('名称', '内容内容',
+ clickTitle: "可点击内容", clickCallback: (value) {
BrnToast.show(value, context);
}),
],
@@ -89,7 +93,8 @@ class _BrnTwoRichContentExampleState extends State {
),
BrnRichInfoGrid(
pairInfoList: [
- BrnRichGridInfo.valueLastClickInfo('名称名称', '内容内容内容内容内容内容内容内容内容内容内容',
+ BrnRichGridInfo.valueLastClickInfo(
+ '名称名称', '内容内容内容内容内容内容内容内容内容内容内容',
keyQuestionCallback: (value) {
BrnToast.show(value, context);
}),
@@ -108,7 +113,8 @@ class _BrnTwoRichContentExampleState extends State {
BrnRichInfoGrid(
pairInfoList: [
BrnRichGridInfo("名称名称:", '内容内容内容内容'),
- BrnRichGridInfo.valueLastClickInfo("名称名称名称名称名称名称名称名称名称:", '内容内容内容内容内容内容内容内容内容内容内容'),
+ BrnRichGridInfo.valueLastClickInfo(
+ "名称名称名称名称名称名称名称名称名称:", '内容内容内容内容内容内容内容内容内容内容内容'),
BrnRichGridInfo("名称:", '内容内容'),
BrnRichGridInfo("名称:", '内容'),
],
@@ -123,7 +129,8 @@ class _BrnTwoRichContentExampleState extends State {
BrnRichInfoGrid(
pairInfoList: [
BrnRichGridInfo("名称名称:", '内容内容内容内容'),
- BrnRichGridInfo.valueLastClickInfo("名称名称名", '内容内容内容', clickTitle: '可点击内容可点击内容可点击内容',
+ BrnRichGridInfo.valueLastClickInfo("名称名称名", '内容内容内容',
+ clickTitle: '可点击内容可点击内容可点击内容',
valueQuestionCallback: (value) {
BrnToast.show(value, context);
}),
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 19ecbdff..c2dc745b 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,11 +1,10 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
class BrnTextRIchContentExample extends StatefulWidget {
@override
- _BrnTextRIchContentExampleState createState() => _BrnTextRIchContentExampleState();
+ _BrnTextRIchContentExampleState createState() =>
+ _BrnTextRIchContentExampleState();
}
class _BrnTextRIchContentExampleState extends State {
@@ -23,7 +22,10 @@ class _BrnTextRIchContentExampleState 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,
@@ -86,7 +88,8 @@ class _BrnTextRIchContentExampleState extends State {
rowSpace: 10,
pairInfoList: [
BrnRichGridInfo("名称名称:", null),
- BrnRichGridInfo("名称名称名称名称名称名称名称名称名称:", '内容内容内容内容内容内容内容内容内容内容内容'),
+ BrnRichGridInfo(
+ "名称名称名称名称名称名称名称名称名称:", '内容内容内容内容内容内容内容内容内容内容内容'),
BrnRichGridInfo("名称:", '内容内容'),
BrnRichGridInfo("名称:", ''),
],
@@ -104,7 +107,8 @@ class _BrnTextRIchContentExampleState extends State {
rowSpace: 10,
pairInfoList: [
BrnRichGridInfo("名称名称:", null),
- BrnRichGridInfo("名称名称名称名称名称名称名称名称名称:", '内容内容内容内容内容内容内容内容内容内容内容'),
+ BrnRichGridInfo(
+ "名称名称名称名称名称名称名称名称名称:", '内容内容内容内容内容内容内容内容内容内容内容'),
BrnRichGridInfo("名称:", '内容内容'),
BrnRichGridInfo("名称:", ''),
],
@@ -125,7 +129,8 @@ class _BrnTextRIchContentExampleState extends State {
rowSpace: 10,
pairInfoList: [
BrnRichGridInfo("名称名称:", null),
- BrnRichGridInfo("名称名称名称名称名称名称名称名称名称:", '内容内容内容内容内容内容内容内容内容内容内容'),
+ BrnRichGridInfo(
+ "名称名称名称名称名称名称名称名称名称:", '内容内容内容内容内容内容内容内容内容内容内容'),
BrnRichGridInfo("名称:", '内容内容'),
BrnRichGridInfo("名称:", ''),
],
@@ -146,7 +151,8 @@ class _BrnTextRIchContentExampleState extends State {
rowSpace: 10,
pairInfoList: [
BrnRichGridInfo("名称名称:", null),
- BrnRichGridInfo("名称名称名称名称名称名称名称名称名称:", '内容内容内容内容内容内容内容内容内容内容内容'),
+ BrnRichGridInfo(
+ "名称名称名称名称名称名称名称名称名称:", '内容内容内容内容内容内容内容内容内容内容内容'),
BrnRichGridInfo("名称:", '内容内容'),
BrnRichGridInfo("名称:", ''),
],
@@ -169,14 +175,17 @@ class _BrnTextRIchContentExampleState extends State {
child: Container(
padding: EdgeInsets.all(20),
decoration: BoxDecoration(
- color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(12.0))),
+ color: Colors.white,
+ borderRadius: BorderRadius.all(Radius.circular(12.0))),
child: Column(
children: [
BrnPairInfoTable(
children: [
- BrnInfoModal(keyPart: "名称:", valuePart: "加粗的内容,文字样式可配置"),
+ BrnInfoModal(
+ keyPart: "名称:", valuePart: "加粗的内容,文字样式可配置"),
BrnInfoModal(keyPart: "名称名:", valuePart: "没加粗的内容"),
- BrnInfoModal(keyPart: "名称名称名:", valuePart: "内容内容内容内容内容"),
+ BrnInfoModal(
+ keyPart: "名称名称名:", valuePart: "内容内容内容内容内容"),
BrnInfoModal(
keyPart: "名称名称名称名称:",
valuePart: "内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容",
@@ -189,7 +198,9 @@ class _BrnTextRIchContentExampleState extends State {
BrnRichInfoGrid(
themeData: BrnPairRichInfoGridConfig(
keyTextStyle: BrnTextStyle(
- fontSize: 16, fontWeight: FontWeight.w400, color: Color(0xff999999)),
+ fontSize: 16,
+ fontWeight: FontWeight.w400,
+ color: Color(0xff999999)),
valueTextStyle: BrnTextStyle(
fontSize: 16,
fontWeight: FontWeight.w400,
@@ -198,7 +209,8 @@ class _BrnTextRIchContentExampleState extends State {
rowSpace: 10,
pairInfoList: [
BrnRichGridInfo("正常的名称:", '正常的内容'),
- BrnRichGridInfo("名称名称名称名称名称名称名称名称名称:", '内容内容内容内容内容内容内容内容内容内容内容'),
+ BrnRichGridInfo(
+ "名称名称名称名称名称名称名称名称名称:", '内容内容内容内容内容内容内容内容内容内容内容'),
BrnRichGridInfo("名称:", '内容内容内容内容内容内容内容内容内容内容内容内容'),
BrnRichGridInfo("名称:", ''),
],
@@ -210,7 +222,8 @@ class _BrnTextRIchContentExampleState extends State {
rowSpace: 10,
pairInfoList: [
BrnRichGridInfo("加粗的名称:", '加粗的内容'),
- BrnRichGridInfo("名称名称名称名称名称名称名称名称名称:", '内容内容内容内容内容内容内容内容内容内容内容'),
+ BrnRichGridInfo(
+ "名称名称名称名称名称名称名称名称名称:", '内容内容内容内容内容内容内容内容内容内容内容'),
BrnRichGridInfo("名称:", '内容内容内容内容内容内容内容内容内容内容内容内容'),
BrnRichGridInfo("名称:", ''),
],
diff --git a/example/lib/sample/components/card/content/brn_two_text_expanded_example.dart b/example/lib/sample/components/card/content/brn_two_text_expanded_example.dart
index fecd7223..618b9207 100644
--- a/example/lib/sample/components/card/content/brn_two_text_expanded_example.dart
+++ b/example/lib/sample/components/card/content/brn_two_text_expanded_example.dart
@@ -3,10 +3,12 @@ import 'package:flutter/material.dart';
class BrnTextExpandedContentExample extends StatefulWidget {
@override
- _BrnTextExpandedContentExampleState createState() => _BrnTextExpandedContentExampleState();
+ _BrnTextExpandedContentExampleState createState() =>
+ _BrnTextExpandedContentExampleState();
}
-class _BrnTextExpandedContentExampleState extends State {
+class _BrnTextExpandedContentExampleState
+ extends State {
@override
Widget build(BuildContext context) {
return Scaffold(
@@ -21,7 +23,10 @@ class _BrnTextExpandedContentExampleState extends State[
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/content/keyvalue_align_content_example.dart b/example/lib/sample/components/card/content/keyvalue_align_content_example.dart
index d959c039..39fd8fc7 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,5 +1,3 @@
-
-
import 'dart:math';
import 'package:bruno/bruno.dart';
@@ -23,8 +21,11 @@ class _TextContentExampleState extends State {
BrnInfoModal(keyPart: "名称名称名:", valuePart: "内容内容内容内容内容"),
BrnInfoModal(keyPart: "名称名称名:", valuePart: "内容内容内容内容内容"),
BrnInfoModal(keyPart: "名称名称名:", valuePart: "内容内容内容内容内容"),
- BrnInfoModal(keyPart: "名称名称名称名称:", valuePart: "内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容"),
- BrnInfoModal.valueLastClickInfo("名称名:", '内容内容内容内容内容', '可点击内容', clickCallback: (text) {
+ BrnInfoModal(
+ keyPart: "名称名称名称名称:",
+ valuePart: "内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容"),
+ BrnInfoModal.valueLastClickInfo("名称名:", '内容内容内容内容内容', '可点击内容',
+ clickCallback: (text) {
BrnToast.show(text!, context);
})
];
@@ -44,7 +45,10 @@ class _TextContentExampleState 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,
@@ -210,7 +214,8 @@ class _TextContentExampleState extends State {
BrnInfoModal(keyPart: "名称名:", valuePart: "内容内容内容内容内容"),
BrnInfoModal(keyPart: "名称名称名:", valuePart: "内容内容内容内容内容"),
BrnInfoModal(
- keyPart: "名称名称名称名称:", valuePart: "内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容"),
+ keyPart: "名称名称名称名称:",
+ valuePart: "内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容"),
],
),
Text(
@@ -230,9 +235,10 @@ class _TextContentExampleState extends State {
BrnInfoModal(keyPart: "名称名:", valuePart: "内容内容内容内容内容"),
BrnInfoModal(keyPart: "名称名称名:", valuePart: "内容内容内容内容内容"),
BrnInfoModal(
- keyPart: "名称名称名称名称:", valuePart: "内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容"),
- BrnInfoModal.valueLastClickInfo("名称名:", '11111111', '22222222',
- clickCallback: (text) {
+ keyPart: "名称名称名称名称:",
+ valuePart: "内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容"),
+ BrnInfoModal.valueLastClickInfo(
+ "名称名:", '11111111', '22222222', clickCallback: (text) {
BrnToast.show(text!, context);
}),
],
@@ -256,7 +262,8 @@ class _TextContentExampleState extends State {
BrnInfoModal(keyPart: "名称名称名:", valuePart: "内容内容内容内容内容"),
BrnInfoModal(keyPart: "名称名称名:", valuePart: "内容内容内容内容内容"),
BrnInfoModal(
- keyPart: "名称名称名称名称:", valuePart: "内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容"),
+ keyPart: "名称名称名称名称:",
+ valuePart: "内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容"),
BrnInfoModal.valueLastClickInfo("名称名:", '内容内容内容内容内容', '可点击内容',
clickCallback: (text) {
BrnToast.show(text!, context);
@@ -303,12 +310,17 @@ class _TextContentExampleState extends State {
),
Transform.rotate(
angle: pi,
- child: BrunoTools.getAssetImage('icons/icon_up_arrow.png')),
+ child: BrunoTools.getAssetImage(
+ 'icons/icon_up_arrow.png')),
],
),
decoration: BoxDecoration(
gradient: LinearGradient(
- colors: [Colors.white.withAlpha(100), Colors.white, Colors.white],
+ colors: [
+ Colors.white.withAlpha(100),
+ Colors.white,
+ Colors.white
+ ],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
)),
@@ -354,12 +366,17 @@ class _TextContentExampleState extends State {
),
Transform.rotate(
angle: pi,
- child: BrunoTools.getAssetImage('icons/icon_down_arrow.png')),
+ child: BrunoTools.getAssetImage(
+ 'icons/icon_down_arrow.png')),
],
),
decoration: BoxDecoration(
gradient: LinearGradient(
- colors: [Colors.white.withAlpha(100), Colors.white, Colors.white],
+ colors: [
+ Colors.white.withAlpha(100),
+ Colors.white,
+ Colors.white
+ ],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
)),
@@ -379,9 +396,11 @@ class _TextContentExampleState extends State {
BrnInfoModal(keyPart: "名称:", valuePart: "内容内容内容内容"),
BrnInfoModal(keyPart: "名称名:", valuePart: "内容内容内容内容内容"),
BrnInfoModal(
- keyPart: "11111111111111111111111111111111111:", valuePart: "内容内容内容内容内容"),
+ keyPart: "11111111111111111111111111111111111:",
+ valuePart: "内容内容内容内容内容"),
BrnInfoModal(keyPart: "名称名称名:", valuePart: "内容内容内容内容内容"),
- BrnInfoModal.valueLastClickInfo("名称十分的长名称十分的长名称十分的长名称十分的长:", '内容内容内容内容内容', '可点击内容',
+ BrnInfoModal.valueLastClickInfo(
+ "名称十分的长名称十分的长名称十分的长名称十分的长:", '内容内容内容内容内容', '可点击内容',
clickCallback: (text) {
BrnToast.show(text!, context);
}),
@@ -396,13 +415,18 @@ class _TextContentExampleState extends State {
),
BrnAlignPairInfo(
children: [
- BrnInfoModal(keyPart: "名称:", valuePart: "内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容"),
+ BrnInfoModal(
+ keyPart: "名称:",
+ valuePart: "内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容"),
BrnInfoModal(keyPart: "名称名:", valuePart: "内容内容内容内容内容"),
BrnInfoModal(keyPart: "名称正常:", valuePart: "内容内容内容内容内容"),
- BrnInfoModal(keyPart: "名称名称名:", valuePart: "内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容"),
+ BrnInfoModal(
+ keyPart: "名称名称名:",
+ valuePart: "内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容"),
BrnInfoModal.valueLastClickInfo(
- "名称十分的长名称十分的长名称十分的长名称十分的长:", '内容内容内容内容内容', '可点击内容可点击内容可点击内容可点击内容可点击内容可点击内容',
- clickCallback: (text) {
+ "名称十分的长名称十分的长名称十分的长名称十分的长:",
+ '内容内容内容内容内容',
+ '可点击内容可点击内容可点击内容可点击内容可点击内容可点击内容', clickCallback: (text) {
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 2d6d8053..7db9de8b 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,14 +1,14 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
class KeyTextCloseContentExample extends StatefulWidget {
@override
- _KeyTextCloseContentExampleState createState() => _KeyTextCloseContentExampleState();
+ _KeyTextCloseContentExampleState createState() =>
+ _KeyTextCloseContentExampleState();
}
-class _KeyTextCloseContentExampleState extends State {
+class _KeyTextCloseContentExampleState
+ extends State {
@override
Widget build(BuildContext context) {
return Scaffold(
@@ -23,7 +23,10 @@ class _KeyTextCloseContentExampleState 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,
@@ -88,8 +91,12 @@ class _KeyTextCloseContentExampleState extends State
children: [
BrnInfoModal(keyPart: "名称:", valuePart: "内容内容内容内容"),
BrnInfoModal(keyPart: "名称名:", valuePart: "内容内容内容内容内容"),
- BrnInfoModal(keyPart: "名称十分的长名称十分的长名称十分的长名称十分的长:", valuePart: "内容内容内容内容内容"),
- BrnInfoModal(keyPart: "名称十分的长名称十分的长名称十分的长名称十分的长十分的长:", valuePart: "内容内容内容内容内容"),
+ BrnInfoModal(
+ keyPart: "名称十分的长名称十分的长名称十分的长名称十分的长:",
+ valuePart: "内容内容内容内容内容"),
+ BrnInfoModal(
+ keyPart: "名称十分的长名称十分的长名称十分的长名称十分的长十分的长:",
+ valuePart: "内容内容内容内容内容"),
BrnInfoModal(keyPart: "名称名称名:", valuePart: "内容内容内容内容内容"),
],
),
@@ -103,10 +110,14 @@ class _KeyTextCloseContentExampleState extends State
BrnPairInfoTable(
isValueAlign: false,
children: [
- BrnInfoModal(keyPart: "名称:", valuePart: "内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容"),
+ BrnInfoModal(
+ keyPart: "名称:",
+ valuePart: "内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容"),
BrnInfoModal(keyPart: "名称名:", valuePart: "内容内容内容内容内容"),
BrnInfoModal(keyPart: "名称正常:", valuePart: "内容内容内容内容内容"),
- BrnInfoModal(keyPart: "名称名称名:", valuePart: "内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容"),
+ BrnInfoModal(
+ keyPart: "名称名称名:",
+ valuePart: "内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容"),
BrnInfoModal(
keyPart: "名称名称名:",
valuePart:
@@ -122,23 +133,29 @@ class _KeyTextCloseContentExampleState extends State
),
BrnPairInfoTable(
isValueAlign: false,
- expandAtIndex:2,
+ expandAtIndex: 2,
children: [
- BrnInfoModal(keyPart: "名称:", valuePart: "内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容"),
+ BrnInfoModal(
+ keyPart: "名称:",
+ valuePart: "内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容"),
BrnInfoModal(keyPart: "名称名:", valuePart: "内容内容内容内容内容"),
BrnInfoModal(keyPart: "名称正常:", valuePart: "内容内容内容内容内容"),
- BrnInfoModal(keyPart: "名称名称名:", valuePart: "内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容"),
+ BrnInfoModal(
+ keyPart: "名称名称名:",
+ valuePart: "内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容"),
BrnInfoModal(
keyPart: "名称名称名:",
valuePart:
"内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内"),
- BrnInfoModal.valueLastClickInfo("名称十分的长名:", '内容内容内容内容内容', '可点击内容可点击内容可点击内容可点击内容',
+ BrnInfoModal.valueLastClickInfo(
+ "名称十分的长名:", '内容内容内容内容内容', '可点击内容可点击内容可点击内容可点击内容',
clickCallback: (text) {
BrnToast.show(text!, context);
}),
BrnInfoModal.valueLastClickInfo(
- "名称十分的长名:", '内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容', '可点击内容可点击内容可点击内容可点击内容',
- clickCallback: (text) {
+ "名称十分的长名:",
+ '内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容',
+ '可点击内容可点击内容可点击内容可点击内容', clickCallback: (text) {
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 f1a4df94..0579e485 100644
--- a/example/lib/sample/components/card/content/number_item_example.dart
+++ b/example/lib/sample/components/card/content/number_item_example.dart
@@ -1,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -24,8 +22,10 @@ class _NumberItemRowExampleState 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,
@@ -164,7 +164,8 @@ class _NumberItemRowExampleState extends State {
title: '主题定制可去掉分割线',
number: '2',
),
- BrnNumberInfoItemModel(title: '数字和描述文案字体都可配置', number: '3', lastDesc: '单位'),
+ BrnNumberInfoItemModel(
+ title: '数字和描述文案字体都可配置', number: '3', lastDesc: '单位'),
BrnNumberInfoItemModel(
title: '上下间距可配置',
number: '5',
@@ -235,7 +236,9 @@ class _NumberItemRowExampleState extends State {
"自定义底部",
maxLines: 2,
style: TextStyle(
- fontSize: 12, fontWeight: FontWeight.w400, color: Color(0xFF999999)),
+ fontSize: 12,
+ fontWeight: FontWeight.w400,
+ color: Color(0xFF999999)),
overflow: TextOverflow.ellipsis,
)),
BrnNumberInfoItemModel(
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 e16e0aec..590e88e2 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,5 +1,3 @@
-
-
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';
@@ -13,103 +11,105 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class TextContentEntryPage extends StatelessWidget {
-
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: BrnAppBar(
title: "文本内容示例",
- ),body: ListView(children: [
- ListItem(
- title: "单列左对齐",
- isShowLine: false,
- isSupportTheme: true,
- describe: 'key宽度最多92,value是左对齐的',
- onPressed: () {
- Navigator.push(context, MaterialPageRoute(
- builder: (BuildContext context) {
- return TextContentExample();
- },
- ));
- },
),
- ListItem(
- title: "单列紧贴着key名",
- isSupportTheme: true,
- describe: 'Value紧贴着Key,Key和value都是一行展示',
- onPressed: () {
- Navigator.push(context, MaterialPageRoute(
- builder: (BuildContext context) {
- return KeyTextCloseContentExample();
+ body: ListView(
+ children: [
+ ListItem(
+ title: "单列左对齐",
+ isShowLine: false,
+ isSupportTheme: true,
+ describe: 'key宽度最多92,value是左对齐的',
+ onPressed: () {
+ Navigator.push(context, MaterialPageRoute(
+ builder: (BuildContext context) {
+ return TextContentExample();
+ },
+ ));
},
- ));
- },
- ),
- ListItem(
- title: "两列纯文本",
- isShowLine: false,
- isSupportTheme: true,
- describe: '两组key-value展示',
- onPressed: () {
- Navigator.push(context, MaterialPageRoute(
- builder: (BuildContext context) {
- return BrnTextRIchContentExample();
+ ),
+ ListItem(
+ title: "单列紧贴着key名",
+ isSupportTheme: true,
+ describe: 'Value紧贴着Key,Key和value都是一行展示',
+ onPressed: () {
+ Navigator.push(context, MaterialPageRoute(
+ builder: (BuildContext context) {
+ return KeyTextCloseContentExample();
+ },
+ ));
},
- ));
- },
- ),
- ListItem(
- title: "两列复杂元素",
- isShowLine: false,
- isSupportTheme: true,
- describe: '元素中可以携带问号等',
- onPressed: () {
- Navigator.push(context, MaterialPageRoute(
- builder: (BuildContext context) {
- return BrnTwoRichContentExample();
+ ),
+ ListItem(
+ title: "两列纯文本",
+ isShowLine: false,
+ isSupportTheme: true,
+ describe: '两组key-value展示',
+ onPressed: () {
+ Navigator.push(context, MaterialPageRoute(
+ builder: (BuildContext context) {
+ return BrnTextRIchContentExample();
+ },
+ ));
},
- ));
- },
- ),
- ListItem(
- title: "强化数字信息",
- isShowLine: false,
- isSupportTheme: true,
- describe: '数字是大字体',
- onPressed: () {
- Navigator.push(context, MaterialPageRoute(
- builder: (BuildContext context) {
- return NumberItemRowExample();
+ ),
+ ListItem(
+ title: "两列复杂元素",
+ isShowLine: false,
+ isSupportTheme: true,
+ describe: '元素中可以携带问号等',
+ onPressed: () {
+ Navigator.push(context, MaterialPageRoute(
+ builder: (BuildContext context) {
+ return BrnTwoRichContentExample();
+ },
+ ));
},
- ));
- },
- ),
- ListItem(
- title: "纯文本展示可收起",
- isShowLine: false,
- isSupportTheme: true,
- describe: '展开收起文本',
- onPressed: () {
- Navigator.push(context, MaterialPageRoute(
- builder: (BuildContext context) {
- return BrnTextExpandedContentExample();
+ ),
+ ListItem(
+ title: "强化数字信息",
+ isShowLine: false,
+ isSupportTheme: true,
+ describe: '数字是大字体',
+ onPressed: () {
+ Navigator.push(context, MaterialPageRoute(
+ builder: (BuildContext context) {
+ return NumberItemRowExample();
+ },
+ ));
},
- ));
- },
- ),
- ListItem(
- title: "文本+跳转操作",
- isShowLine: false,
- describe: 'value带有跳转箭头',
- onPressed: () {
- Navigator.push(context, MaterialPageRoute(
- builder: (BuildContext context) {
- return TextValueArrowContentExample();
+ ),
+ ListItem(
+ title: "纯文本展示可收起",
+ isShowLine: false,
+ isSupportTheme: true,
+ describe: '展开收起文本',
+ onPressed: () {
+ Navigator.push(context, MaterialPageRoute(
+ builder: (BuildContext context) {
+ return BrnTextExpandedContentExample();
+ },
+ ));
},
- ));
- },
+ ),
+ ListItem(
+ title: "文本+跳转操作",
+ isShowLine: false,
+ describe: 'value带有跳转箭头',
+ onPressed: () {
+ Navigator.push(context, MaterialPageRoute(
+ builder: (BuildContext context) {
+ return TextValueArrowContentExample();
+ },
+ ));
+ },
+ ),
+ ],
),
-
- ],),);
+ );
}
}
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 e902465a..143ad29e 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,14 +1,14 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
class TextValueArrowContentExample extends StatefulWidget {
@override
- _TextValueArrowContentExampleState createState() => _TextValueArrowContentExampleState();
+ _TextValueArrowContentExampleState createState() =>
+ _TextValueArrowContentExampleState();
}
-class _TextValueArrowContentExampleState extends State {
+class _TextValueArrowContentExampleState
+ extends State {
@override
Widget build(BuildContext context) {
return Scaffold(
@@ -23,7 +23,10 @@ class _TextValueArrowContentExampleState extends State[
Text(
'规则',
- style: TextStyle(color: Color(0xFF222222), fontSize: 28, fontWeight: FontWeight.bold),
+ style: TextStyle(
+ color: Color(0xFF222222),
+ fontSize: 28,
+ fontWeight: FontWeight.bold),
),
BrnBubbleText(
maxLines: 4,
@@ -147,7 +150,8 @@ 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/brn_common_title_example.dart b/example/lib/sample/components/card_title/brn_common_title_example.dart
index fd5bd176..060b2f09 100644
--- a/example/lib/sample/components/card_title/brn_common_title_example.dart
+++ b/example/lib/sample/components/card_title/brn_common_title_example.dart
@@ -1,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
diff --git a/example/lib/sample/components/card_title/title_example.dart b/example/lib/sample/components/card_title/title_example.dart
index 084cce7a..66b73224 100644
--- a/example/lib/sample/components/card_title/title_example.dart
+++ b/example/lib/sample/components/card_title/title_example.dart
@@ -1,5 +1,3 @@
-
-
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 64dd6ea0..7afea5dc 100644
--- a/example/lib/sample/components/charts/chart_entry_example.dart
+++ b/example/lib/sample/components/charts/chart_entry_example.dart
@@ -1,5 +1,3 @@
-
-
import 'dart:math';
import 'package:bruno/bruno.dart';
@@ -414,7 +412,8 @@ class RadarChartExample extends StatefulWidget {
}
}
-class _RadarChartExampleState extends State with SingleTickerProviderStateMixin {
+class _RadarChartExampleState extends State
+ with SingleTickerProviderStateMixin {
late double radius;
int? sideCount;
double? angle;
@@ -445,7 +444,8 @@ class _RadarChartExampleState extends State with SingleTicker
dataList1[i.toString()] = data1;
dataList2[i.toString()] = data2;
}
- controller = new AnimationController(duration: const Duration(milliseconds: 300), vsync: this);
+ controller = new AnimationController(
+ duration: const Duration(milliseconds: 300), vsync: this);
animation = new CurvedAnimation(parent: controller, curve: Curves.ease);
animation = new Tween(begin: 0.0, end: 1.0).animate(animation);
controller.forward();
@@ -464,8 +464,17 @@ class _RadarChartExampleState extends State with SingleTicker
sidesCount: 5,
markerMargin: padding,
rotateAngle: angle! * 2 * pi / 360,
- data: [dataList1[sideCount.toString()]!, dataList2[sideCount.toString()]!],
- tagNames: ['合作共赢诚实守信', '合作共赢诚实守信', '合作共赢诚实守信', '合作共赢诚实守信', '合作共赢诚实守信'],
+ data: [
+ dataList1[sideCount.toString()]!,
+ dataList2[sideCount.toString()]!
+ ],
+ tagNames: [
+ '合作共赢诚实守信',
+ '合作共赢诚实守信',
+ '合作共赢诚实守信',
+ '合作共赢诚实守信',
+ '合作共赢诚实守信'
+ ],
);
} else {
return BrnRadarChart(
diff --git a/example/lib/sample/components/charts/doughnut_chart_example.dart b/example/lib/sample/components/charts/doughnut_chart_example.dart
index b653326a..6b67a20b 100644
--- a/example/lib/sample/components/charts/doughnut_chart_example.dart
+++ b/example/lib/sample/components/charts/doughnut_chart_example.dart
@@ -1,5 +1,3 @@
-
-
import 'dart:math';
import 'package:bruno/bruno.dart';
@@ -29,7 +27,9 @@ class DoughnutChartExampleState extends State {
super.initState();
for (int i = 0; i < count; i++) {
dataList.add(BrnDoughnutDataItem(
- title: '示例', value: random(1, 5).toDouble(), color: getColorWithIndex(i)));
+ title: '示例',
+ value: random(1, 5).toDouble(),
+ color: getColorWithIndex(i)));
}
}
@@ -63,7 +63,9 @@ class DoughnutChartExampleState extends State {
});
},
),
- DoughnutChartLegend(data: this.dataList, legendStyle: BrnDoughnutChartLegendStyle.wrap),
+ DoughnutChartLegend(
+ data: this.dataList,
+ legendStyle: BrnDoughnutChartLegendStyle.wrap),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
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 0d6b119b..cbb7929f 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,5 +1,3 @@
-
-
import 'dart:math';
import 'package:bruno/bruno.dart';
@@ -72,7 +70,10 @@ class _BrokenLineExampleState extends State {
isShowPoint: true,
isCurve: true,
points: _linePointsForExample1(brokenData),
- shaderColors: [Colors.green.withOpacity(0.3), Colors.green.withOpacity(0.01)],
+ shaderColors: [
+ Colors.green.withOpacity(0.3),
+ Colors.green.withOpacity(0.01)
+ ],
lineColor: Colors.green,
)
],
@@ -101,7 +102,6 @@ class _BrokenLineExampleState extends State {
x: brokenData.indexOf(_).toDouble(),
y: double.parse(_.value!),
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return _.value;
@@ -109,7 +109,8 @@ class _BrokenLineExampleState extends State {
.toList();
}
- List _getYDialValuesForExample1(List brokenData) {
+ List _getYDialValuesForExample1(
+ List brokenData) {
double min = _getMinValueForExample1(brokenData);
double max = _getMaxValueForExample1(brokenData);
double dValue = (max - min) / 10;
@@ -145,7 +146,8 @@ class _BrokenLineExampleState extends State {
return maxValue;
}
- List _getXDialValuesForExample1(List brokenData) {
+ List _getXDialValuesForExample1(
+ List brokenData) {
List _xDialValue = [];
for (int index = 0; index < brokenData.length; index++) {
_xDialValue.add(BrnDialItem(
@@ -205,7 +207,6 @@ class _BrokenLineExampleState extends State {
x: 1,
y: 15,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '15';
@@ -215,7 +216,6 @@ class _BrokenLineExampleState extends State {
y: 30,
pointText: '22222',
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '30';
@@ -225,7 +225,6 @@ class _BrokenLineExampleState extends State {
x: 3,
y: 17,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '17';
@@ -235,7 +234,6 @@ class _BrokenLineExampleState extends State {
x: 4,
y: 45,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '45';
@@ -245,13 +243,15 @@ class _BrokenLineExampleState extends State {
x: 5,
y: 80,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '80';
})),
],
- shaderColors: [Colors.blue.withOpacity(0.3), Colors.blue.withOpacity(0.01)],
+ shaderColors: [
+ Colors.blue.withOpacity(0.3),
+ Colors.blue.withOpacity(0.01)
+ ],
lineColor: Colors.blue,
);
_pointsLine1 = BrnPointsLine(
@@ -267,7 +267,6 @@ class _BrokenLineExampleState extends State {
x: 2.5,
y: 4,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '30';
@@ -277,7 +276,6 @@ class _BrokenLineExampleState extends State {
x: 3,
y: 20,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '17';
@@ -287,7 +285,6 @@ class _BrokenLineExampleState extends State {
x: 4,
y: 30,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '45';
@@ -297,7 +294,6 @@ class _BrokenLineExampleState extends State {
x: 5,
y: 50,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '80';
@@ -307,13 +303,15 @@ class _BrokenLineExampleState extends State {
x: 6,
y: 5,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '80';
})),
],
- shaderColors: [Colors.green.withOpacity(0.3), Colors.green.withOpacity(0.01)],
+ shaderColors: [
+ Colors.green.withOpacity(0.3),
+ Colors.green.withOpacity(0.01)
+ ],
lineColor: Colors.green,
);
@@ -434,7 +432,6 @@ class _BrokenLineExampleState extends State {
y: 30,
x: 1,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return Container(
@@ -465,16 +462,18 @@ class _BrokenLineExampleState extends State {
y: 80,
x: 2,
lineTouchData: BrnLineTouchData(
-
onTouch: () {
return Container(
- padding: EdgeInsets.only(left: 10, right: 10, top: 8, bottom: 8),
+ padding:
+ EdgeInsets.only(left: 10, right: 10, top: 8, bottom: 8),
child: Center(
child: Text(
- 'content',
- style:
- TextStyle(fontSize: 12, fontWeight: FontWeight.w500, color: Colors.white),
- )),
+ 'content',
+ style: TextStyle(
+ fontSize: 12,
+ fontWeight: FontWeight.w500,
+ color: Colors.white),
+ )),
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.8),
borderRadius: BorderRadius.circular(2.0),
@@ -487,7 +486,8 @@ class _BrokenLineExampleState extends State {
],
),
);
- }, tipWindowSize:Size(60, 40) )),
+ },
+ tipWindowSize: Size(60, 40))),
BrnPointData(
pointText: '20',
y: 20,
@@ -502,7 +502,7 @@ class _BrokenLineExampleState extends State {
y: 67,
x: 4,
lineTouchData: BrnLineTouchData(
- tipWindowSize:Size(60, 40),
+ tipWindowSize: Size(60, 40),
onTouch: () {
return '66';
})),
@@ -511,7 +511,6 @@ class _BrokenLineExampleState extends State {
y: 10,
x: 5,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '10';
@@ -521,7 +520,6 @@ class _BrokenLineExampleState extends State {
y: 40,
x: 6,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '40';
@@ -531,7 +529,6 @@ class _BrokenLineExampleState extends State {
y: 60,
x: 7,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '100';
@@ -541,7 +538,6 @@ class _BrokenLineExampleState extends State {
y: 70,
x: 8,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '100';
@@ -551,7 +547,6 @@ class _BrokenLineExampleState extends State {
y: 90,
x: 9,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '100';
@@ -561,7 +556,6 @@ class _BrokenLineExampleState extends State {
y: 80,
x: 10,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '11';
@@ -571,7 +565,6 @@ class _BrokenLineExampleState extends State {
y: 100,
x: 11,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '100';
@@ -592,7 +585,6 @@ class _BrokenLineExampleState extends State {
y: 15,
x: 1,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '15';
@@ -602,7 +594,6 @@ class _BrokenLineExampleState extends State {
y: 30,
x: 2,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '30';
@@ -612,7 +603,6 @@ class _BrokenLineExampleState extends State {
y: 17,
x: 3,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '17';
@@ -622,7 +612,6 @@ class _BrokenLineExampleState extends State {
y: 25,
x: 4,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '18';
@@ -632,7 +621,6 @@ class _BrokenLineExampleState extends State {
y: 40,
x: 5,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '13';
@@ -642,7 +630,6 @@ class _BrokenLineExampleState extends State {
y: 30,
x: 6,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '16';
@@ -652,7 +639,6 @@ class _BrokenLineExampleState extends State {
y: 49,
x: 7,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '49';
@@ -671,7 +657,6 @@ class _BrokenLineExampleState extends State {
y: 80,
x: 9,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '77';
@@ -681,7 +666,6 @@ class _BrokenLineExampleState extends State {
y: 90,
x: 10,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '88';
@@ -691,13 +675,15 @@ class _BrokenLineExampleState extends State {
y: 60,
x: 11,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '99';
})),
],
- shaderColors: [Colors.green.withOpacity(0.3), Colors.green.withOpacity(0.01)],
+ shaderColors: [
+ Colors.green.withOpacity(0.3),
+ Colors.green.withOpacity(0.01)
+ ],
lineColor: Colors.green,
);
@@ -804,7 +790,6 @@ class _BrokenLineExampleState extends State {
y: 30,
x: 1,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return Container(
@@ -838,12 +823,15 @@ class _BrokenLineExampleState extends State {
tipWindowSize: Size(60, 40),
onTouch: () {
return Container(
- padding: EdgeInsets.only(left: 10, right: 10, top: 8, bottom: 8),
+ padding:
+ EdgeInsets.only(left: 10, right: 10, top: 8, bottom: 8),
child: Center(
child: Text(
'content',
- style:
- TextStyle(fontSize: 12, fontWeight: FontWeight.w500, color: Colors.white),
+ style: TextStyle(
+ fontSize: 12,
+ fontWeight: FontWeight.w500,
+ color: Colors.white),
)),
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.8),
@@ -881,7 +869,6 @@ class _BrokenLineExampleState extends State {
y: 10,
x: 5,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '10';
@@ -891,7 +878,6 @@ class _BrokenLineExampleState extends State {
y: 40,
x: 6,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '40';
@@ -901,7 +887,6 @@ class _BrokenLineExampleState extends State {
y: 60,
x: 7,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '100';
@@ -911,7 +896,6 @@ class _BrokenLineExampleState extends State {
y: 70,
x: 8,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '100';
@@ -921,7 +905,6 @@ class _BrokenLineExampleState extends State {
y: 90,
x: 9,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '100';
@@ -931,7 +914,6 @@ class _BrokenLineExampleState extends State {
y: 80,
x: 10,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '11';
@@ -941,7 +923,6 @@ class _BrokenLineExampleState extends State {
y: 100,
x: 11,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '100';
@@ -962,7 +943,6 @@ class _BrokenLineExampleState extends State {
y: 15,
x: 1,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '15';
@@ -972,7 +952,6 @@ class _BrokenLineExampleState extends State {
y: 30,
x: 2,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '30';
@@ -982,7 +961,6 @@ class _BrokenLineExampleState extends State {
y: 17,
x: 3,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '17';
@@ -992,7 +970,6 @@ class _BrokenLineExampleState extends State {
y: 25,
x: 4,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '18';
@@ -1002,7 +979,6 @@ class _BrokenLineExampleState extends State {
y: 40,
x: 5,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '13';
@@ -1012,7 +988,6 @@ class _BrokenLineExampleState extends State {
y: 30,
x: 6,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '16';
@@ -1022,7 +997,6 @@ class _BrokenLineExampleState extends State {
y: 49,
x: 7,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '49';
@@ -1041,7 +1015,6 @@ class _BrokenLineExampleState extends State {
y: 80,
x: 9,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '77';
@@ -1051,7 +1024,6 @@ class _BrokenLineExampleState extends State {
y: 90,
x: 10,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '88';
@@ -1061,13 +1033,15 @@ class _BrokenLineExampleState extends State {
y: 60,
x: 11,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '99';
})),
],
- shaderColors: [Colors.green.withOpacity(0.3), Colors.green.withOpacity(0.01)],
+ shaderColors: [
+ Colors.green.withOpacity(0.3),
+ Colors.green.withOpacity(0.01)
+ ],
lineColor: Colors.green,
);
@@ -1123,14 +1097,15 @@ class _BrokenLineExampleState extends State {
var chartLine = BrnBrokenLine(
contentPadding: EdgeInsets.only(left: 20, right: 10),
lines: _getPointsLineListWithShowPointText(),
- size: Size(
- MediaQuery.of(context).size.width, MediaQuery.of(context).size.height / 5 * 1.6 - 20 * 2),
+ size: Size(MediaQuery.of(context).size.width,
+ MediaQuery.of(context).size.height / 5 * 1.6 - 20 * 2),
isShowXHintLine: true,
yHintLineOffset: 30,
yDialValues: _yDialValuesForExample5(),
yDialMin: 0,
yDialMax: 120,
- xDialValues: _getXDialValuesForExample5(_getPointsLineListWithShowPointText()),
+ xDialValues:
+ _getXDialValuesForExample5(_getPointsLineListWithShowPointText()),
xDialMin: 1,
xDialMax: 11,
isHintLineSolid: false,
@@ -1209,12 +1184,11 @@ class _BrokenLineExampleState extends State {
points: [
BrnPointData(
pointText: '9999.99',
- pointTextStyle:
- TextStyle(fontWeight: FontWeight.w600, fontSize: 12, color: Colors.red),
+ pointTextStyle: TextStyle(
+ fontWeight: FontWeight.w600, fontSize: 12, color: Colors.red),
y: 80,
x: 1,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return Container(
@@ -1243,20 +1217,23 @@ class _BrokenLineExampleState extends State {
BrnPointData(
offset: Offset(0, -5),
pointText: '9999.99',
- pointTextStyle:
- TextStyle(fontWeight: FontWeight.w600, fontSize: 12, color: Colors.red),
+ pointTextStyle: TextStyle(
+ fontWeight: FontWeight.w600, fontSize: 12, color: Colors.red),
y: 80,
x: 2,
lineTouchData: BrnLineTouchData(
tipWindowSize: Size(60, 40),
onTouch: () {
return Container(
- padding: EdgeInsets.only(left: 10, right: 10, top: 8, bottom: 8),
+ padding:
+ EdgeInsets.only(left: 10, right: 10, top: 8, bottom: 8),
child: Center(
child: Text(
'content',
- style:
- TextStyle(fontSize: 12, fontWeight: FontWeight.w500, color: Colors.white),
+ style: TextStyle(
+ fontSize: 12,
+ fontWeight: FontWeight.w500,
+ color: Colors.white),
)),
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.8),
@@ -1276,7 +1253,6 @@ class _BrokenLineExampleState extends State {
y: 20,
x: 3,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '20';
@@ -1295,7 +1271,6 @@ class _BrokenLineExampleState extends State {
y: 10,
x: 5,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '10';
@@ -1305,7 +1280,6 @@ class _BrokenLineExampleState extends State {
y: 40,
x: 6,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '40';
@@ -1315,7 +1289,6 @@ class _BrokenLineExampleState extends State {
y: 60,
x: 7,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '100';
@@ -1325,7 +1298,6 @@ class _BrokenLineExampleState extends State {
y: 70,
x: 8,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '100';
@@ -1335,7 +1307,6 @@ class _BrokenLineExampleState extends State {
y: 90,
x: 9,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '100';
@@ -1345,7 +1316,6 @@ class _BrokenLineExampleState extends State {
y: 80,
x: 10,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '11';
@@ -1355,7 +1325,6 @@ class _BrokenLineExampleState extends State {
y: 100,
x: 11,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '100';
@@ -1375,7 +1344,6 @@ class _BrokenLineExampleState extends State {
y: 15,
x: 1,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '15';
@@ -1385,7 +1353,6 @@ class _BrokenLineExampleState extends State {
y: 30,
x: 2,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '30';
@@ -1395,7 +1362,6 @@ class _BrokenLineExampleState extends State {
y: 17,
x: 3,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '17';
@@ -1405,7 +1371,6 @@ class _BrokenLineExampleState extends State {
y: 25,
x: 4,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '18';
@@ -1415,7 +1380,6 @@ class _BrokenLineExampleState extends State {
y: 40,
x: 5,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '13';
@@ -1425,7 +1389,6 @@ class _BrokenLineExampleState extends State {
y: 30,
x: 6,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '16';
@@ -1435,7 +1398,6 @@ class _BrokenLineExampleState extends State {
y: 49,
x: 7,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '49';
@@ -1445,7 +1407,6 @@ class _BrokenLineExampleState extends State {
y: 66,
x: 8,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '66';
@@ -1455,7 +1416,6 @@ class _BrokenLineExampleState extends State {
y: 80,
x: 9,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '77';
@@ -1465,7 +1425,6 @@ class _BrokenLineExampleState extends State {
y: 90,
x: 10,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '88';
@@ -1475,13 +1434,15 @@ class _BrokenLineExampleState extends State {
y: 60,
x: 11,
lineTouchData: BrnLineTouchData(
-
tipWindowSize: Size(60, 40),
onTouch: () {
return '99';
})),
],
- shaderColors: [Colors.green.withOpacity(0.3), Colors.green.withOpacity(0.01)],
+ shaderColors: [
+ Colors.green.withOpacity(0.3),
+ Colors.green.withOpacity(0.01)
+ ],
lineColor: Colors.green,
);
@@ -1498,7 +1459,8 @@ class _BrokenLineExampleState extends State {
height: 3,
width: 12,
decoration: BoxDecoration(
- color: bean.lineColor, borderRadius: BorderRadius.all(Radius.circular(1.5))),
+ color: bean.lineColor,
+ borderRadius: BorderRadius.all(Radius.circular(1.5))),
),
Text('图例', style: TextStyle(fontSize: 12, color: Color(0xFF999999))),
SizedBox(width: 6),
@@ -1509,7 +1471,8 @@ class _BrokenLineExampleState extends State {
return Column(mainAxisSize: MainAxisSize.max, children: [
Container(
alignment: Alignment.centerLeft,
- child: Text('图表标题', style: TextStyle(fontSize: 18, color: Colors.black))),
+ child: Text('图表标题',
+ style: TextStyle(fontSize: 18, color: Colors.black))),
Row(children: widgetList),
]);
}
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 fc5928b8..cc84cf5b 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,7 +1,5 @@
/// @desc 看板卡片中用于描述数据指标的模型,也能用于数据块的定义,内部嵌套了一个itemList
-
-
class DBDataNodeModel {
String? key;
String? name;
@@ -26,6 +24,7 @@ class DBDataNodeModel {
/// section data field
String? url;
DBDataNodeModel? total;
+
DBDataNodeModel();
factory DBDataNodeModel.fromJson(Map? json) {
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 b0563676..7f987101 100644
--- a/example/lib/sample/components/charts/progress_bar_chart_example.dart
+++ b/example/lib/sample/components/charts/progress_bar_chart_example.dart
@@ -1,5 +1,3 @@
-
-
import 'dart:math';
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -34,7 +32,10 @@ class ProgressBarChartExampleState extends State {
AxisItem(showText: '20'),
AxisItem(showText: '30')
]),
- yAxis: ChartAxis(axisItemList: [AxisItem(showText: '示例1'), AxisItem(showText: '示例2')]),
+ yAxis: ChartAxis(axisItemList: [
+ AxisItem(showText: '示例1'),
+ AxisItem(showText: '示例2')
+ ]),
singleBarWidth: 30,
barBundleList: [
BrnProgressBarBundle(barList: [
@@ -63,12 +64,17 @@ class ProgressBarChartExampleState extends State {
barBundleList: [
BrnProgressBarBundle(barList: [
BrnProgressBarItem(
- text: '示例11', value: 5, hintValue: 15, showBarValueText: "1122334"),
- BrnProgressBarItem(text: '示例12', value: 20, selectedHintText: '示例12:20'),
+ text: '示例11',
+ value: 5,
+ hintValue: 15,
+ showBarValueText: "1122334"),
+ BrnProgressBarItem(
+ text: '示例12', value: 20, selectedHintText: '示例12:20'),
BrnProgressBarItem(
text: '示例13',
value: 30,
- selectedHintText: '示例13:30\n示例13:30\n示例13:30\n示例13:30\n示例13:30\n示例13:30'),
+ selectedHintText:
+ '示例13:30\n示例13:30\n示例13:30\n示例13:30\n示例13:30\n示例13:30'),
BrnProgressBarItem(text: '示例14', value: 25),
BrnProgressBarItem(text: '示例15', value: 21),
BrnProgressBarItem(text: '示例16', value: 28),
@@ -82,11 +88,13 @@ class ProgressBarChartExampleState extends State {
]),
BrnProgressBarBundle(barList: [
BrnProgressBarItem(text: '示例21', value: 20, hintValue: 15),
- BrnProgressBarItem(text: '示例22', value: 15, selectedHintText: '示例12:20'),
+ BrnProgressBarItem(
+ text: '示例22', value: 15, selectedHintText: '示例12:20'),
BrnProgressBarItem(
text: '示例23',
value: 30,
- selectedHintText: '示例13:30\n示例13:30\n示例13:30\n示例13:30\n示例13:30\n示例13:30'),
+ selectedHintText:
+ '示例13:30\n示例13:30\n示例13:30\n示例13:30\n示例13:30\n示例13:30'),
BrnProgressBarItem(text: '示例24', value: 20),
BrnProgressBarItem(text: '示例25', value: 28),
BrnProgressBarItem(text: '示例26', value: 25),
@@ -107,7 +115,8 @@ class ProgressBarChartExampleState extends State {
singleBarWidth: 30,
barGroupSpace: 30,
barMaxValue: 60,
- onBarItemClickInterceptor: (barBundleIndex, barBundle, barGroupIndex, barItem) {
+ onBarItemClickInterceptor:
+ (barBundleIndex, barBundle, barGroupIndex, barItem) {
return true;
},
)
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 6d71c9dc..bb0b34c9 100644
--- a/example/lib/sample/components/charts/progress_chart_entry_page.dart
+++ b/example/lib/sample/components/charts/progress_chart_entry_page.dart
@@ -1,5 +1,3 @@
-
-
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 f53999bf..2d36dac3 100644
--- a/example/lib/sample/components/dialog/dialog_entry_page.dart
+++ b/example/lib/sample/components/dialog/dialog_entry_page.dart
@@ -1,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:example/sample/home/list_item.dart';
import 'package:flutter/material.dart';
@@ -336,7 +334,7 @@ class DialogEntryPage extends StatelessWidget {
///多选弹框
void _showMiddleMultiSelectDialog(BuildContext context) {
- List data = [];
+ List data = [];
data.add(new MultiSelectItem("100", "感兴趣待跟进"));
data.add(new MultiSelectItem("101", "感兴趣但对本商圈没兴趣", isChecked: true));
data.add(new MultiSelectItem("102", "接通后挂断/不感兴趣", isChecked: true));
@@ -363,7 +361,7 @@ class DialogEntryPage extends StatelessWidget {
void _showMiddleMultiSelectWithMessageWidgetDialog(BuildContext context) {
String hintText = "感兴趣待跟进";
- List data = [];
+ List data = [];
data.add(new MultiSelectItem("100", "感兴趣待跟进"));
data.add(new MultiSelectItem("101", "感兴趣但对本商圈没兴趣", isChecked: true));
data.add(new MultiSelectItem("102", "接通后挂断/不感兴趣", isChecked: true));
@@ -432,7 +430,7 @@ class DialogEntryPage extends StatelessWidget {
///多选弹框
void _showMiddleMultiSelectWithMessageDialog(BuildContext context) {
- List data = [];
+ List data = [];
data.add(new MultiSelectItem("100", "感兴趣待跟进"));
data.add(new MultiSelectItem("101", "感兴趣但对本商圈没兴趣", isChecked: true));
data.add(new MultiSelectItem("102", "接通后挂断/不感兴趣", isChecked: true));
diff --git a/example/lib/sample/components/empty/abnormal_entry_page.dart b/example/lib/sample/components/empty/abnormal_entry_page.dart
index 3cfddc66..a0fa3ffa 100644
--- a/example/lib/sample/components/empty/abnormal_entry_page.dart
+++ b/example/lib/sample/components/empty/abnormal_entry_page.dart
@@ -1,5 +1,3 @@
-
-
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 9ec98bd5..c1c209f8 100644
--- a/example/lib/sample/components/empty/abnormal_state_example.dart
+++ b/example/lib/sample/components/empty/abnormal_state_example.dart
@@ -1,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
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 6084e42f..f5df6702 100644
--- a/example/lib/sample/components/form/all_item_style_example.dart
+++ b/example/lib/sample/components/form/all_item_style_example.dart
@@ -1,5 +1,3 @@
-
-
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';
@@ -221,7 +219,7 @@ class AllFormItemStyleExamplePage extends StatelessWidget {
));
},
),
- ListItem(
+ ListItem(
title: "全选表单项",
describe: "杂项类型",
isSupportTheme: true,
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 9d2f2d98..248937bb 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,5 +1,3 @@
-
-
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 2e810ecf..7516c930 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,5 +1,3 @@
-
-
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 5b4b133a..8edefddd 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,5 +1,3 @@
-
-
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 b2e8b9d7..2686d863 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,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -50,10 +48,10 @@ class BaseTitleExamplePage extends StatelessWidget {
tipLabel: "提示",
isRequire: true,
customActionWidget: Container(
- color:Colors.lightBlue,
+ color: Colors.lightBlue,
child: Center(
- child: Text('我是自定义视图', style: TextStyle(color: Colors.white))
- ),
+ child:
+ Text('我是自定义视图', style: TextStyle(color: Colors.white))),
),
onTip: () {
BrnToast.show("点击触发回调_onTip", context);
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 204e8f4b..a9b6e64f 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,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -44,7 +42,8 @@ class MultiChoiceInputExamplePage extends StatelessWidget {
},
onChanged: (List oldValue, List? newValue) {
BrnToast.show(
- "点击触发onChanged回调${oldValue.length}_${newValue!.length}_onChanged", context);
+ "点击触发onChanged回调${oldValue.length}_${newValue!.length}_onChanged",
+ context);
},
),
Container(
@@ -83,7 +82,8 @@ class MultiChoiceInputExamplePage extends StatelessWidget {
},
onChanged: (List oldValue, List? newValue) {
BrnToast.show(
- "点击触发onChanged回调${oldValue.length}_${newValue!.length}_onChanged", context);
+ "点击触发onChanged回调${oldValue.length}_${newValue!.length}_onChanged",
+ context);
},
),
Container(
@@ -121,7 +121,8 @@ class MultiChoiceInputExamplePage extends StatelessWidget {
},
onChanged: (List oldValue, List newValue) {
BrnToast.show(
- "点击触发onChanged回调${oldValue.length}_${newValue.length}_onChanged", context);
+ "点击触发onChanged回调${oldValue.length}_${newValue.length}_onChanged",
+ context);
},
),
],
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 e74e91aa..1935a264 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,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -48,7 +46,8 @@ class MultiChoicePortraitInputExamplePage extends StatelessWidget {
},
onChanged: (List oldValue, List newValue) {
BrnToast.show(
- "点击触发onChanged回调${oldValue.length}_${newValue.length}_onChanged", context);
+ "点击触发onChanged回调${oldValue.length}_${newValue.length}_onChanged",
+ context);
},
),
Container(
@@ -89,7 +88,8 @@ class MultiChoicePortraitInputExamplePage extends StatelessWidget {
},
onChanged: (List oldValue, List newValue) {
BrnToast.show(
- "点击触发onChanged回调${oldValue.length}_${newValue.length}_onChanged", context);
+ "点击触发onChanged回调${oldValue.length}_${newValue.length}_onChanged",
+ context);
},
),
Container(
@@ -129,7 +129,8 @@ class MultiChoicePortraitInputExamplePage extends StatelessWidget {
},
onChanged: (List oldValue, List newValue) {
BrnToast.show(
- "点击触发onChanged回调${oldValue.length}_${newValue.length}_onChanged", context);
+ "点击触发onChanged回调${oldValue.length}_${newValue.length}_onChanged",
+ context);
},
),
],
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 f05edb6e..f4393c5f 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,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -43,7 +41,8 @@ class RadioInputExamplePage extends StatelessWidget {
BrnToast.show("点击触发onRemoveTap回调", context);
},
onChanged: (oldValue, newValue) {
- BrnToast.show("点击触发回调${oldValue}_${newValue}_onChanged", context);
+ BrnToast.show(
+ "点击触发回调${oldValue}_${newValue}_onChanged", context);
},
),
Container(
@@ -78,7 +77,8 @@ class RadioInputExamplePage extends StatelessWidget {
BrnToast.show("点击触发onRemoveTap回调", context);
},
onChanged: (oldValue, newValue) {
- BrnToast.show("点击触发回调${oldValue}_${newValue}_onChanged", context);
+ BrnToast.show(
+ "点击触发回调${oldValue}_${newValue}_onChanged", context);
},
),
Container(
@@ -112,7 +112,8 @@ class RadioInputExamplePage extends StatelessWidget {
BrnToast.show("点击触发onRemoveTap回调", context);
},
onChanged: (oldValue, newValue) {
- BrnToast.show("点击触发回调${oldValue}_${newValue}_onChanged", context);
+ BrnToast.show(
+ "点击触发回调${oldValue}_${newValue}_onChanged", context);
},
),
Container(
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 b4c3949d..03cb1d39 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,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -44,7 +42,8 @@ class RadioPortraitInputExamplePage extends StatelessWidget {
BrnToast.show("点击触发onRemoveTap回调", context);
},
onChanged: (oldValue, newValue) {
- BrnToast.show("点击触发回调${oldValue}_${newValue}_onChanged", context);
+ BrnToast.show(
+ "点击触发回调${oldValue}_${newValue}_onChanged", context);
},
),
Container(
@@ -81,7 +80,8 @@ class RadioPortraitInputExamplePage extends StatelessWidget {
BrnToast.show("点击触发onRemoveTap回调", context);
},
onChanged: (oldValue, newValue) {
- BrnToast.show("点击触发回调${oldValue}_${newValue}_onChanged", context);
+ BrnToast.show(
+ "点击触发回调${oldValue}_${newValue}_onChanged", context);
},
),
Container(
@@ -117,7 +117,8 @@ class RadioPortraitInputExamplePage extends StatelessWidget {
BrnToast.show("点击触发onRemoveTap回调", context);
},
onChanged: (oldValue, newValue) {
- BrnToast.show("点击触发回调${oldValue}_${newValue}_onChanged", context);
+ BrnToast.show(
+ "点击触发回调${oldValue}_${newValue}_onChanged", context);
},
),
],
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 0e207851..e11a6e6b 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,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
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 5d374d59..d90e38f4 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,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
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 78507285..82003344 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,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -31,7 +29,7 @@ class SelectAllTitleExamplePage extends StatelessWidget {
subTitle: "这里是副标题",
selectText: '全选标题',
selectState: false,
- onSelectAll: (int index, bool isSelect){
+ onSelectAll: (int index, bool isSelect) {
BrnToast.show("全选回调_onSelectAll", context);
},
onTip: () {
@@ -56,12 +54,12 @@ class SelectAllTitleExamplePage extends StatelessWidget {
tipLabel: "提示",
isRequire: true,
customActionWidget: Container(
- color:Colors.lightBlue,
+ color: Colors.lightBlue,
child: Center(
- child: Text('我是自定义视图', style: TextStyle(color: Colors.white))
- ),
+ child:
+ Text('我是自定义视图', style: TextStyle(color: Colors.white))),
),
- onSelectAll: (int index, bool isSelect){
+ onSelectAll: (int index, bool isSelect) {
BrnToast.show("全选回调_onSelectAll", context);
},
onTip: () {
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 d9f2f43f..be97c7ce 100644
--- a/example/lib/sample/components/form/items_example/star_example.dart
+++ b/example/lib/sample/components/form/items_example/star_example.dart
@@ -1,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -40,7 +38,8 @@ class StarInputExamplePage extends StatelessWidget {
BrnToast.show("点击触发onRemoveTap回调", context);
},
onChanged: (oldValue, newValue) {
- BrnToast.show("点击触发回调${oldValue}_${newValue}_onChanged", context);
+ BrnToast.show(
+ "点击触发回调${oldValue}_${newValue}_onChanged", context);
},
),
Container(
@@ -73,7 +72,8 @@ class StarInputExamplePage extends StatelessWidget {
BrnToast.show("点击触发onRemoveTap回调", context);
},
onChanged: (oldValue, newValue) {
- BrnToast.show("点击触发回调${oldValue}_${newValue}_onChanged", context);
+ BrnToast.show(
+ "点击触发回调${oldValue}_${newValue}_onChanged", context);
},
),
Container(
@@ -105,7 +105,8 @@ class StarInputExamplePage extends StatelessWidget {
BrnToast.show("点击触发onRemoveTap回调", context);
},
onChanged: (oldValue, newValue) {
- BrnToast.show("点击触发回调${oldValue}_${newValue}_onChanged", context);
+ BrnToast.show(
+ "点击触发回调${oldValue}_${newValue}_onChanged", context);
},
),
],
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 07a92d2f..7ea9ce04 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,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -42,7 +40,8 @@ class StepInputExamplePage extends StatelessWidget {
BrnToast.show("点击触发onRemoveTap回调", context);
},
onChanged: (oldValue, newValue) {
- BrnToast.show("点击触发回调${oldValue}_${newValue}_onChanged", context);
+ BrnToast.show(
+ "点击触发回调${oldValue}_${newValue}_onChanged", context);
},
),
Container(
@@ -75,7 +74,8 @@ class StepInputExamplePage extends StatelessWidget {
BrnToast.show("点击触发onRemoveTap回调", context);
},
onChanged: (oldValue, newValue) {
- BrnToast.show("点击触发回调${oldValue}_${newValue}_onChanged", context);
+ BrnToast.show(
+ "点击触发回调${oldValue}_${newValue}_onChanged", context);
},
),
Container(
@@ -107,7 +107,8 @@ class StepInputExamplePage extends StatelessWidget {
BrnToast.show("点击触发onRemoveTap回调", context);
},
onChanged: (oldValue, newValue) {
- BrnToast.show("点击触发回调${oldValue}_${newValue}_onChanged", context);
+ BrnToast.show(
+ "点击触发回调${oldValue}_${newValue}_onChanged", context);
},
),
],
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 9d05ba9f..046d002a 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,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
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 2e3037d8..6c04ed6f 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,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
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 28698733..ade62644 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,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
@@ -63,11 +61,11 @@ class _TextQuickSelectInputExamplePageState
if (status[index]) {
selectedStr += '${options[index]} ';
} else if (selectedStr.contains(options[index])) {
- selectedStr = selectedStr.replaceFirst('${options[index]} ', '');
+ selectedStr =
+ selectedStr.replaceFirst('${options[index]} ', '');
}
BrnToast.show(
- "点击触发onBtnSelectChanged回调。\n index:$index",
- context);
+ "点击触发onBtnSelectChanged回调。\n index:$index", context);
setState(() {});
},
onTip: () {
@@ -105,15 +103,17 @@ class _TextQuickSelectInputExamplePageState
subTitle: "这里是副标题",
tipLabel: "标签",
onBtnSelectChanged: (index) {
- statusAllFunctionExample![index] = !statusAllFunctionExample![index];
+ statusAllFunctionExample![index] =
+ !statusAllFunctionExample![index];
if (statusAllFunctionExample![index]) {
selectedStrAllFunctionExample += '${options[index]} ';
- } else if (selectedStrAllFunctionExample.contains(options[index])) {
- selectedStrAllFunctionExample = selectedStrAllFunctionExample.replaceFirst('${options[index]} ', '');
+ } else if (selectedStrAllFunctionExample
+ .contains(options[index])) {
+ selectedStrAllFunctionExample = selectedStrAllFunctionExample
+ .replaceFirst('${options[index]} ', '');
}
BrnToast.show(
- "点击触发onBtnSelectChanged回调。\n index:$index",
- context);
+ "点击触发onBtnSelectChanged回调。\n index:$index", context);
setState(() {});
},
onTip: () {
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 7a689bbd..2f1ebfb3 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,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
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 8bcd8bb2..227cd61a 100644
--- a/example/lib/sample/components/form/items_example/title_example.dart
+++ b/example/lib/sample/components/form/items_example/title_example.dart
@@ -1,5 +1,3 @@
-
-
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 afaff9d7..5af6a75a 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,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
diff --git a/example/lib/sample/components/gallery/gallery_detail_example.dart b/example/lib/sample/components/gallery/gallery_detail_example.dart
index 1219679d..453bfb3c 100644
--- a/example/lib/sample/components/gallery/gallery_detail_example.dart
+++ b/example/lib/sample/components/gallery/gallery_detail_example.dart
@@ -1,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -9,7 +7,8 @@ class GalleryDetailExamplePage extends StatefulWidget {
final String? title;
final PhotoGalleryTheme photoGalleryTheme;
- GalleryDetailExamplePage({this.title, this.photoGalleryTheme = PhotoGalleryTheme.dark});
+ GalleryDetailExamplePage(
+ {this.title, this.photoGalleryTheme = PhotoGalleryTheme.dark});
@override
State createState() {
@@ -44,7 +43,8 @@ class GalleryDetailExamplePageState extends State {
themeData: PhotoGalleryTheme.dark == widget.photoGalleryTheme
? BrnGalleryDetailConfig.dark()
: BrnGalleryDetailConfig.light(),
- url: "https://img1.baidu.com/it/u=2496571732,442429806&fm=26&fmt=auto&gp=0.jpg",
+ url:
+ "https://img1.baidu.com/it/u=2496571732,442429806&fm=26&fmt=auto&gp=0.jpg",
showBottom: true,
bottomCardModel: PhotoBottomCardState.cantFold,
name: "一只猫",
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 88ea69ac..9924ff3f 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,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:example/sample/components/gallery/gallery_detail_example.dart';
import 'package:example/sample/home/list_item.dart';
@@ -18,7 +16,7 @@ class GalleryDetailPageThemeExample extends StatelessWidget {
ListItem(
title: "图片详情-白色主题",
describe: "图片详情带白色主题",
- isShowLine:false,
+ isShowLine: false,
onPressed: () {
Navigator.push(context, MaterialPageRoute(
builder: (BuildContext context) {
diff --git a/example/lib/sample/components/gallery/gallery_example.dart b/example/lib/sample/components/gallery/gallery_example.dart
index fe88e811..127387f4 100644
--- a/example/lib/sample/components/gallery/gallery_example.dart
+++ b/example/lib/sample/components/gallery/gallery_example.dart
@@ -1,5 +1,3 @@
-
-
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';
@@ -7,8 +5,6 @@ import 'package:flutter/material.dart';
// ignore: must_be_immutable
class GalleryExample extends StatelessWidget {
-
-
List allConfig = [
BrnPhotoGroupConfig.url(title: '第一项', urls: [
'http://img1.mukewang.com/5c18cf540001ac8206000338.jpg',
@@ -25,7 +21,7 @@ class GalleryExample extends StatelessWidget {
bottomCardModel: PhotoBottomCardState.cantFold,
name: "一只猫",
des:
- "图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述"),
+ "图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述"),
BrnPhotoItemConfig(
url: 'http://img1.mukewang.com/5c18cf540001ac8206000338.jpg',
showBottom: true,
@@ -38,13 +34,13 @@ class GalleryExample extends StatelessWidget {
bottomCardModel: PhotoBottomCardState.unFold,
name: "三只猫",
des:
- "图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述"),
+ "图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述"),
BrnPhotoItemConfig(
url: 'http://img1.mukewang.com/5c18cf540001ac8206000338.jpg',
showBottom: false,
name: "一张图片",
des:
- "图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述")
+ "图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述")
]),
BrnPhotoGroupConfig.url(title: '第二项', urls: [
'http://img1.mukewang.com/5c18cf540001ac8206000338.jpg',
@@ -73,7 +69,7 @@ class GalleryExample extends StatelessWidget {
bottomCardModel: PhotoBottomCardState.fold,
name: "一张图片",
des:
- "图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述")
+ "图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述")
]),
BrnPhotoGroupConfig(title: "带展示信息的模块", configList: [
BrnPhotoItemConfig(
@@ -82,7 +78,7 @@ class GalleryExample extends StatelessWidget {
bottomCardModel: PhotoBottomCardState.fold,
name: "一张图片",
des:
- "图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述")
+ "图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述图片描述")
])
];
@@ -91,30 +87,34 @@ class GalleryExample extends StatelessWidget {
return Scaffold(
appBar: BrnAppBar(
title: "Gallery 图片",
- ),body: ListView(children: [
- ListItem(
- title: "图片选择控件",
- isShowLine: false,
- describe: "查看图片列表页",
- onPressed: () {
- Navigator.push(context, MaterialPageRoute(
- builder: (BuildContext context) {
- return BrnGallerySummaryPage(allConfig: allConfig);
- },
- ));
- },
),
- ListItem(
- title: "图片详情查看",
- describe: '跳转第一项的第五张图',
- onPressed: () {
- Navigator.push(context, MaterialPageRoute(
- builder: (BuildContext context) {
- return GalleryDetailPageThemeExample();
+ body: ListView(
+ children: [
+ ListItem(
+ title: "图片选择控件",
+ isShowLine: false,
+ describe: "查看图片列表页",
+ onPressed: () {
+ Navigator.push(context, MaterialPageRoute(
+ builder: (BuildContext context) {
+ return BrnGallerySummaryPage(allConfig: allConfig);
+ },
+ ));
+ },
+ ),
+ ListItem(
+ title: "图片详情查看",
+ describe: '跳转第一项的第五张图',
+ onPressed: () {
+ Navigator.push(context, MaterialPageRoute(
+ builder: (BuildContext context) {
+ return GalleryDetailPageThemeExample();
+ },
+ ));
},
- ));
- },
+ ),
+ ],
),
- ],),);
+ );
}
}
diff --git a/example/lib/sample/components/guide/force_guide_example.dart b/example/lib/sample/components/guide/force_guide_example.dart
index f8996bac..cb14364c 100644
--- a/example/lib/sample/components/guide/force_guide_example.dart
+++ b/example/lib/sample/components/guide/force_guide_example.dart
@@ -1,5 +1,3 @@
-
-
import 'dart:async';
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
diff --git a/example/lib/sample/components/guide/guide_entry_page.dart b/example/lib/sample/components/guide/guide_entry_page.dart
index f15dc4b7..ac312e6e 100644
--- a/example/lib/sample/components/guide/guide_entry_page.dart
+++ b/example/lib/sample/components/guide/guide_entry_page.dart
@@ -1,5 +1,3 @@
-
-
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';
@@ -8,37 +6,40 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class GuideEntryPage extends StatelessWidget {
-
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: BrnAppBar(
title: "引导示例",
- ),body: ListView(children: [
- ListItem(
- title: "强引导组件",
- isShowLine: false,
- describe: '强引导组件example',
- onPressed: () {
- Navigator.push(context, MaterialPageRoute(
- builder: (BuildContext context) {
- return ForceGuideExample();
- },
- ));
- },
),
- ListItem(
- title: "弱引导组件",
- isSupportTheme: true,
- describe: '弱引导组件example',
- onPressed: () {
- Navigator.push(context, MaterialPageRoute(
- builder: (BuildContext context) {
- return SoftGuideExample();
+ body: ListView(
+ children: [
+ ListItem(
+ title: "强引导组件",
+ isShowLine: false,
+ describe: '强引导组件example',
+ onPressed: () {
+ Navigator.push(context, MaterialPageRoute(
+ builder: (BuildContext context) {
+ return ForceGuideExample();
+ },
+ ));
+ },
+ ),
+ ListItem(
+ title: "弱引导组件",
+ isSupportTheme: true,
+ describe: '弱引导组件example',
+ onPressed: () {
+ Navigator.push(context, MaterialPageRoute(
+ builder: (BuildContext context) {
+ return SoftGuideExample();
+ },
+ ));
},
- ));
- },
+ ),
+ ],
),
- ],),);
+ );
}
}
diff --git a/example/lib/sample/components/guide/soft_intro_example.dart b/example/lib/sample/components/guide/soft_intro_example.dart
index bce101cd..d4dfd4aa 100644
--- a/example/lib/sample/components/guide/soft_intro_example.dart
+++ b/example/lib/sample/components/guide/soft_intro_example.dart
@@ -1,5 +1,3 @@
-
-
import 'dart:async';
import 'package:bruno/bruno.dart';
diff --git a/example/lib/sample/components/input/input_example.dart b/example/lib/sample/components/input/input_example.dart
index eb306cd5..98853e93 100644
--- a/example/lib/sample/components/input/input_example.dart
+++ b/example/lib/sample/components/input/input_example.dart
@@ -1,11 +1,9 @@
-
-
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 {
diff --git a/example/lib/sample/components/line/dashed_line_example.dart b/example/lib/sample/components/line/dashed_line_example.dart
index 08cf4ff7..ec287905 100644
--- a/example/lib/sample/components/line/dashed_line_example.dart
+++ b/example/lib/sample/components/line/dashed_line_example.dart
@@ -1,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -37,9 +35,10 @@ class _DashedLineExampleState extends State {
dashedOffset: 20,
position: BrnDashedLinePosition.leading,
contentWidget: Container(
- margin: EdgeInsets.only(left: 60, right: 20, top: 10, bottom: 10),
- child:
- Text("穿插介绍、公司模式一句话C端服务承诺介绍、价值穿插介绍、公司模式一句话C端服务承诺介绍、价值穿插介绍、公司模式一句话C端服务承诺介绍、价值"),
+ margin:
+ EdgeInsets.only(left: 60, right: 20, top: 10, bottom: 10),
+ child: Text(
+ "穿插介绍、公司模式一句话C端服务承诺介绍、价值穿插介绍、公司模式一句话C端服务承诺介绍、价值穿插介绍、公司模式一句话C端服务承诺介绍、价值"),
),
),
Text(
@@ -77,10 +76,11 @@ class _DashedLineExampleState extends State {
color: Colors.red,
child: BrnDashedLine(
axis: Axis.horizontal,
- dashedOffset: 10, contentWidget: Container(
- width: 200,
- height: 100,
- ),
+ 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 53b9aa05..f1f64c84 100644
--- a/example/lib/sample/components/loading/loading_widget_example.dart
+++ b/example/lib/sample/components/loading/loading_widget_example.dart
@@ -1,5 +1,3 @@
-
-
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 b800a595..31f4f747 100644
--- a/example/lib/sample/components/navbar/appbar_entry_page.dart
+++ b/example/lib/sample/components/navbar/appbar_entry_page.dart
@@ -1,5 +1,3 @@
-
-
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 aa7ce264..0a9dc3aa 100644
--- a/example/lib/sample/components/navbar/nav_bar_example_page.dart
+++ b/example/lib/sample/components/navbar/nav_bar_example_page.dart
@@ -38,18 +38,20 @@ class _NavBarPageState extends State with TickerProviderStateMixin {
textEditingController = TextEditingController();
valueNotifier = ValueNotifier(false);
- selectedHeiStyle =
- TextStyle(fontSize: 18, color: Color(0xFFFFFFFF), fontWeight: FontWeight.w600);
- selectedBaiStyle =
- TextStyle(fontSize: 18, color: Color(0xFF222222), fontWeight: FontWeight.w600);
+ selectedHeiStyle = TextStyle(
+ fontSize: 18, color: Color(0xFFFFFFFF), fontWeight: FontWeight.w600);
+ selectedBaiStyle = TextStyle(
+ fontSize: 18, color: Color(0xFF222222), fontWeight: FontWeight.w600);
- unSelectedHeiStyle =
- TextStyle(fontSize: 18, color: Color(0xFF999999), fontWeight: FontWeight.w600);
- unSelectedBaiStyle =
- TextStyle(fontSize: 18, color: Color(0xFF999999), fontWeight: FontWeight.w600);
+ unSelectedHeiStyle = TextStyle(
+ fontSize: 18, color: Color(0xFF999999), fontWeight: FontWeight.w600);
+ unSelectedBaiStyle = TextStyle(
+ fontSize: 18, color: Color(0xFF999999), fontWeight: FontWeight.w600);
- commonHeiStyle = TextStyle(fontSize: 18, fontWeight: FontWeight.w600, color: Colors.white);
- commonBaiStyle = TextStyle(fontSize: 18, fontWeight: FontWeight.w600, color: Color(0xFF222222));
+ commonHeiStyle = TextStyle(
+ fontSize: 18, fontWeight: FontWeight.w600, color: Colors.white);
+ commonBaiStyle = TextStyle(
+ fontSize: 18, fontWeight: FontWeight.w600, color: Color(0xFF222222));
focusNode = FocusNode();
focusNode!.addListener(() {
@@ -146,8 +148,9 @@ class _NavBarPageState extends State with TickerProviderStateMixin {
Widget? widget;
switch (this.widget.index) {
case 0:
- widget =
- Center(child: Text('1. 左上角的返回按钮图标支持自定义,本例改成了搜索图标\n2.切换类型的导航栏\n3.顶部模块切换可不限于两个,可多个'));
+ widget = Center(
+ child: Text(
+ '1. 左上角的返回按钮图标支持自定义,本例改成了搜索图标\n2.切换类型的导航栏\n3.顶部模块切换可不限于两个,可多个'));
break;
case 4:
widget = Center(child: Text('多Actions'));
@@ -306,13 +309,17 @@ class _NavBarPageState extends State with TickerProviderStateMixin {
Text(
'标题名称',
style: TextStyle(
- fontSize: 18, height: 1, fontWeight: FontWeight.w600, color: Color(0xFF222222)),
+ fontSize: 18,
+ height: 1,
+ fontWeight: FontWeight.w600,
+ color: Color(0xFF222222)),
),
Container(
height: 17,
padding: EdgeInsets.only(left: 3, right: 3),
margin: EdgeInsets.only(left: 6),
- decoration: BoxDecoration(color: Color(0xff8E8E8E).withOpacity(0.15)),
+ decoration:
+ BoxDecoration(color: Color(0xff8E8E8E).withOpacity(0.15)),
child: Center(
child: Text(
'住宅',
@@ -480,7 +487,8 @@ class _NavBarPageState extends State with TickerProviderStateMixin {
children: [
Text(
'类型1',
- style: TextStyle(color: Color(0xFF222222), height: 1, fontSize: 16),
+ style:
+ TextStyle(color: Color(0xFF222222), height: 1, fontSize: 16),
),
Padding(
padding: const EdgeInsets.only(left: 5),
@@ -561,7 +569,8 @@ class _NavBarPageState extends State with TickerProviderStateMixin {
leadClickCallback: (controller, update) {
//controller 是文本控制器,通过controller 可以拿到输入的内容 以及 对输入的内容更改
//update 是setState方法的方法命,update() 就可以刷新输入框
- BrnPopupListWindow.showPopListWindow(context, keyLeading, data: ["aaaa", "bbbbb"], offset: 20);
+ BrnPopupListWindow.showPopListWindow(context, keyLeading,
+ data: ["aaaa", "bbbbb"], offset: 20);
},
//输入框 文本内容变化的监听
searchBarInputChangeCallback: (input) {
@@ -656,7 +665,9 @@ class _NavBarPageState extends State with TickerProviderStateMixin {
child: Center(
child: Text(
'标题',
- style: index == currentIndex ? selectedHeiStyle : unSelectedHeiStyle,
+ style: index == currentIndex
+ ? selectedHeiStyle
+ : unSelectedHeiStyle,
),
),
);
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 e89ddfa9..9b8f45f7 100644
--- a/example/lib/sample/components/noticebar/brn_notice_bar_example.dart
+++ b/example/lib/sample/components/noticebar/brn_notice_bar_example.dart
@@ -144,7 +144,8 @@ class BrnNoticeBarExample extends StatelessWidget {
describe: '点击可查看样式1更多example',
describeColor: Color(0xFF0984F9),
onPressed: () {
- Navigator.of(context).push(MaterialPageRoute(builder: (context) {
+ Navigator.of(context)
+ .push(MaterialPageRoute(builder: (context) {
return BrnNoticeBarExample();
}));
},
@@ -164,7 +165,8 @@ class BrnNoticeBarExample extends StatelessWidget {
describe: '点击可查看样式2更多example',
describeColor: Color(0xFF0984F9),
onPressed: () {
- Navigator.of(context).push(MaterialPageRoute(builder: (context) {
+ Navigator.of(context)
+ .push(MaterialPageRoute(builder: (context) {
return BrnNoticeBarWithButtonExample();
}));
},
diff --git a/example/lib/sample/components/noticebar/notice_bar_example.dart b/example/lib/sample/components/noticebar/notice_bar_example.dart
index 073ac2c4..438dc52a 100644
--- a/example/lib/sample/components/noticebar/notice_bar_example.dart
+++ b/example/lib/sample/components/noticebar/notice_bar_example.dart
@@ -1,5 +1,3 @@
-
-
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 be11f666..8a3243ca 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,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -26,7 +24,8 @@ class BrnNoticeBarWithButtonExample extends StatelessWidget {
),
BrnBubbleText(
maxLines: 3,
- text: '高度56,左边为标签,中间是通知内容,右边是按钮, 其中通知内容必传,标签和按钮文案如果是空,就不显示。所有颜色均支持自定义',
+ text:
+ '高度56,左边为标签,中间是通知内容,右边是按钮, 其中通知内容必传,标签和按钮文案如果是空,就不显示。所有颜色均支持自定义',
),
Text(
'默认样式',
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 e63e6188..144f9981 100644
--- a/example/lib/sample/components/picker/cutomer_bottom_picker_example.dart
+++ b/example/lib/sample/components/picker/cutomer_bottom_picker_example.dart
@@ -1,5 +1,3 @@
-
-
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 ece9492a..151c0064 100644
--- a/example/lib/sample/components/picker/date_picker_example.dart
+++ b/example/lib/sample/components/picker/date_picker_example.dart
@@ -1,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:example/sample/home/list_item.dart';
import 'package:flutter/material.dart';
@@ -49,7 +47,8 @@ class DatePickerExamplePage extends StatelessWidget {
title: "Time Range Style",
describe: '时间范围选择器-不限制选择的时间范围',
onPressed: () {
- _showRangePickerNoLimited(context, BrnDateTimeRangePickerMode.time);
+ _showRangePickerNoLimited(
+ context, BrnDateTimeRangePickerMode.time);
},
),
ListItem(
@@ -149,7 +148,8 @@ class DatePickerExamplePage extends StatelessWidget {
});
}
- _showRangePickerNoLimited(BuildContext context, BrnDateTimeRangePickerMode mode) {
+ _showRangePickerNoLimited(
+ BuildContext context, BrnDateTimeRangePickerMode mode) {
String format;
const String MIN_DATETIME = '2020-01-01 00:00:00';
const String MAX_DATETIME = '2020-12-31 23:59:59';
@@ -170,14 +170,16 @@ class DatePickerExamplePage extends StatelessWidget {
initialEndDateTime: DateTime(2020, 06, 23, 10, 00, 00),
onConfirm: (startDateTime, endDateTime, startlist, endlist) {
BrnToast.show(
- "onConfirm: $startDateTime $endDateTime $startlist $endlist", context);
+ "onConfirm: $startDateTime $endDateTime $startlist $endlist",
+ context);
}, onClose: () {
print("onClose");
}, onCancel: () {
print("onCancel");
}, onChange: (startDateTime, endDateTime, startlist, endlist) {
BrnToast.show(
- "onChange: $startDateTime $endDateTime $startlist $endlist", context);
+ "onChange: $startDateTime $endDateTime $startlist $endlist",
+ context);
});
}
@@ -188,7 +190,8 @@ class DatePickerExamplePage extends StatelessWidget {
switch (mode) {
case BrnDateTimeRangePickerMode.date:
format = 'MM月-dd日';
- BrnPickerTitleConfig pickerTitleConfig = BrnPickerTitleConfig(titleContent: "选择时间范围");
+ BrnPickerTitleConfig pickerTitleConfig =
+ BrnPickerTitleConfig(titleContent: "选择时间范围");
BrnDateRangePicker.showDatePicker(context,
isDismissible: false,
minDateTime: DateTime.parse(MIN_DATETIME),
@@ -199,20 +202,24 @@ class DatePickerExamplePage extends StatelessWidget {
initialStartDateTime: DateTime(2021, 06, 21, 11, 00, 00),
initialEndDateTime: DateTime(2021, 06, 23, 10, 00, 00),
onConfirm: (startDateTime, endDateTime, startlist, endlist) {
- BrnToast.show("onConfirm: $startDateTime $endDateTime $startlist $endlist", context);
- }, onClose: () {
- print("onClose");
- }, onCancel: () {
- print("onCancel");
- },
- onChange: (startDateTime, endDateTime, startlist, endlist) {
- BrnToast.show("onChange: $startDateTime $endDateTime $startlist $endlist", context);
- });
+ BrnToast.show(
+ "onConfirm: $startDateTime $endDateTime $startlist $endlist",
+ context);
+ }, onClose: () {
+ print("onClose");
+ }, onCancel: () {
+ print("onCancel");
+ }, onChange: (startDateTime, endDateTime, startlist, endlist) {
+ BrnToast.show(
+ "onChange: $startDateTime $endDateTime $startlist $endlist",
+ context);
+ });
break;
case BrnDateTimeRangePickerMode.time:
format = 'HH时:mm分';
- BrnPickerTitleConfig pickerTitleConfig = BrnPickerTitleConfig(titleContent: "选择时间范围");
+ BrnPickerTitleConfig pickerTitleConfig =
+ BrnPickerTitleConfig(titleContent: "选择时间范围");
BrnDateRangePicker.showDatePicker(context,
minDateTime: DateTime.parse(MIN_DATETIME),
maxDateTime: DateTime.parse(MAX_DATETIME),
@@ -224,14 +231,16 @@ class DatePickerExamplePage extends StatelessWidget {
initialEndDateTime: DateTime(2020, 06, 23, 10, 00, 00),
onConfirm: (startDateTime, endDateTime, startlist, endlist) {
BrnToast.show(
- "onConfirm: $startDateTime $endDateTime $startlist $endlist", context);
+ "onConfirm: $startDateTime $endDateTime $startlist $endlist",
+ context);
}, onClose: () {
print("onClose");
}, onCancel: () {
print("onCancel");
}, onChange: (startDateTime, endDateTime, startlist, endlist) {
BrnToast.show(
- "onChange: $startDateTime $endDateTime $startlist $endlist", context);
+ "onChange: $startDateTime $endDateTime $startlist $endlist",
+ context);
});
break;
default:
@@ -240,8 +249,9 @@ class DatePickerExamplePage extends StatelessWidget {
}
void _showyyyyMMddRangePicker(BuildContext context) {
- String format = 'yyyy年-MM月-dd日';
- BrnPickerTitleConfig pickerTitleConfig = BrnPickerTitleConfig(titleContent: "选择时间范围");
+ String format = 'yyyy年-MM月-dd日';
+ BrnPickerTitleConfig pickerTitleConfig =
+ BrnPickerTitleConfig(titleContent: "选择时间范围");
BrnDateRangePicker.showDatePicker(context,
isDismissible: false,
minDateTime: DateTime(2010, 06, 01, 00, 00, 00),
@@ -253,15 +263,17 @@ class DatePickerExamplePage extends StatelessWidget {
initialStartDateTime: DateTime(2020, 06, 21, 11, 00, 00),
initialEndDateTime: DateTime(2020, 06, 23, 10, 00, 00),
onConfirm: (startDateTime, endDateTime, startlist, endlist) {
- BrnToast.show(
- "onConfirm: $startDateTime $endDateTime $startlist $endlist", context);
- }, onClose: () {
- print("onClose");
- }, onCancel: () {
- print("onCancel");
- }, onChange: (startDateTime, endDateTime, startlist, endlist) {
- BrnToast.show(
- "onChange: $startDateTime $endDateTime $startlist $endlist", context);
- });
+ BrnToast.show(
+ "onConfirm: $startDateTime $endDateTime $startlist $endlist",
+ context);
+ }, onClose: () {
+ print("onClose");
+ }, onCancel: () {
+ print("onCancel");
+ }, onChange: (startDateTime, endDateTime, startlist, endlist) {
+ BrnToast.show(
+ "onChange: $startDateTime $endDateTime $startlist $endlist",
+ context);
+ });
}
}
diff --git a/example/lib/sample/components/picker/multi_picker_example.dart b/example/lib/sample/components/picker/multi_picker_example.dart
index 68aa5cfa..fc9d09dd 100644
--- a/example/lib/sample/components/picker/multi_picker_example.dart
+++ b/example/lib/sample/components/picker/multi_picker_example.dart
@@ -1,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:example/sample/home/list_item.dart';
import 'package:flutter/material.dart';
@@ -99,7 +97,8 @@ class MultiPickerExamplePage extends StatelessWidget {
BrnMultiDataPicker(
context: context,
title: '来源',
- delegate: Brn2RowDelegate(firstSelectedIndex: 1, secondSelectedIndex: 0),
+ delegate: Brn2RowDelegate(
+ firstSelectedIndex: 1, secondSelectedIndex: 0),
confirmClick: (list) {
BrnToast.show(list.toString(), context);
},
@@ -114,7 +113,8 @@ class MultiPickerExamplePage extends StatelessWidget {
sync: false,
context: context,
title: '来源',
- delegate: Brn2RowCustomDelegate(firstSelectedIndex: 1, secondSelectedIndex: 0),
+ delegate: Brn2RowCustomDelegate(
+ firstSelectedIndex: 1, secondSelectedIndex: 0),
confirmClick: (list) {
BrnToast.show(list.toString(), context);
},
@@ -129,7 +129,9 @@ class MultiPickerExamplePage extends StatelessWidget {
context: context,
title: '来源',
delegate: Brn3RowDelegate(
- firstSelectedIndex: 1, secondSelectedIndex: 0, thirdSelectedIndex: 0),
+ firstSelectedIndex: 1,
+ secondSelectedIndex: 0,
+ thirdSelectedIndex: 0),
confirmClick: (list) {
BrnToast.show(list.toString(), context);
},
@@ -361,7 +363,8 @@ class Brn2RowCustomDelegate implements BrnMultiDataPickerDelegate {
int firstSelectedIndex = 0;
int secondSelectedIndex = 0;
- Brn2RowCustomDelegate({this.firstSelectedIndex = 0, this.secondSelectedIndex = 0});
+ Brn2RowCustomDelegate(
+ {this.firstSelectedIndex = 0, this.secondSelectedIndex = 0});
@override
int numberOfComponent() {
diff --git a/example/lib/sample/components/picker/picker_entry_page.dart b/example/lib/sample/components/picker/picker_entry_page.dart
index 42e2fb84..f0b2414b 100644
--- a/example/lib/sample/components/picker/picker_entry_page.dart
+++ b/example/lib/sample/components/picker/picker_entry_page.dart
@@ -1,5 +1,3 @@
-
-
import 'dart:convert';
import 'package:bruno/bruno.dart';
@@ -82,10 +80,11 @@ class PickerEntryPage extends StatelessWidget {
describe: "底部级联选择框",
onPressed: () {
rootBundle.loadString('assets/list_picker.json').then((data) {
- List _selectionData = []
- ..addAll((JsonDecoder().convert(data)["data"]['list'] as List? ?? [])
- .map((o) => BrnPickerEntity.fromMap(o)));
- if ( _selectionData.length > 0) {
+ List _selectionData = []..addAll(
+ (JsonDecoder().convert(data)["data"]['list'] as List? ??
+ [])
+ .map((o) => BrnPickerEntity.fromMap(o)));
+ if (_selectionData.length > 0) {
_selectionData.forEach((f) => f.configChild());
if (dataList.length == 0) {
dataList.addAll(_selectionData);
@@ -100,9 +99,10 @@ class PickerEntryPage extends StatelessWidget {
describe: "底部级联选择框(Title 动态改变)",
onPressed: () {
rootBundle.loadString('assets/list_picker.json').then((data) {
- List _selectionData = []
- ..addAll((JsonDecoder().convert(data)["data"]['list'] as List? ?? [])
- .map((o) => BrnPickerEntity.fromMap(o)));
+ List _selectionData = []..addAll(
+ (JsonDecoder().convert(data)["data"]['list'] as List? ??
+ [])
+ .map((o) => BrnPickerEntity.fromMap(o)));
if (_selectionData.length > 0) {
_selectionData.forEach((f) => f.configChild());
if (dataList.length == 0) {
@@ -134,8 +134,10 @@ class PickerEntryPage extends StatelessWidget {
List items = [];
items.add(new BrnMultiSelectBottomPickerItem("100", "这里是标题1"));
items.add(new BrnMultiSelectBottomPickerItem("101", "这里是标题2"));
- items.add(new BrnMultiSelectBottomPickerItem("102", "这里是标题3", isChecked: true));
- items.add(new BrnMultiSelectBottomPickerItem("103", "这里是标题4", isChecked: true));
+ items.add(
+ new BrnMultiSelectBottomPickerItem("102", "这里是标题3", isChecked: true));
+ items.add(
+ new BrnMultiSelectBottomPickerItem("103", "这里是标题4", isChecked: true));
items.add(new BrnMultiSelectBottomPickerItem("104", "这里是标题5"));
items.add(new BrnMultiSelectBottomPickerItem("104", "这里是标题6"));
BrnMultiSelectListPicker.show(
@@ -158,8 +160,10 @@ class PickerEntryPage extends StatelessWidget {
List items = [];
items.add(new BrnMultiSelectBottomPickerItem("100", "这里是标题1"));
items.add(new BrnMultiSelectBottomPickerItem("101", "这里是标题2"));
- items.add(new BrnMultiSelectBottomPickerItem("102", "这里是标题3", isChecked: true));
- items.add(new BrnMultiSelectBottomPickerItem("103", "这里是标题4", isChecked: true));
+ items.add(
+ new BrnMultiSelectBottomPickerItem("102", "这里是标题3", isChecked: true));
+ items.add(
+ new BrnMultiSelectBottomPickerItem("103", "这里是标题4", isChecked: true));
items.add(new BrnMultiSelectBottomPickerItem("104", "这里是标题5"));
items.add(new BrnMultiSelectBottomPickerItem("104", "这里是标题6"));
showModalBottomSheet(
@@ -214,7 +218,8 @@ class PickerEntryPage extends StatelessWidget {
);
}
- void _showRangePicker(BuildContext context, List _selectionData) {
+ void _showRangePicker(
+ BuildContext context, List _selectionData) {
_selectionData.forEach((f) => f.configChild());
var selectionMenuView = BrnMultiColumnPicker(
entity: _selectionData[3],
@@ -244,7 +249,8 @@ class PickerEntryPage extends StatelessWidget {
);
}
- void _showRangePicker1(BuildContext context, List _selectionData) {
+ void _showRangePicker1(
+ BuildContext context, List _selectionData) {
_selectionData.forEach((f) => f.configChild());
String titleName = "测试标题";
showModalBottomSheet(
@@ -255,8 +261,8 @@ class PickerEntryPage extends StatelessWidget {
pickerTitleConfig: BrnPickerTitleConfig(titleContent: titleName),
entity: _selectionData[3],
defaultFocusedIndexes: [0, -1, -1],
- onConfirm: (Map> result, int? firstIndex,
- int? secondIndex, int? thirdIndex) {
+ onConfirm: (Map> result,
+ int? firstIndex, int? secondIndex, int? thirdIndex) {
List pickResult = [];
result.forEach((key, val) {
List tmp = [];
@@ -353,7 +359,8 @@ class PickerEntryPage extends StatelessWidget {
List items = [];
for (int i = 0; i < tags.length; i++) {
String it = tags[i];
- BrnTagInputItemBean item = BrnTagInputItemBean(name: it, index: i, needExpend: (i % 2 == 0));
+ BrnTagInputItemBean item =
+ BrnTagInputItemBean(name: it, index: i, needExpend: (i % 2 == 0));
items.add(item);
}
diff --git a/example/lib/sample/components/popup/overlay_window_example.dart b/example/lib/sample/components/popup/overlay_window_example.dart
index 13f7c8fd..6ff8abab 100644
--- a/example/lib/sample/components/popup/overlay_window_example.dart
+++ b/example/lib/sample/components/popup/overlay_window_example.dart
@@ -1,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -48,8 +46,10 @@ class OverlayWindowExamplePageState extends State {
innerColor: Colors.white,
hintText: "请输入小区名称",
borderRadius: BorderRadius.all(Radius.circular(10)),
- normalBorder: Border.all(color: Color(0xFF999999), width: 1, style: BorderStyle.solid),
- activeBorder: Border.all(color: Color(0xFF0984F9), width: 1, style: BorderStyle.solid),
+ normalBorder: Border.all(
+ color: Color(0xFF999999), width: 1, style: BorderStyle.solid),
+ activeBorder: Border.all(
+ color: Color(0xFF0984F9), width: 1, style: BorderStyle.solid),
focusNode: _focusNode,
onTextClear: () {
_focusNode.unfocus();
@@ -68,8 +68,10 @@ class OverlayWindowExamplePageState extends State {
_overlayController?.removeOverlay();
return;
}
- if (_overlayController == null || _overlayController!.isOverlayShowing == false) {
- _overlayController = BrnOverlayWindow.showOverlayWindow(context, _searchBarKey,
+ if (_overlayController == null ||
+ _overlayController!.isOverlayShowing == false) {
+ _overlayController = BrnOverlayWindow.showOverlayWindow(
+ context, _searchBarKey,
content: _sugListView(),
autoDismissOnTouchOutSide: true,
popDirection: BrnOverlayPopDirection.bottom);
diff --git a/example/lib/sample/components/popup/popwindow_example.dart b/example/lib/sample/components/popup/popwindow_example.dart
index 47dbbcf9..26db9315 100644
--- a/example/lib/sample/components/popup/popwindow_example.dart
+++ b/example/lib/sample/components/popup/popwindow_example.dart
@@ -1,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -63,7 +61,8 @@ class PopWindowExamplePageState extends State {
child: ElevatedButton(
key: _leftKey1,
onPressed: () {
- BrnPopupWindow.showPopWindow(context, "提示内容提示内容提示内容提示内容提示内容提示内容提示内容提示内容", _leftKey1!,
+ BrnPopupWindow.showPopWindow(
+ context, "提示内容提示内容提示内容提示内容提示内容提示内容提示内容提示内容", _leftKey1!,
hasCloseIcon: false);
},
child: Text("左侧带无关闭Tips"),
@@ -74,8 +73,10 @@ class PopWindowExamplePageState extends State {
child: ElevatedButton(
key: _leftKey2,
onPressed: () {
- BrnPopupWindow.showPopWindow(context, "提示内容提示内容提示内容提示内容提示内容提示内容提示内容提示内容提示内容", _leftKey2!,
- popDirection: BrnPopupDirection.top, hasCloseIcon: true);
+ BrnPopupWindow.showPopWindow(context,
+ "提示内容提示内容提示内容提示内容提示内容提示内容提示内容提示内容提示内容", _leftKey2!,
+ popDirection: BrnPopupDirection.top,
+ hasCloseIcon: true);
},
child: Text("左侧带关闭,箭头朝下Tips"),
),
@@ -85,8 +86,10 @@ class PopWindowExamplePageState extends State {
child: ElevatedButton(
key: _leftKey3,
onPressed: () {
- BrnPopupWindow.showPopWindow(context, "提示内容提示内容提示内容提示内容提示内容提示内容提示内容提示内容", _leftKey3!,
- dismissCallback: () {}, popDirection: BrnPopupDirection.top);
+ BrnPopupWindow.showPopWindow(
+ context, "提示内容提示内容提示内容提示内容提示内容提示内容提示内容提示内容", _leftKey3!,
+ dismissCallback: () {},
+ popDirection: BrnPopupDirection.top);
},
child: Text("左侧无关闭,箭头朝下Tips"),
),
@@ -96,7 +99,8 @@ class PopWindowExamplePageState extends State {
child: ElevatedButton(
key: _leftKey4,
onPressed: () {
- BrnPopupWindow.showPopWindow(context, "提示内容提示内容提示内容提示内容提示内容提示内容提示内容提示内容", _leftKey4!,
+ BrnPopupWindow.showPopWindow(
+ context, "提示内容提示内容提示内容提示内容提示内容提示内容提示内容提示内容", _leftKey4!,
hasCloseIcon: true,
dismissCallback: () {},
popDirection: BrnPopupDirection.bottom);
@@ -109,7 +113,8 @@ class PopWindowExamplePageState extends State {
child: ElevatedButton(
key: _leftKey5,
onPressed: () {
- BrnPopupWindow.showPopWindow(context, "提示内容提示内容提示内容提示内容", _leftKey5!,
+ BrnPopupWindow.showPopWindow(
+ context, "提示内容提示内容提示内容提示内容", _leftKey5!,
hasCloseIcon: false,
dismissCallback: () {},
popDirection: BrnPopupDirection.bottom);
@@ -122,7 +127,8 @@ class PopWindowExamplePageState extends State {
child: ElevatedButton(
key: _leftKey6,
onPressed: () {
- BrnPopupWindow.showPopWindow(context, "提示内容提示内容提示内容提示内容提示内容提示内容", _leftKey6!,
+ BrnPopupWindow.showPopWindow(
+ context, "提示内容提示内容提示内容提示内容提示内容提示内容", _leftKey6!,
hasCloseIcon: true,
canWrap: false,
dismissCallback: () {},
@@ -136,7 +142,8 @@ class PopWindowExamplePageState extends State {
child: ElevatedButton(
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 61acdb71..87c763b7 100644
--- a/example/lib/sample/components/rating/rating_example.dart
+++ b/example/lib/sample/components/rating/rating_example.dart
@@ -1,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -74,12 +72,14 @@ class _RatingExampleState extends State {
Widget _buildRating(RatingState state) {
switch (state) {
case RatingState.select:
- return BrunoTools.getAssetSizeImage(BrnAsset.iconStar, 16, 16, color: Color(0xFF3571DC));
+ return BrunoTools.getAssetSizeImage(BrnAsset.iconStar, 16, 16,
+ color: Color(0xFF3571DC));
case RatingState.half:
return BrunoTools.getAssetSizeImage(BrnAsset.iconStarHalf, 16, 16);
case RatingState.unselect:
default:
- return BrunoTools.getAssetSizeImage(BrnAsset.iconStar, 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 ffba733b..85ede17d 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,5 +1,3 @@
-
-
import 'dart:math';
import 'package:bruno/bruno.dart';
@@ -23,9 +21,7 @@ class ScrollActorTabExample extends StatelessWidget {
);
},
tabIndexedBuilder: (context, index) {
- return BadgeTab(
- text: 'index $index'
- );
+ return BadgeTab(text: 'index $index');
},
),
);
diff --git a/example/lib/sample/components/selectcity/selected_city_example.dart b/example/lib/sample/components/selectcity/selected_city_example.dart
index 0f6fdfb6..62d9bf9d 100644
--- a/example/lib/sample/components/selectcity/selected_city_example.dart
+++ b/example/lib/sample/components/selectcity/selected_city_example.dart
@@ -1,5 +1,3 @@
-
-
import 'dart:convert';
import 'package:bruno/bruno.dart';
@@ -134,7 +132,8 @@ class _CitySelectRouteState extends State {
flex: 1,
child: AzListView(
data: _cityList,
- itemBuilder: (context, model) => _buildListItem(model as BrnSelectCityModel),
+ 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 50d19dfb..4dd9b1d7 100644
--- a/example/lib/sample/components/selection/filter_entity.dart
+++ b/example/lib/sample/components/selection/filter_entity.dart
@@ -1,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
class BrnFilterEntity {
@@ -12,6 +10,7 @@ class BrnFilterEntity {
key = map['key'] ?? '';
name = map['title'] ?? '';
defaultValue = map['defaultValue'] ?? '';
- children = []..addAll((map['children'] as List? ?? []).map((o) => ItemEntity.fromJson(o)));
+ 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 26b27bfd..a7ed89d6 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,5 +1,3 @@
-
-
import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
@@ -10,10 +8,12 @@ class NewSelectionViewExamplePage23 extends StatefulWidget {
NewSelectionViewExamplePage23(this._title, this._filterData);
@override
- _SelectionViewExamplePageState createState() => _SelectionViewExamplePageState();
+ _SelectionViewExamplePageState createState() =>
+ _SelectionViewExamplePageState();
}
-class _SelectionViewExamplePageState extends State