Commit 8e12166e931352e8eab9e4e8d08d7757df6dc323

Authored by wdn127929
1 parent f95f9874

ff

1 import 'package:flutter/material.dart'; 1 import 'package:flutter/material.dart';
2 import 'package:flutter_screenutil/screenutil.dart'; 2 import 'package:flutter_screenutil/screenutil.dart';
3 import 'package:one_key/models/user_history_entity.dart'; 3 import 'package:one_key/models/user_history_entity.dart';
4 -import 'package:one_key/provider/customer_provider.dart'; 4 +import 'package:one_key/provider/contant_show_model.dart';
5 import 'package:one_key/res/colors.dart'; 5 import 'package:one_key/res/colors.dart';
6 import 'package:one_key/utils/utils.dart'; 6 import 'package:one_key/utils/utils.dart';
7 import 'package:one_key/widgets/MyDivider.dart'; 7 import 'package:one_key/widgets/MyDivider.dart';
@@ -9,7 +9,7 @@ import 'package:one_key/widgets/v_empty_view.dart'; @@ -9,7 +9,7 @@ import 'package:one_key/widgets/v_empty_view.dart';
9 9
10 class ContantItemPage extends StatefulWidget { 10 class ContantItemPage extends StatefulWidget {
11 final int index; 11 final int index;
12 - final CustomerProvider model; 12 + final ContantShowModel model;
13 final GestureTapCallback onTap; 13 final GestureTapCallback onTap;
14 final List<UserHistoryEntity> data; 14 final List<UserHistoryEntity> data;
15 ContantItemPage({Key key, this.index, this.model, this.onTap, this.data}) 15 ContantItemPage({Key key, this.index, this.model, this.onTap, this.data})
@@ -193,13 +193,13 @@ class _ContantItemPageState extends State<ContantItemPage> { @@ -193,13 +193,13 @@ class _ContantItemPageState extends State<ContantItemPage> {
193 return InkWell( 193 return InkWell(
194 onTap: widget.onTap, 194 onTap: widget.onTap,
195 child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ 195 child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
196 - // widget.index == 0  
197 - // ? MyDivider(  
198 - // double.infinity,  
199 - // ScreenUtil().setWidth(20),  
200 - // color: MyColours.color_f5f5f5,  
201 - // )  
202 - // : SizedBox(), 196 + widget.index == 0
  197 + ? MyDivider(
  198 + double.infinity,
  199 + ScreenUtil().setWidth(20),
  200 + color: MyColours.color_f5f5f5,
  201 + )
  202 + : Container(),
203 Container( 203 Container(
204 width: double.infinity, 204 width: double.infinity,
205 padding: EdgeInsets.symmetric( 205 padding: EdgeInsets.symmetric(
  1 +// import 'package:flutter/material.dart';
  2 +// import 'package:flutter_screenutil/screenutil.dart';
  3 +// import 'package:one_key/models/user_history_entity.dart';
  4 +// import 'package:one_key/provider/customer_provider.dart';
  5 +// import 'package:one_key/res/colors.dart';
  6 +// import 'package:one_key/utils/utils.dart';
  7 +// import 'package:one_key/widgets/MyDivider.dart';
  8 +// import 'package:one_key/widgets/v_empty_view.dart';
  9 +
  10 +// class ContantItemPage extends StatefulWidget {
  11 +// final int index;
  12 +// final CustomerProvider model;
  13 +// final GestureTapCallback onTap;
  14 +// final List<UserHistoryEntity> data;
  15 +// ContantItemPage({Key key, this.index, this.model, this.onTap, this.data})
  16 +// : super(key: key);
  17 +
  18 +// @override
  19 +// _ContantItemPageState createState() => _ContantItemPageState();
  20 +// }
  21 +
  22 +// class _ContantItemPageState extends State<ContantItemPage> {
  23 +// _getWidget(String title, String key, {fontSize = 32}) {
  24 +// return RichText(
  25 +// text: TextSpan(
  26 +// children: getTextSpanList(title,
  27 +// searchContent: key, fontSize: fontSize)));
  28 +// }
  29 +
  30 +// ///关键字在前面布局
  31 +// _startPlaceWidget(
  32 +// String title, String key, UserHistoryEntity userHistoryEntity,
  33 +// {fontSize = 32}) {
  34 +// String keyTemp = '';
  35 +// if (Utils.isChinese(key)) {
  36 +// keyTemp = key;
  37 +// } else {
  38 +// String name =
  39 +// userHistoryEntity.rname == null || userHistoryEntity.rname == ''
  40 +// ? ''
  41 +// : userHistoryEntity.rname;
  42 +// String pinyinFirst = userHistoryEntity.pinyinFirst;
  43 +// List<String> pinyinList = userHistoryEntity.pinyinList;
  44 +// String pinyin = userHistoryEntity.pinyin;
  45 +// // if (pinyinList.indexOf(key) != -1) {
  46 +// // //全拼音检索一个字
  47 +// // keyTemp = name.substring(
  48 +// // pinyinList.indexOf(key), pinyinList.indexOf(key) + 1);
  49 +// // } else
  50 +// if (pinyinFirst.contains(key)) {
  51 +// keyTemp = name.substring(
  52 +// pinyinFirst.indexOf(key), pinyinFirst.indexOf(key) + key.length);
  53 +// } else if (pinyin.indexOf(key) != -1) {
  54 +// if (pinyinList.indexOf(key) != -1) {
  55 +// //全拼音检索 lilao
  56 +// keyTemp = name.substring(0, pinyinList.indexOf(key) + 1);
  57 +// } else if (pinyinFirst.contains(key)) {
  58 +// keyTemp = name.substring(
  59 +// pinyinFirst.indexOf(key), pinyinFirst.indexOf(key) + key.length);
  60 +// }
  61 +// }
  62 +
  63 +// print(keyTemp);
  64 +// }
  65 +// return _getWidget(title, keyTemp, fontSize: fontSize);
  66 +// }
  67 +
  68 +// List<TextSpan> getTextSpanList(String textContent,
  69 +// {String searchContent = '',
  70 +// String frontContent = '',
  71 +// int fontSize = 32,
  72 +// Color fontColor = MyColours.color_333333,
  73 +// Color selectFontColor = MyColours.color_199095}) {
  74 +// List<TextSpan> textSpanList = [];
  75 +
  76 +// if (frontContent.isEmpty == false) {
  77 +// textSpanList.add(TextSpan(
  78 +// text: frontContent,
  79 +// style: TextStyle(
  80 +// fontSize: ScreenUtil().setSp(fontSize), color: fontColor)));
  81 +// }
  82 +
  83 +// ///搜索内容不为空并且 显示内容中存在与搜索内容相同的文字
  84 +// if (searchContent != null &&
  85 +// searchContent.isEmpty == false &&
  86 +// textContent.contains(searchContent)) {
  87 +// List<Map> _strMapList = [];
  88 +// bool _isContains = true;
  89 +// while (_isContains) {
  90 +// int startIndex = textContent.indexOf(searchContent);
  91 +// String showStr = textContent.substring(
  92 +// startIndex, startIndex + searchContent.length);
  93 +// Map _strMap;
  94 +// if (startIndex > 0) {
  95 +// String normalStr = textContent.substring(0, startIndex);
  96 +// _strMap = Map();
  97 +// _strMap['content'] = normalStr;
  98 +// _strMap['isHighlight'] = false;
  99 +// _strMapList.add(_strMap);
  100 +// }
  101 +// _strMap = Map();
  102 +// _strMap['content'] = showStr;
  103 +// _strMap['isHighlight'] = true;
  104 +// _strMapList.add(_strMap);
  105 +// textContent = textContent.substring(
  106 +// startIndex + searchContent.length, textContent.length);
  107 +
  108 +// _isContains = textContent.contains(searchContent);
  109 +// if (!_isContains && textContent != '') {
  110 +// _strMap = Map();
  111 +// _strMap['content'] = textContent;
  112 +// _strMap['isHighlight'] = false;
  113 +// _strMapList.add(_strMap);
  114 +// }
  115 +// }
  116 +// _strMapList.forEach((map) {
  117 +// textSpanList.add(TextSpan(
  118 +// text: map['content'],
  119 +// style: TextStyle(
  120 +// fontSize: ScreenUtil().setSp(fontSize),
  121 +// color: map['isHighlight'] ? selectFontColor : fontColor)));
  122 +// });
  123 +// } else {
  124 +// ///正常显示所有文字
  125 +// textSpanList.add(TextSpan(
  126 +// text: textContent,
  127 +// style:
  128 +// TextStyle(fontSize: ScreenUtil().setSp(fontSize), color: fontColor),
  129 +// ));
  130 +// }
  131 +// return textSpanList;
  132 +// }
  133 +
  134 +// ///姓名widget
  135 +// Widget _getNameWidget(UserHistoryEntity userHistoryEntity) {
  136 +// String name =
  137 +// userHistoryEntity.rname == null || userHistoryEntity.rname == ''
  138 +// ? ''
  139 +// : userHistoryEntity.rname;
  140 +
  141 +// String key = widget.model.controller.text;
  142 +// String pinyinFirst = userHistoryEntity.pinyinFirst;
  143 +// List<String> pinyinList = userHistoryEntity.pinyinList;
  144 +// if (key == '') {
  145 +// return Text(name,
  146 +// style: TextStyle(
  147 +// color: MyColours.color_333333, fontSize: ScreenUtil().setSp(32)));
  148 +// } else {
  149 +// return (name.contains(key) && name.length != key.length) ||
  150 +// (pinyinFirst.contains(key) && pinyinFirst.length != key.length) ||
  151 +// (pinyinList.contains(key) && pinyinList.length != key.length)
  152 +// ? _startPlaceWidget(name, key, userHistoryEntity)
  153 +// : Text(name,
  154 +// style: TextStyle(
  155 +// color: ((name.contains(key) && name.length == key.length) ||
  156 +// (pinyinFirst.contains(key) &&
  157 +// pinyinFirst.length == key.length) ||
  158 +// (pinyinList.contains(key) &&
  159 +// pinyinList.length == key.length))
  160 +// ? MyColours.color_199095
  161 +// : MyColours.color_333333,
  162 +// fontSize: ScreenUtil().setSp(32)));
  163 +// }
  164 +// }
  165 +
  166 +// ///电话widget
  167 +// Widget _getPhoneWidget(UserHistoryEntity userHistoryEntity) {
  168 +// String phone =
  169 +// userHistoryEntity.phone == null || userHistoryEntity.phone == ''
  170 +// ? ''
  171 +// : userHistoryEntity.phone;
  172 +
  173 +// String key = widget.model.controller.text;
  174 +
  175 +// if (key == '') {
  176 +// return Text(phone,
  177 +// style: TextStyle(
  178 +// color: MyColours.color_333333, fontSize: ScreenUtil().setSp(32)));
  179 +// } else {
  180 +// return (phone.contains(key) && phone.length != key.length)
  181 +// ? _getWidget(phone, key, fontSize: 30)
  182 +// : Text(phone,
  183 +// style: TextStyle(
  184 +// color: phone.contains(key) && phone.length == key.length
  185 +// ? MyColours.color_199095
  186 +// : MyColours.color_333333,
  187 +// fontSize: ScreenUtil().setSp(30)));
  188 +// }
  189 +// }
  190 +
  191 +// @override
  192 +// Widget build(BuildContext context) {
  193 +// return InkWell(
  194 +// onTap: widget.onTap,
  195 +// child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
  196 +// // widget.index == 0
  197 +// // ? MyDivider(
  198 +// // double.infinity,
  199 +// // ScreenUtil().setWidth(20),
  200 +// // color: MyColours.color_f5f5f5,
  201 +// // )
  202 +// // : SizedBox(),
  203 +// Container(
  204 +// width: double.infinity,
  205 +// padding: EdgeInsets.symmetric(
  206 +// horizontal: ScreenUtil().setWidth(40),
  207 +// vertical: ScreenUtil().setWidth(30)),
  208 +// // height: ScreenUtil().setWidth(76 * 2),
  209 +// decoration: BoxDecoration(
  210 +// border: Border(
  211 +// top: widget.index == 0
  212 +// ? BorderSide(
  213 +// width: ScreenUtil().setWidth(2),
  214 +// color: MyColours.color_E0E0E0)
  215 +// : BorderSide(width: 0, color: Colors.transparent),
  216 +// bottom: BorderSide(
  217 +// width: ScreenUtil().setWidth(2),
  218 +// color: MyColours.color_E0E0E0))),
  219 +// child: Column(
  220 +// crossAxisAlignment: CrossAxisAlignment.start,
  221 +// children: [
  222 +// _getNameWidget(widget.data[widget.index]),
  223 +// VEmptyView(10),
  224 +// _getPhoneWidget(widget.data[widget.index])
  225 +// ],
  226 +// ),
  227 +// )
  228 +// ]));
  229 +// }
  230 +// }
1 -// import 'package:flutter/material.dart';  
2 -// import 'package:flutter_easyrefresh/easy_refresh.dart'; 1 +import 'package:flutter/material.dart';
  2 +import 'package:flutter_easyrefresh/easy_refresh.dart';
3 3
4 -// import 'package:one_key/constant/state.dart'; 4 +import 'package:one_key/constant/state.dart';
5 5
6 -// import 'package:one_key/pages/my/contant_item_page.dart';  
7 -// import 'package:one_key/provider/contant_show_model.dart';  
8 -// import 'package:one_key/provider/user_model.dart';  
9 -// import 'package:one_key/utils/dialog_util.dart'; 6 +import 'package:one_key/pages/my/contant_item_page.dart';
  7 +import 'package:one_key/provider/contant_show_model.dart';
  8 +import 'package:one_key/provider/user_model.dart';
  9 +import 'package:one_key/utils/dialog_util.dart';
10 10
11 -// import 'package:one_key/widgets/page_exception.dart'; 11 +import 'package:one_key/widgets/page_exception.dart';
12 12
13 -// import 'package:provider/provider.dart'; 13 +import 'package:provider/provider.dart';
14 14
15 -// class ContantLeftPage extends StatefulWidget {  
16 -// ContantLeftPage({Key key}) : super(key: key); 15 +class ContantLeftPage extends StatefulWidget {
  16 + ContantLeftPage({Key key}) : super(key: key);
17 17
18 -// @override  
19 -// _ContantLeftPageState createState() => _ContantLeftPageState();  
20 -// } 18 + @override
  19 + _ContantLeftPageState createState() => _ContantLeftPageState();
  20 +}
21 21
22 -// class _ContantLeftPageState extends State<ContantLeftPage> {  
23 -// EasyRefreshController _controller;  
24 -// ContantShowModel contantShowModel; 22 +class _ContantLeftPageState extends State<ContantLeftPage> {
  23 + EasyRefreshController _controller;
  24 + ContantShowModel contantShowModel;
25 25
26 -// @override  
27 -// void initState() {  
28 -// super.initState();  
29 -// _controller = EasyRefreshController(); 26 + @override
  27 + void initState() {
  28 + super.initState();
  29 + _controller = EasyRefreshController();
30 30
31 -// WidgetsBinding.instance.addPostFrameCallback((_) {  
32 -// _getContantData();  
33 -// });  
34 -// } 31 + WidgetsBinding.instance.addPostFrameCallback((_) {
  32 + _getContantData();
  33 + });
  34 + }
35 35
36 -// _getContantData() async {  
37 -// Map<String, String> params = {  
38 -// "sid": Provider.of<UserModel>(context, listen: false).user.sellerid,  
39 -// };  
40 -// await contantShowModel.getUserHistorys(context, params);  
41 -// await contantShowModel.searchData(contantShowModel.controller.text);  
42 -// } 36 + _getContantData() async {
  37 + Map<String, String> params = {
  38 + "sid": Provider.of<UserModel>(context, listen: false).user.sellerid,
  39 + };
  40 + await contantShowModel.getUserHistorys(context, params);
  41 + await contantShowModel.searchData(contantShowModel.controller.text);
  42 + }
43 43
44 -// @override  
45 -// Widget build(BuildContext context) {  
46 -// contantShowModel = Provider.of<ContantShowModel>(context, listen: true);  
47 -// return Consumer<ContantShowModel>(  
48 -// builder: (context, model, _) {  
49 -// if (model.pageStateLeft != PageState.Success) {  
50 -// return ExceptionPage(  
51 -// pageState: model.pageStateLeft,  
52 -// callback: () {  
53 -// model.pageStateLeft = PageState.Loading;  
54 -// model.notifyListeners();  
55 -// _getContantData();  
56 -// },  
57 -// emptyMsg: "暂时没有联系人哦",  
58 -// emptyImg: "empty_search",  
59 -// showMsg: "加载中,请稍后...",  
60 -// );  
61 -// } else {  
62 -// return ListView.builder(  
63 -// itemCount: model.userHistorysShow.length,  
64 -// itemBuilder: (BuildContext context, int index) {  
65 -// String phone = model.userHistorysShow[index].phone == null ||  
66 -// model.userHistorysShow[index].phone == ''  
67 -// ? ''  
68 -// : model.userHistorysShow[index].phone;  
69 -// return ContantItemPage(  
70 -// onTap: () {  
71 -// if (model.userHistorysShow[index].phone != null &&  
72 -// model.userHistorysShow[index].phone != '') {  
73 -// DialogUtil.goPhone(model.userHistorysShow[index].phone);  
74 -// }  
75 -// },  
76 -// index: index,  
77 -// model: contantShowModel,  
78 -// data: model.userHistorysShow,  
79 -// );  
80 -// });  
81 -// }  
82 -// },  
83 -// );  
84 -// }  
85 -// } 44 + @override
  45 + Widget build(BuildContext context) {
  46 + contantShowModel = Provider.of<ContantShowModel>(context, listen: true);
  47 + return Consumer<ContantShowModel>(
  48 + builder: (context, model, _) {
  49 + if (model.pageStateLeft != PageState.Success) {
  50 + return ExceptionPage(
  51 + pageState: model.pageStateLeft,
  52 + callback: () {
  53 + model.pageStateLeft = PageState.Loading;
  54 + model.notifyListeners();
  55 + _getContantData();
  56 + },
  57 + emptyMsg: "暂时没有联系人哦",
  58 + emptyImg: "empty_search",
  59 + showMsg: "加载中,请稍后...",
  60 + );
  61 + } else {
  62 + return ListView.builder(
  63 + itemCount: model.userHistorysShow.length,
  64 + itemBuilder: (BuildContext context, int index) {
  65 + String phone = model.userHistorysShow[index].phone == null ||
  66 + model.userHistorysShow[index].phone == ''
  67 + ? ''
  68 + : model.userHistorysShow[index].phone;
  69 + return ContantItemPage(
  70 + onTap: () {
  71 + if (model.userHistorysShow[index].phone != null &&
  72 + model.userHistorysShow[index].phone != '') {
  73 + DialogUtil.goPhone(model.userHistorysShow[index].phone);
  74 + }
  75 + },
  76 + index: index,
  77 + model: contantShowModel,
  78 + data: model.userHistorysShow,
  79 + );
  80 + });
  81 + }
  82 + },
  83 + );
  84 + }
  85 +}
1 -// import 'package:flutter/material.dart'; 1 +import 'package:flutter/material.dart';
2 2
3 -// import 'package:contacts_service/contacts_service.dart';  
4 -// import 'package:flutter_screenutil/screenutil.dart'; 3 +import 'package:contacts_service/contacts_service.dart';
  4 +import 'package:flutter_screenutil/screenutil.dart';
5 5
6 -// import 'package:one_key/pages/my/contant_left_page.dart';  
7 -// import 'package:one_key/pages/my/contant_right_page.dart';  
8 -// import 'package:one_key/provider/contant_show_model.dart';  
9 -// import 'package:one_key/res/colors.dart';  
10 -// import 'package:one_key/utils/event_bus.dart';  
11 -// import 'package:one_key/utils/utils.dart'; 6 +import 'package:one_key/pages/my/contant_left_page.dart';
  7 +import 'package:one_key/pages/my/contant_right_page.dart';
  8 +import 'package:one_key/provider/contant_show_model.dart';
  9 +import 'package:one_key/res/colors.dart';
  10 +import 'package:one_key/utils/event_bus.dart';
  11 +import 'package:one_key/utils/utils.dart';
12 12
13 -// import 'package:one_key/widgets/custom_tab_indicator.dart';  
14 -// import 'package:one_key/widgets/system_app_bar.dart'; 13 +import 'package:one_key/widgets/custom_tab_indicator.dart';
  14 +import 'package:one_key/widgets/system_app_bar.dart';
15 15
16 -// import 'package:provider/provider.dart'; 16 +import 'package:provider/provider.dart';
17 17
18 -// class ContactListPage extends StatefulWidget {  
19 -// @override  
20 -// _ContactListPageState createState() => _ContactListPageState();  
21 -// } 18 +class ContactListPage extends StatefulWidget {
  19 + @override
  20 + _ContactListPageState createState() => _ContactListPageState();
  21 +}
22 22
23 -// class _ContactListPageState extends State<ContactListPage>  
24 -// with TickerProviderStateMixin {  
25 -// List<Contact> _contacts;  
26 -// List _tabBarTitle;  
27 -// TabController tabController; 23 +class _ContactListPageState extends State<ContactListPage>
  24 + with TickerProviderStateMixin {
  25 + List<Contact> _contacts;
  26 + List _tabBarTitle;
  27 + TabController tabController;
28 28
29 -// ContantShowModel contantShowModel;  
30 -// @override  
31 -// void initState() {  
32 -// _tabBarTitle = ['预订联系人', '手机联系人'];  
33 -// super.initState();  
34 -// tabController = TabController(length: 2, vsync: this);  
35 -// } 29 + ContantShowModel contantShowModel;
  30 + @override
  31 + void initState() {
  32 + _tabBarTitle = ['预订联系人', '手机联系人'];
  33 + super.initState();
  34 + tabController = TabController(length: 2, vsync: this);
  35 + }
36 36
37 -// @override  
38 -// Widget build(BuildContext context) {  
39 -// contantShowModel = Provider.of<ContantShowModel>(context, listen: true);  
40 -// return Material(  
41 -// child: InkWell(  
42 -// onTap: () {  
43 -// // FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘  
44 -// },  
45 -// child: Scaffold(  
46 -// resizeToAvoidBottomInset: false,  
47 -// backgroundColor: MyColours.color_ffffff,  
48 -// appBar: SystemAppBar(  
49 -// '联系人',  
50 -// onTap: () {  
51 -// EventBus().emit('changeStatusColor');  
52 -// Navigator.of(context).pop();  
53 -// },  
54 -// ),  
55 -// body: WillPopScope(  
56 -// child: SafeArea(  
57 -// child: Column(  
58 -// children: <Widget>[  
59 -// Container(  
60 -// // color: Colors.red,  
61 -// padding: EdgeInsets.symmetric(  
62 -// horizontal: ScreenUtil().setWidth(40),  
63 -// vertical: ScreenUtil().setWidth(10)),  
64 -// height: ScreenUtil().setWidth(45 * 2),  
65 -// // alignment: Alignment.center,  
66 -// child: Stack(  
67 -// children: [  
68 -// Container(  
69 -// alignment: Alignment.center,  
70 -// padding: EdgeInsets.symmetric(  
71 -// horizontal: ScreenUtil().setWidth(20 * 2),  
72 -// vertical: ScreenUtil().setWidth(14)),  
73 -// decoration: BoxDecoration(  
74 -// color: MyColours.color_F0F0F0,  
75 -// borderRadius: BorderRadius.circular(  
76 -// ScreenUtil().setWidth(24 * 2))),  
77 -// child: TextField(  
78 -// maxLines: 1,  
79 -// controller: contantShowModel.controller,  
80 -// // focusNode: _focusNode,  
81 -// // autofocus: true,  
82 -// style: TextStyle(  
83 -// color: MyColours.color_333333,  
84 -// fontSize: ScreenUtil().setSp(30)),  
85 -// // textAlignVertical: TextAlignVertical.center,  
86 -// decoration: InputDecoration(  
87 -// contentPadding: EdgeInsets.only(  
88 -// right: ScreenUtil().setWidth(40 * 2)),  
89 -// hintText: "搜索联系人",  
90 -// hintStyle: TextStyle(  
91 -// color: MyColours.color_999999,  
92 -// fontSize: ScreenUtil().setSp(30),  
93 -// ),  
94 -// isCollapsed:  
95 -// true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度  
96 -// border: OutlineInputBorder(  
97 -// borderSide: BorderSide.none),  
98 -// // 左边图标设置  
99 -// icon: Image.asset(  
100 -// Utils.getImgPath('search'),  
101 -// width: ScreenUtil().setWidth(30),  
102 -// ),  
103 -// //右边图标设置  
104 -// // suffixIcon:  
105 -// ),  
106 -// keyboardType: TextInputType.text,  
107 -// textInputAction: TextInputAction.done, 37 + @override
  38 + Widget build(BuildContext context) {
  39 + contantShowModel = Provider.of<ContantShowModel>(context, listen: true);
  40 + return Material(
  41 + child: InkWell(
  42 + onTap: () {
  43 + // FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
  44 + },
  45 + child: Scaffold(
  46 + resizeToAvoidBottomInset: false,
  47 + backgroundColor: MyColours.color_ffffff,
  48 + appBar: SystemAppBar(
  49 + '联系人',
  50 + onTap: () {
  51 + EventBus().emit('changeStatusColor');
  52 + Navigator.of(context).pop();
  53 + },
  54 + ),
  55 + body: WillPopScope(
  56 + child: SafeArea(
  57 + child: Column(
  58 + children: <Widget>[
  59 + Container(
  60 + // color: Colors.red,
  61 + padding: EdgeInsets.symmetric(
  62 + horizontal: ScreenUtil().setWidth(40),
  63 + vertical: ScreenUtil().setWidth(10)),
  64 + height: ScreenUtil().setWidth(45 * 2),
  65 + // alignment: Alignment.center,
  66 + child: Stack(
  67 + children: [
  68 + Container(
  69 + alignment: Alignment.center,
  70 + padding: EdgeInsets.symmetric(
  71 + horizontal: ScreenUtil().setWidth(20 * 2),
  72 + vertical: ScreenUtil().setWidth(14)),
  73 + decoration: BoxDecoration(
  74 + color: MyColours.color_F0F0F0,
  75 + borderRadius: BorderRadius.circular(
  76 + ScreenUtil().setWidth(24 * 2))),
  77 + child: TextField(
  78 + maxLines: 1,
  79 + controller: contantShowModel.controller,
  80 + // focusNode: _focusNode,
  81 + // autofocus: true,
  82 + style: TextStyle(
  83 + color: MyColours.color_333333,
  84 + fontSize: ScreenUtil().setSp(30)),
  85 + // textAlignVertical: TextAlignVertical.center,
  86 + decoration: InputDecoration(
  87 + contentPadding: EdgeInsets.only(
  88 + right: ScreenUtil().setWidth(40 * 2)),
  89 + hintText: "搜索联系人",
  90 + hintStyle: TextStyle(
  91 + color: MyColours.color_999999,
  92 + fontSize: ScreenUtil().setSp(30),
  93 + ),
  94 + isCollapsed:
  95 + true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
  96 + border: OutlineInputBorder(
  97 + borderSide: BorderSide.none),
  98 + // 左边图标设置
  99 + icon: Image.asset(
  100 + Utils.getImgPath('search'),
  101 + width: ScreenUtil().setWidth(30),
  102 + ),
  103 + //右边图标设置
  104 + // suffixIcon:
  105 + ),
  106 + keyboardType: TextInputType.text,
  107 + textInputAction: TextInputAction.done,
108 108
109 -// onChanged: (value) {  
110 -// // setState(() {});  
111 -// // _searchSellerLocation();  
112 -// contantShowModel.searchData(value);  
113 -// },  
114 -// onEditingComplete: () {  
115 -// FocusScope.of(context).requestFocus(  
116 -// FocusNode()); //点击空白处隐藏键盘  
117 -// // contantShowModel.searchData(  
118 -// // contantShowModel.controller.text);  
119 -// // _searchSellerLocation();  
120 -// // _focusNode.unfocus();  
121 -// },  
122 -// ),  
123 -// ),  
124 -// Positioned(  
125 -// right: 0,  
126 -// top: 0,  
127 -// bottom: 0,  
128 -// child: Offstage(  
129 -// offstage:  
130 -// contantShowModel.controller.text ==  
131 -// '',  
132 -// child: GestureDetector(  
133 -// child: Container(  
134 -// padding: EdgeInsets.only(  
135 -// right: ScreenUtil()  
136 -// .setWidth(20 * 2)),  
137 -// // color: Colors.orange,  
138 -// height:  
139 -// ScreenUtil().setWidth(45 * 2),  
140 -// width:  
141 -// ScreenUtil().setWidth(100 * 2),  
142 -// alignment: Alignment.centerRight,  
143 -// child: Image.asset(  
144 -// Utils.getImgPath('clear'),  
145 -// width: ScreenUtil().setWidth(30),  
146 -// height: ScreenUtil().setWidth(30),  
147 -// ),  
148 -// ),  
149 -// onTap: () {  
150 -// WidgetsBinding.instance  
151 -// .addPostFrameCallback(((_) {  
152 -// contantShowModel.controller  
153 -// .clear();  
154 -// contantShowModel.searchData('');  
155 -// }));  
156 -// },  
157 -// )))  
158 -// ],  
159 -// )),  
160 -// Container(  
161 -// padding: EdgeInsets.only(  
162 -// bottom: ScreenUtil().setWidth(10)),  
163 -// margin: EdgeInsets.symmetric(  
164 -// horizontal: ScreenUtil().setWidth(30)),  
165 -// child: TabBar(  
166 -// controller: tabController,  
167 -// indicator: CustomTabIndicator(  
168 -// radius: 0,  
169 -// ),  
170 -// indicatorColor: MyColours.color_199095,  
171 -// indicatorSize: TabBarIndicatorSize.tab,  
172 -// // indicatorPadding: EdgeInsets.symmetric(  
173 -// // horizontal: ScreenUtil().setWidth(12)),  
174 -// labelColor: MyColours.color_199095,  
175 -// labelStyle: TextStyle(  
176 -// fontSize: ScreenUtil().setSp(32),  
177 -// fontWeight: FontWeight.bold),  
178 -// labelPadding: EdgeInsets.zero,  
179 -// unselectedLabelStyle:  
180 -// TextStyle(fontWeight: FontWeight.normal),  
181 -// unselectedLabelColor: MyColours.color_999999,  
182 -// tabs: _tabBarTitle.map((value) {  
183 -// return Tab(  
184 -// child: Text(value),  
185 -// );  
186 -// }).toList()),  
187 -// ),  
188 -// Expanded(  
189 -// child: TabBarView(  
190 -// controller: tabController,  
191 -// // physics: NeverScrollableScrollPhysics(),  
192 -// children: <Widget>[  
193 -// ContantLeftPage(),  
194 -// ContantRightPage(),  
195 -// ],  
196 -// )),  
197 -// ],  
198 -// )),  
199 -// onWillPop: () async {  
200 -// EventBus().emit('changeStatusColor');  
201 -// return true;  
202 -// }))));  
203 -// }  
204 -// } 109 + onChanged: (value) {
  110 + // setState(() {});
  111 + // _searchSellerLocation();
  112 + contantShowModel.searchData(value);
  113 + },
  114 + onEditingComplete: () {
  115 + FocusScope.of(context).requestFocus(
  116 + FocusNode()); //点击空白处隐藏键盘
  117 + // contantShowModel.searchData(
  118 + // contantShowModel.controller.text);
  119 + // _searchSellerLocation();
  120 + // _focusNode.unfocus();
  121 + },
  122 + ),
  123 + ),
  124 + Positioned(
  125 + right: 0,
  126 + top: 0,
  127 + bottom: 0,
  128 + child: Offstage(
  129 + offstage:
  130 + contantShowModel.controller.text ==
  131 + '',
  132 + child: GestureDetector(
  133 + child: Container(
  134 + padding: EdgeInsets.only(
  135 + right: ScreenUtil()
  136 + .setWidth(20 * 2)),
  137 + // color: Colors.orange,
  138 + height:
  139 + ScreenUtil().setWidth(45 * 2),
  140 + width:
  141 + ScreenUtil().setWidth(100 * 2),
  142 + alignment: Alignment.centerRight,
  143 + child: Image.asset(
  144 + Utils.getImgPath('clear'),
  145 + width: ScreenUtil().setWidth(30),
  146 + height: ScreenUtil().setWidth(30),
  147 + ),
  148 + ),
  149 + onTap: () {
  150 + WidgetsBinding.instance
  151 + .addPostFrameCallback(((_) {
  152 + contantShowModel.controller
  153 + .clear();
  154 + contantShowModel.searchData('');
  155 + }));
  156 + },
  157 + )))
  158 + ],
  159 + )),
  160 + Container(
  161 + padding: EdgeInsets.only(
  162 + bottom: ScreenUtil().setWidth(10)),
  163 + margin: EdgeInsets.symmetric(
  164 + horizontal: ScreenUtil().setWidth(30)),
  165 + child: TabBar(
  166 + controller: tabController,
  167 + indicator: CustomTabIndicator(
  168 + radius: 0,
  169 + ),
  170 + indicatorColor: MyColours.color_199095,
  171 + indicatorSize: TabBarIndicatorSize.tab,
  172 + // indicatorPadding: EdgeInsets.symmetric(
  173 + // horizontal: ScreenUtil().setWidth(12)),
  174 + labelColor: MyColours.color_199095,
  175 + labelStyle: TextStyle(
  176 + fontSize: ScreenUtil().setSp(32),
  177 + fontWeight: FontWeight.bold),
  178 + labelPadding: EdgeInsets.zero,
  179 + unselectedLabelStyle:
  180 + TextStyle(fontWeight: FontWeight.normal),
  181 + unselectedLabelColor: MyColours.color_999999,
  182 + tabs: _tabBarTitle.map((value) {
  183 + return Tab(
  184 + child: Text(value),
  185 + );
  186 + }).toList()),
  187 + ),
  188 + Expanded(
  189 + child: TabBarView(
  190 + controller: tabController,
  191 + // physics: NeverScrollableScrollPhysics(),
  192 + children: <Widget>[
  193 + ContantLeftPage(),
  194 + ContantRightPage(),
  195 + ],
  196 + )),
  197 + ],
  198 + )),
  199 + onWillPop: () async {
  200 + EventBus().emit('changeStatusColor');
  201 + return true;
  202 + }))));
  203 + }
  204 +}
1 -// import 'package:flutter/material.dart'; 1 +import 'package:flutter/material.dart';
2 2
3 -// import 'package:lpinyin/lpinyin.dart';  
4 -// import 'package:one_key/constant/state.dart';  
5 -// import 'package:one_key/models/user_history_entity.dart';  
6 -// import 'package:one_key/pages/my/contant_item_page.dart';  
7 -// import 'package:one_key/provider/contant_show_model.dart'; 3 +import 'package:lpinyin/lpinyin.dart';
  4 +import 'package:one_key/constant/state.dart';
  5 +import 'package:one_key/models/user_history_entity.dart';
  6 +import 'package:one_key/pages/my/contant_item_page.dart';
  7 +import 'package:one_key/provider/contant_show_model.dart';
8 8
9 -// import 'package:one_key/utils/dialog_util.dart';  
10 -// import 'package:one_key/utils/misc.dart'; 9 +import 'package:one_key/utils/dialog_util.dart';
  10 +import 'package:one_key/utils/misc.dart';
11 11
12 -// import 'package:one_key/widgets/page_exception.dart'; 12 +import 'package:one_key/widgets/page_exception.dart';
13 13
14 -// import 'package:contacts_service/contacts_service.dart';  
15 -// import 'package:permission_handler/permission_handler.dart';  
16 -// import 'package:provider/provider.dart'; 14 +import 'package:contacts_service/contacts_service.dart';
  15 +import 'package:permission_handler/permission_handler.dart';
  16 +import 'package:provider/provider.dart';
17 17
18 -// class ContantRightPage extends StatefulWidget {  
19 -// ContantRightPage({Key key}) : super(key: key); 18 +class ContantRightPage extends StatefulWidget {
  19 + ContantRightPage({Key key}) : super(key: key);
20 20
21 -// @override  
22 -// _ContantRightPageState createState() => _ContantRightPageState();  
23 -// } 21 + @override
  22 + _ContantRightPageState createState() => _ContantRightPageState();
  23 +}
24 24
25 -// class _ContantRightPageState extends State<ContantRightPage> {  
26 -// List<Contact> _contacts;  
27 -// bool isNeed = false;  
28 -// bool goSetting = false;  
29 -// bool userNo = false;  
30 -// ContantShowModel contantShowModel;  
31 -// @override  
32 -// void initState() {  
33 -// super.initState();  
34 -// WidgetsBinding.instance.addPostFrameCallback((_) {  
35 -// _openAddressBook();  
36 -// });  
37 -// } 25 +class _ContantRightPageState extends State<ContantRightPage> {
  26 + List<Contact> _contacts;
  27 + bool isNeed = false;
  28 + bool goSetting = false;
  29 + bool userNo = false;
  30 + ContantShowModel contantShowModel;
  31 + @override
  32 + void initState() {
  33 + super.initState();
  34 + WidgetsBinding.instance.addPostFrameCallback((_) {
  35 + _openAddressBook();
  36 + });
  37 + }
38 38
39 -// _openAddressBook() async {  
40 -// if (!(await checkContactPermission())) {  
41 -// PermissionStatus permissionStatus = await contactPermissionStatus();  
42 -// if (permissionStatus == PermissionStatus.permanentlyDenied) {  
43 -// //用户选择不在弹出权限提示框  
44 -// print('never');  
45 -// userNo = true;  
46 -// setState(() {  
47 -// contantShowModel.pageStateRight = PageState.NoPermission;  
48 -// });  
49 -// // DialogUtil.openAlertDialog(  
50 -// // context, '未获得通讯录权限', "请在手机的权限管理里,将通讯录权限开启", '去设置', 340.0,  
51 -// // onTap: () {  
52 -// // goSetting = true;  
53 -// // openSetting();  
54 -// // Navigator.pop(context, '');  
55 -// // });  
56 -// } else {  
57 -// // 申请权限  
58 -// bool canContacts = await requestContactPermission();  
59 -// if (canContacts) {  
60 -// refreshContacts();  
61 -// } else {  
62 -// setState(() {  
63 -// contantShowModel.pageStateRight = PageState.NoPermission;  
64 -// });  
65 -// //拒绝通讯录权限 , 苹果拒绝权限后,不再提示权限框,进入此处  
66 -// // DialogUtil.openAlertDialog(  
67 -// // context, '未获得通讯录权限', "请在手机的权限管理里,将通讯录权限开启。", '去设置', 340.0,  
68 -// // onTap: () {  
69 -// // goSetting = true;  
70 -// // openSetting();  
71 -// // Navigator.pop(context, '');  
72 -// // });  
73 -// }  
74 -// }  
75 -// } else {  
76 -// refreshContacts();  
77 -// }  
78 -// } 39 + _openAddressBook() async {
  40 + if (!(await checkContactPermission())) {
  41 + PermissionStatus permissionStatus = await contactPermissionStatus();
  42 + if (permissionStatus == PermissionStatus.permanentlyDenied) {
  43 + //用户选择不在弹出权限提示框
  44 + print('never');
  45 + userNo = true;
  46 + setState(() {
  47 + contantShowModel.pageStateRight = PageState.NoPermission;
  48 + });
  49 + // DialogUtil.openAlertDialog(
  50 + // context, '未获得通讯录权限', "请在手机的权限管理里,将通讯录权限开启", '去设置', 340.0,
  51 + // onTap: () {
  52 + // goSetting = true;
  53 + // openSetting();
  54 + // Navigator.pop(context, '');
  55 + // });
  56 + } else {
  57 + // 申请权限
  58 + bool canContacts = await requestContactPermission();
  59 + if (canContacts) {
  60 + refreshContacts();
  61 + } else {
  62 + setState(() {
  63 + contantShowModel.pageStateRight = PageState.NoPermission;
  64 + });
  65 + //拒绝通讯录权限 , 苹果拒绝权限后,不再提示权限框,进入此处
  66 + // DialogUtil.openAlertDialog(
  67 + // context, '未获得通讯录权限', "请在手机的权限管理里,将通讯录权限开启。", '去设置', 340.0,
  68 + // onTap: () {
  69 + // goSetting = true;
  70 + // openSetting();
  71 + // Navigator.pop(context, '');
  72 + // });
  73 + }
  74 + }
  75 + } else {
  76 + refreshContacts();
  77 + }
  78 + }
79 79
80 -// Future<void> refreshContacts() async {  
81 -// List<Contact> contacts = (await ContactsService.getContacts(  
82 -// withThumbnails: false, iOSLocalizedLabels: false))  
83 -// .toList(); 80 + Future<void> refreshContacts() async {
  81 + List<Contact> contacts = (await ContactsService.getContacts(
  82 + withThumbnails: false, iOSLocalizedLabels: false))
  83 + .toList();
84 84
85 -// setState(() {  
86 -// _contacts = contacts;  
87 -// if (_contacts.length > 0) {  
88 -// contantShowModel.contacts = [];  
89 -// for (int i = 0; i < _contacts.length; i++) {  
90 -// UserHistoryEntity item = UserHistoryEntity(  
91 -// '',  
92 -// '',  
93 -// _contacts[i].displayName == null ? '' : _contacts[i].displayName,  
94 -// '',  
95 -// _contacts[i].phones == null  
96 -// ? ''  
97 -// : _contacts[i].phones.first.value.replaceAll(' ', ''),  
98 -// '');  
99 -// item.pinyin = _contacts[i].displayName == null  
100 -// ? ''  
101 -// : PinyinHelper.getPinyin(_contacts[i].displayName)  
102 -// .replaceAll(' ', '');  
103 -// List<String> pinyinList = _contacts[i].displayName == null  
104 -// ? []  
105 -// : PinyinHelper.getPinyin(_contacts[i].displayName).split(' ');  
106 -// item.pinyinFirst = '';  
107 -// item.pinyinList = [];  
108 -// String pinyinAll = ''; //组装全拼组合  
109 -// for (int j = 0; j < pinyinList.length; j++) {  
110 -// String letter = pinyinList[j];  
111 -// pinyinAll += pinyinList[j];  
112 -// item.pinyinList.add(pinyinAll);  
113 -// if (letter.length > 0) {  
114 -// item.pinyinFirst += pinyinList[j].substring(0, 1);  
115 -// } else {  
116 -// item.pinyinFirst += '';  
117 -// }  
118 -// }  
119 -// contantShowModel.contacts.add(item);  
120 -// }  
121 -// contantShowModel.contactsShow = contantShowModel.contacts;  
122 -// contantShowModel.pageStateRight = PageState.Success;  
123 -// } else {  
124 -// contantShowModel.pageStateRight = PageState.Empty;  
125 -// }  
126 -// });  
127 -// await contantShowModel.searchData(contantShowModel.controller.text);  
128 -// } 85 + setState(() {
  86 + _contacts = contacts;
  87 + if (_contacts.length > 0) {
  88 + contantShowModel.contacts = [];
  89 + for (int i = 0; i < _contacts.length; i++) {
  90 + UserHistoryEntity item = UserHistoryEntity(
  91 + '',
  92 + '',
  93 + _contacts[i].displayName == null ? '' : _contacts[i].displayName,
  94 + '',
  95 + _contacts[i].phones == null
  96 + ? ''
  97 + : _contacts[i].phones.first.value.replaceAll(' ', ''),
  98 + '');
  99 + item.pinyin = _contacts[i].displayName == null
  100 + ? ''
  101 + : PinyinHelper.getPinyin(_contacts[i].displayName)
  102 + .replaceAll(' ', '');
  103 + List<String> pinyinList = _contacts[i].displayName == null
  104 + ? []
  105 + : PinyinHelper.getPinyin(_contacts[i].displayName).split(' ');
  106 + item.pinyinFirst = '';
  107 + item.pinyinList = [];
  108 + String pinyinAll = ''; //组装全拼组合
  109 + for (int j = 0; j < pinyinList.length; j++) {
  110 + String letter = pinyinList[j];
  111 + pinyinAll += pinyinList[j];
  112 + item.pinyinList.add(pinyinAll);
  113 + if (letter.length > 0) {
  114 + item.pinyinFirst += pinyinList[j].substring(0, 1);
  115 + } else {
  116 + item.pinyinFirst += '';
  117 + }
  118 + }
  119 + contantShowModel.contacts.add(item);
  120 + }
  121 + contantShowModel.contactsShow = contantShowModel.contacts;
  122 + contantShowModel.pageStateRight = PageState.Success;
  123 + } else {
  124 + contantShowModel.pageStateRight = PageState.Empty;
  125 + }
  126 + });
  127 + await contantShowModel.searchData(contantShowModel.controller.text);
  128 + }
129 129
130 -// @override  
131 -// Widget build(BuildContext context) {  
132 -// contantShowModel = Provider.of<ContantShowModel>(context, listen: true);  
133 -// return Consumer<ContantShowModel>(builder: (context, model, _) {  
134 -// if (model.pageStateRight != PageState.Success) {  
135 -// return ExceptionPage(  
136 -// pageState: model.pageStateRight,  
137 -// callback: () async {  
138 -// if (await checkContactPermission()) {  
139 -// _openAddressBook();  
140 -// } else {  
141 -// goSetting = true;  
142 -// openSetting();  
143 -// }  
144 -// },  
145 -// emptyMsg: "暂时没有联系人哦",  
146 -// emptyImg: "empty_search",  
147 -// showMsg: "加载中,请稍后...",  
148 -// );  
149 -// } else {  
150 -// return ListView.builder(  
151 -// itemCount: contantShowModel.contactsShow?.length ?? 0,  
152 -// itemBuilder: (BuildContext context, int index) {  
153 -// UserHistoryEntity c = contantShowModel.contactsShow[index];  
154 -// return ContantItemPage(  
155 -// onTap: () {  
156 -// if (c.phone != null && c.phone != '') {  
157 -// DialogUtil.goPhone(c.phone);  
158 -// }  
159 -// },  
160 -// index: index,  
161 -// model: contantShowModel,  
162 -// data: contantShowModel.contactsShow,  
163 -// );  
164 -// });  
165 -// }  
166 -// });  
167 -// }  
168 -// } 130 + @override
  131 + Widget build(BuildContext context) {
  132 + contantShowModel = Provider.of<ContantShowModel>(context, listen: true);
  133 + return Consumer<ContantShowModel>(builder: (context, model, _) {
  134 + if (model.pageStateRight != PageState.Success) {
  135 + return ExceptionPage(
  136 + pageState: model.pageStateRight,
  137 + callback: () async {
  138 + if (await checkContactPermission()) {
  139 + _openAddressBook();
  140 + } else {
  141 + goSetting = true;
  142 + openSetting();
  143 + }
  144 + },
  145 + emptyMsg: "暂时没有联系人哦",
  146 + emptyImg: "empty_search",
  147 + showMsg: "加载中,请稍后...",
  148 + );
  149 + } else {
  150 + return ListView.builder(
  151 + itemCount: contantShowModel.contactsShow?.length ?? 0,
  152 + itemBuilder: (BuildContext context, int index) {
  153 + UserHistoryEntity c = contantShowModel.contactsShow[index];
  154 + return ContantItemPage(
  155 + onTap: () {
  156 + if (c.phone != null && c.phone != '') {
  157 + DialogUtil.goPhone(c.phone);
  158 + }
  159 + },
  160 + index: index,
  161 + model: contantShowModel,
  162 + data: contantShowModel.contactsShow,
  163 + );
  164 + });
  165 + }
  166 + });
  167 + }
  168 +}
1 -import 'package:azlistview/azlistview.dart';  
2 -import 'package:flutter/material.dart';  
3 -import 'package:flutter_screenutil/flutter_screenutil.dart'; 1 +// import 'package:azlistview/azlistview.dart';
  2 +// import 'package:flutter/material.dart';
  3 +// import 'package:flutter_screenutil/flutter_screenutil.dart';
4 4
5 -import 'package:one_key/models/user_history_entity.dart';  
6 -import 'package:one_key/provider/customer_provider.dart';  
7 -import 'package:one_key/res/colors.dart';  
8 -import 'package:one_key/route/navigator_util.dart';  
9 -import 'package:one_key/utils/utils.dart';  
10 -import 'package:one_key/widgets/h_empty_view.dart';  
11 -import 'package:one_key/widgets/v_empty_view.dart'; 5 +// import 'package:one_key/models/user_history_entity.dart';
  6 +// import 'package:one_key/provider/customer_provider.dart';
  7 +// import 'package:one_key/res/colors.dart';
  8 +// import 'package:one_key/route/navigator_util.dart';
  9 +// import 'package:one_key/utils/utils.dart';
  10 +// import 'package:one_key/widgets/h_empty_view.dart';
  11 +// import 'package:one_key/widgets/v_empty_view.dart';
12 12
13 -class ContactListPage extends StatefulWidget {  
14 - final List<UserHistoryEntity> contacts;  
15 - final CustomerProvider provider; 13 +// class ContactListPage extends StatefulWidget {
  14 +// final List<UserHistoryEntity> contacts;
  15 +// final CustomerProvider provider;
16 16
17 - const ContactListPage({Key key, this.contacts, this.provider})  
18 - : super(key: key);  
19 - @override  
20 - State<StatefulWidget> createState() {  
21 - return new _ContactListPageState();  
22 - }  
23 -} 17 +// const ContactListPage({Key key, this.contacts, this.provider})
  18 +// : super(key: key);
  19 +// @override
  20 +// State<StatefulWidget> createState() {
  21 +// return new _ContactListPageState();
  22 +// }
  23 +// }
24 24
25 -class _ContactListPageState extends State<ContactListPage> {  
26 - // List<contan> _contacts = [];  
27 - double susItemHeight = ScreenUtil().setWidth(10); 25 +// class _ContactListPageState extends State<ContactListPage> {
  26 +// // List<contan> _contacts = [];
  27 +// double susItemHeight = ScreenUtil().setWidth(10);
28 28
29 - @override  
30 - void initState() {  
31 - super.initState();  
32 - // loadData();  
33 - widget.provider.handleList(widget.contacts);  
34 - } 29 +// @override
  30 +// void initState() {
  31 +// super.initState();
  32 +// // loadData();
  33 +// widget.provider.handleList(widget.contacts);
  34 +// }
35 35
36 - // void loadData() async {  
37 - // //加载联系人列表  
38 - // rootBundle.loadString('assets/data/contacts.json').then((value) {  
39 - // List list = json.decode(value);  
40 - // list.forEach((v) {  
41 - // _contacts.add(ContactInfo.fromJson(v));  
42 - // });  
43 - // _handleList(_contacts);  
44 - // });  
45 - // } 36 +// // void loadData() async {
  37 +// // //加载联系人列表
  38 +// // rootBundle.loadString('assets/data/contacts.json').then((value) {
  39 +// // List list = json.decode(value);
  40 +// // list.forEach((v) {
  41 +// // _contacts.add(ContactInfo.fromJson(v));
  42 +// // });
  43 +// // _handleList(_contacts);
  44 +// // });
  45 +// // }
46 46
47 - Widget _buildHeader() {  
48 - return Container(  
49 - padding: EdgeInsets.all(20),  
50 - alignment: Alignment.center,  
51 - child: Column(  
52 - mainAxisAlignment: MainAxisAlignment.center,  
53 - children: <Widget>[  
54 - ClipOval(  
55 - child: Image.asset(  
56 - "./assets/images/avatar.png",  
57 - width: 80.0,  
58 - )),  
59 - Padding(  
60 - padding: const EdgeInsets.all(8.0),  
61 - child: Text(  
62 - "远行",  
63 - textScaleFactor: 1.2,  
64 - ),  
65 - ),  
66 - Text("+86 182-286-44678"),  
67 - ],  
68 - ),  
69 - );  
70 - } 47 +// Widget _buildHeader() {
  48 +// return Container(
  49 +// padding: EdgeInsets.all(20),
  50 +// alignment: Alignment.center,
  51 +// child: Column(
  52 +// mainAxisAlignment: MainAxisAlignment.center,
  53 +// children: <Widget>[
  54 +// ClipOval(
  55 +// child: Image.asset(
  56 +// "./assets/images/avatar.png",
  57 +// width: 80.0,
  58 +// )),
  59 +// Padding(
  60 +// padding: const EdgeInsets.all(8.0),
  61 +// child: Text(
  62 +// "远行",
  63 +// textScaleFactor: 1.2,
  64 +// ),
  65 +// ),
  66 +// Text("+86 182-286-44678"),
  67 +// ],
  68 +// ),
  69 +// );
  70 +// }
71 71
72 - Widget _buildSusWidget(String susTag) {  
73 - return Container(  
74 - padding: EdgeInsets.symmetric(  
75 - horizontal: ScreenUtil().setWidth(20),  
76 - vertical: ScreenUtil().setWidth(10)),  
77 - // height: susItemHeight,  
78 - // margin: EdgeInsets.only(bottom: ScreenUtil().setWidth(20)),  
79 - width: double.infinity,  
80 - color: Color.fromRGBO(239, 239, 239, 1),  
81 - alignment: Alignment.centerLeft,  
82 - child: Text(  
83 - '$susTag',  
84 - style: TextStyle(fontSize: ScreenUtil().setWidth(28)),  
85 - ),  
86 - );  
87 - } 72 +// Widget _buildSusWidget(String susTag) {
  73 +// return Container(
  74 +// padding: EdgeInsets.symmetric(
  75 +// horizontal: ScreenUtil().setWidth(20),
  76 +// vertical: ScreenUtil().setWidth(10)),
  77 +// // height: susItemHeight,
  78 +// // margin: EdgeInsets.only(bottom: ScreenUtil().setWidth(20)),
  79 +// width: double.infinity,
  80 +// color: Color.fromRGBO(239, 239, 239, 1),
  81 +// alignment: Alignment.centerLeft,
  82 +// child: Text(
  83 +// '$susTag',
  84 +// style: TextStyle(fontSize: ScreenUtil().setWidth(28)),
  85 +// ),
  86 +// );
  87 +// }
88 88
89 - Widget _buildListItem(UserHistoryEntity model) {  
90 - String susTag = model.getSuspensionTag();  
91 - return Column(  
92 - children: <Widget>[  
93 - Offstage(  
94 - offstage: model.isShowSuspension != true,  
95 - child: _buildSusWidget(susTag),  
96 - ),  
97 - model.isShowSuspension ? VEmptyView(20) : SizedBox(),  
98 - Container(  
99 - padding: EdgeInsets.only(  
100 - left: ScreenUtil().setWidth(30),  
101 - right: ScreenUtil().setWidth(30),  
102 - bottom: ScreenUtil().setWidth(30),  
103 - top: model.isShowSuspension ? 0 : ScreenUtil().setWidth(30)),  
104 - decoration: BoxDecoration(  
105 - border: Border(  
106 - bottom: BorderSide(  
107 - color: Color.fromRGBO(244, 244, 244, 1),  
108 - width: ScreenUtil().setWidth(2)))),  
109 - child: Row(  
110 - children: [  
111 - Stack(  
112 - alignment: Alignment.bottomCenter,  
113 - clipBehavior: Clip.none,  
114 - children: [  
115 - Stack(  
116 - alignment: Alignment.centerLeft,  
117 - clipBehavior: Clip.none,  
118 - children: [  
119 - CircleAvatar(  
120 - radius: ScreenUtil().setWidth(60),  
121 - backgroundColor: Color.fromRGBO(239, 239, 239, 1),  
122 - child: Text(  
123 - model.rnameStr != ''  
124 - ? model.rnameStr.substring(0, 1)  
125 - : '',  
126 - style: TextStyle(  
127 - color: Color.fromRGBO(206, 206, 206, 1),  
128 - fontSize: ScreenUtil().setSp(42)),  
129 - ),  
130 - ),  
131 - Positioned(  
132 - left: ScreenUtil().setWidth(-18),  
133 - child: Image.asset(  
134 - Utils.getImgPath('select'),  
135 - width: ScreenUtil().setWidth(36),  
136 - ))  
137 - ]),  
138 - Positioned(  
139 - bottom: ScreenUtil().setWidth(-20),  
140 - child: Container(  
141 - padding: EdgeInsets.symmetric(  
142 - horizontal: ScreenUtil().setWidth(10),  
143 - vertical: ScreenUtil().setWidth(2),  
144 - ),  
145 - decoration: BoxDecoration(  
146 - color: Color.fromRGBO(223, 33, 81, 1),  
147 - borderRadius: BorderRadius.circular(  
148 - ScreenUtil().setWidth(10),  
149 - ),  
150 - ),  
151 - child: Text('沉睡',  
152 - style: TextStyle(  
153 - color: MyColours.color_ffffff,  
154 - fontSize: ScreenUtil().setSp(28)))))  
155 - ],  
156 - ),  
157 - HEmptyView(20),  
158 - Expanded(  
159 - child: Column(  
160 - crossAxisAlignment: CrossAxisAlignment.start,  
161 - children: [  
162 - Row(  
163 - crossAxisAlignment: CrossAxisAlignment.end,  
164 - children: [  
165 - Container(  
166 - constraints: BoxConstraints(  
167 - maxWidth: ScreenUtil().setWidth(200)),  
168 - child: Text(  
169 - model.rnameStr,  
170 - overflow: TextOverflow.ellipsis,  
171 - style: TextStyle(  
172 - color: MyColours.color_333333,  
173 - fontSize: ScreenUtil().setSp(36),  
174 - fontWeight: FontWeight.bold),  
175 - )),  
176 - HEmptyView(10),  
177 - Text(  
178 - model.sexStr != '' ? '[${model.sexStr}]' : '',  
179 - style: TextStyle(  
180 - color: MyColours.color_333333,  
181 - fontSize: ScreenUtil().setSp(22),  
182 - ),  
183 - ),  
184 - HEmptyView(10),  
185 - Container(  
186 - constraints: BoxConstraints(  
187 - maxWidth: ScreenUtil().setWidth(150)),  
188 - child: Text(  
189 - '低频高消费',  
190 - overflow: TextOverflow.ellipsis,  
191 - style: TextStyle(  
192 - color: Color.fromRGBO(193, 194, 63, 1),  
193 - fontSize: ScreenUtil().setSp(22),  
194 - ),  
195 - ))  
196 - ],  
197 - ),  
198 - VEmptyView(10),  
199 - Row(  
200 - // crossAxisAlignment: CrossAxisAlignment.end,  
201 - children: [  
202 - Text(  
203 - '28天前',  
204 - style: TextStyle(  
205 - color: Color.fromRGBO(208, 31, 37, 1),  
206 - fontSize: ScreenUtil().setSp(24),  
207 - fontWeight: FontWeight.bold),  
208 - ),  
209 - HEmptyView(10),  
210 - Text(  
211 - '午餐',  
212 - style: TextStyle(  
213 - color: Color.fromRGBO(208, 31, 37, 1),  
214 - fontSize: ScreenUtil().setSp(24),  
215 - ),  
216 - ),  
217 - HEmptyView(10),  
218 - Text(  
219 - '累计80单',  
220 - style: TextStyle(  
221 - color: MyColours.color_199095,  
222 - fontSize: ScreenUtil().setSp(24),  
223 - ),  
224 - )  
225 - ],  
226 - ),  
227 - VEmptyView(10),  
228 - Container(  
229 - padding: EdgeInsets.symmetric(  
230 - horizontal: ScreenUtil().setWidth(12),  
231 - ),  
232 - decoration: BoxDecoration(  
233 - border: Border.all(  
234 - color: MyColours.color_199095,  
235 - width: ScreenUtil().setWidth(2)),  
236 - borderRadius:  
237 - BorderRadius.circular(ScreenUtil().setWidth(10))),  
238 - child: Text(  
239 - 'xx经理',  
240 - style: TextStyle(  
241 - fontSize: ScreenUtil().setSp(24),  
242 - color: MyColours.color_333333),  
243 - ),  
244 - )  
245 - ],  
246 - ))  
247 - ],  
248 - ),  
249 - )  
250 - // ListTile(  
251 - // leading: ,  
252 - // title: Text(model.rname),  
253 - // onTap: () {  
254 - // print("OnItemClick: $model");  
255 - // Navigator.pop(context, model);  
256 - // },  
257 - // )  
258 - ],  
259 - );  
260 - } 89 +// Widget _buildListItem(UserHistoryEntity model) {
  90 +// String susTag = model.getSuspensionTag();
  91 +// return Column(
  92 +// children: <Widget>[
  93 +// Offstage(
  94 +// offstage: model.isShowSuspension != true,
  95 +// child: _buildSusWidget(susTag),
  96 +// ),
  97 +// model.isShowSuspension ? VEmptyView(20) : SizedBox(),
  98 +// Container(
  99 +// padding: EdgeInsets.only(
  100 +// left: ScreenUtil().setWidth(30),
  101 +// right: ScreenUtil().setWidth(30),
  102 +// bottom: ScreenUtil().setWidth(30),
  103 +// top: model.isShowSuspension ? 0 : ScreenUtil().setWidth(30)),
  104 +// decoration: BoxDecoration(
  105 +// border: Border(
  106 +// bottom: BorderSide(
  107 +// color: Color.fromRGBO(244, 244, 244, 1),
  108 +// width: ScreenUtil().setWidth(2)))),
  109 +// child: Row(
  110 +// children: [
  111 +// Stack(
  112 +// alignment: Alignment.bottomCenter,
  113 +// clipBehavior: Clip.none,
  114 +// children: [
  115 +// Stack(
  116 +// alignment: Alignment.centerLeft,
  117 +// clipBehavior: Clip.none,
  118 +// children: [
  119 +// CircleAvatar(
  120 +// radius: ScreenUtil().setWidth(60),
  121 +// backgroundColor: Color.fromRGBO(239, 239, 239, 1),
  122 +// child: Text(
  123 +// model.rnameStr != ''
  124 +// ? model.rnameStr.substring(0, 1)
  125 +// : '',
  126 +// style: TextStyle(
  127 +// color: Color.fromRGBO(206, 206, 206, 1),
  128 +// fontSize: ScreenUtil().setSp(42)),
  129 +// ),
  130 +// ),
  131 +// Positioned(
  132 +// left: ScreenUtil().setWidth(-18),
  133 +// child: Image.asset(
  134 +// Utils.getImgPath('select'),
  135 +// width: ScreenUtil().setWidth(36),
  136 +// ))
  137 +// ]),
  138 +// Positioned(
  139 +// bottom: ScreenUtil().setWidth(-20),
  140 +// child: Container(
  141 +// padding: EdgeInsets.symmetric(
  142 +// horizontal: ScreenUtil().setWidth(10),
  143 +// vertical: ScreenUtil().setWidth(2),
  144 +// ),
  145 +// decoration: BoxDecoration(
  146 +// color: Color.fromRGBO(223, 33, 81, 1),
  147 +// borderRadius: BorderRadius.circular(
  148 +// ScreenUtil().setWidth(10),
  149 +// ),
  150 +// ),
  151 +// child: Text('沉睡',
  152 +// style: TextStyle(
  153 +// color: MyColours.color_ffffff,
  154 +// fontSize: ScreenUtil().setSp(28)))))
  155 +// ],
  156 +// ),
  157 +// HEmptyView(20),
  158 +// Expanded(
  159 +// child: Column(
  160 +// crossAxisAlignment: CrossAxisAlignment.start,
  161 +// children: [
  162 +// Row(
  163 +// crossAxisAlignment: CrossAxisAlignment.end,
  164 +// children: [
  165 +// Container(
  166 +// constraints: BoxConstraints(
  167 +// maxWidth: ScreenUtil().setWidth(200)),
  168 +// child: Text(
  169 +// model.rnameStr,
  170 +// overflow: TextOverflow.ellipsis,
  171 +// style: TextStyle(
  172 +// color: MyColours.color_333333,
  173 +// fontSize: ScreenUtil().setSp(36),
  174 +// fontWeight: FontWeight.bold),
  175 +// )),
  176 +// HEmptyView(10),
  177 +// Text(
  178 +// model.sexStr != '' ? '[${model.sexStr}]' : '',
  179 +// style: TextStyle(
  180 +// color: MyColours.color_333333,
  181 +// fontSize: ScreenUtil().setSp(22),
  182 +// ),
  183 +// ),
  184 +// HEmptyView(10),
  185 +// Container(
  186 +// constraints: BoxConstraints(
  187 +// maxWidth: ScreenUtil().setWidth(150)),
  188 +// child: Text(
  189 +// '低频高消费',
  190 +// overflow: TextOverflow.ellipsis,
  191 +// style: TextStyle(
  192 +// color: Color.fromRGBO(193, 194, 63, 1),
  193 +// fontSize: ScreenUtil().setSp(22),
  194 +// ),
  195 +// ))
  196 +// ],
  197 +// ),
  198 +// VEmptyView(10),
  199 +// Row(
  200 +// // crossAxisAlignment: CrossAxisAlignment.end,
  201 +// children: [
  202 +// Text(
  203 +// '28天前',
  204 +// style: TextStyle(
  205 +// color: Color.fromRGBO(208, 31, 37, 1),
  206 +// fontSize: ScreenUtil().setSp(24),
  207 +// fontWeight: FontWeight.bold),
  208 +// ),
  209 +// HEmptyView(10),
  210 +// Text(
  211 +// '午餐',
  212 +// style: TextStyle(
  213 +// color: Color.fromRGBO(208, 31, 37, 1),
  214 +// fontSize: ScreenUtil().setSp(24),
  215 +// ),
  216 +// ),
  217 +// HEmptyView(10),
  218 +// Text(
  219 +// '累计80单',
  220 +// style: TextStyle(
  221 +// color: MyColours.color_199095,
  222 +// fontSize: ScreenUtil().setSp(24),
  223 +// ),
  224 +// )
  225 +// ],
  226 +// ),
  227 +// VEmptyView(10),
  228 +// Container(
  229 +// padding: EdgeInsets.symmetric(
  230 +// horizontal: ScreenUtil().setWidth(12),
  231 +// ),
  232 +// decoration: BoxDecoration(
  233 +// border: Border.all(
  234 +// color: MyColours.color_199095,
  235 +// width: ScreenUtil().setWidth(2)),
  236 +// borderRadius:
  237 +// BorderRadius.circular(ScreenUtil().setWidth(10))),
  238 +// child: Text(
  239 +// 'xx经理',
  240 +// style: TextStyle(
  241 +// fontSize: ScreenUtil().setSp(24),
  242 +// color: MyColours.color_333333),
  243 +// ),
  244 +// )
  245 +// ],
  246 +// ))
  247 +// ],
  248 +// ),
  249 +// )
  250 +// // ListTile(
  251 +// // leading: ,
  252 +// // title: Text(model.rname),
  253 +// // onTap: () {
  254 +// // print("OnItemClick: $model");
  255 +// // Navigator.pop(context, model);
  256 +// // },
  257 +// // )
  258 +// ],
  259 +// );
  260 +// }
261 261
262 - Decoration getIndexBarDecoration(Color color) {  
263 - return BoxDecoration(  
264 - color: color,  
265 - borderRadius: BorderRadius.circular(20.0),  
266 - border: Border.all(color: color, width: .5));  
267 - } 262 +// Decoration getIndexBarDecoration(Color color) {
  263 +// return BoxDecoration(
  264 +// color: color,
  265 +// borderRadius: BorderRadius.circular(20.0),
  266 +// border: Border.all(color: color, width: .5));
  267 +// }
268 268
269 - @override  
270 - Widget build(BuildContext context) {  
271 - return AzListView(  
272 - data: widget.contacts,  
273 - itemCount: widget.contacts.length,  
274 - itemBuilder: (BuildContext context, int index) {  
275 - // if (index == 0) return _buildHeader();  
276 - UserHistoryEntity model = widget.contacts[index];  
277 - return InkWell(  
278 - onTap: () {  
279 - NavigatorUtil.goCustomerDetailPage(context, model);  
280 - },  
281 - child: _buildListItem(model),  
282 - );  
283 - },  
284 - physics: BouncingScrollPhysics(),  
285 - indexBarData: SuspensionUtil.getTagIndexList(widget.contacts),  
286 - indexHintBuilder: (context, hint) {  
287 - return Container(  
288 - alignment: Alignment.center,  
289 - width: ScreenUtil().setWidth(120),  
290 - height: ScreenUtil().setWidth(120),  
291 - decoration: BoxDecoration(  
292 - color: Color.fromRGBO(239, 239, 239, 1),  
293 - shape: BoxShape.circle,  
294 - ),  
295 - child:  
296 - Text(hint, style: TextStyle(color: Colors.white, fontSize: 30.0)),  
297 - );  
298 - },  
299 - indexBarMargin: EdgeInsets.all(10),  
300 - indexBarOptions: IndexBarOptions(  
301 - needRebuild: true,  
302 - textStyle: TextStyle(  
303 - fontSize: ScreenUtil().setSp(24), color: MyColours.color_199095),  
304 - decoration: getIndexBarDecoration(Colors.transparent),  
305 - downDecoration: getIndexBarDecoration(Colors.transparent),  
306 - ),  
307 - );  
308 - }  
309 -} 269 +// @override
  270 +// Widget build(BuildContext context) {
  271 +// return AzListView(
  272 +// data: widget.contacts,
  273 +// itemCount: widget.contacts.length,
  274 +// itemBuilder: (BuildContext context, int index) {
  275 +// // if (index == 0) return _buildHeader();
  276 +// UserHistoryEntity model = widget.contacts[index];
  277 +// return InkWell(
  278 +// onTap: () {
  279 +// NavigatorUtil.goCustomerDetailPage(context, model);
  280 +// },
  281 +// child: _buildListItem(model),
  282 +// );
  283 +// },
  284 +// physics: BouncingScrollPhysics(),
  285 +// indexBarData: SuspensionUtil.getTagIndexList(widget.contacts),
  286 +// indexHintBuilder: (context, hint) {
  287 +// return Container(
  288 +// alignment: Alignment.center,
  289 +// width: ScreenUtil().setWidth(120),
  290 +// height: ScreenUtil().setWidth(120),
  291 +// decoration: BoxDecoration(
  292 +// color: Color.fromRGBO(239, 239, 239, 1),
  293 +// shape: BoxShape.circle,
  294 +// ),
  295 +// child:
  296 +// Text(hint, style: TextStyle(color: Colors.white, fontSize: 30.0)),
  297 +// );
  298 +// },
  299 +// indexBarMargin: EdgeInsets.all(10),
  300 +// indexBarOptions: IndexBarOptions(
  301 +// needRebuild: true,
  302 +// textStyle: TextStyle(
  303 +// fontSize: ScreenUtil().setSp(24), color: MyColours.color_199095),
  304 +// decoration: getIndexBarDecoration(Colors.transparent),
  305 +// downDecoration: getIndexBarDecoration(Colors.transparent),
  306 +// ),
  307 +// );
  308 +// }
  309 +// }
1 -import 'package:flutter/material.dart'; 1 +// import 'package:flutter/material.dart';
2 2
3 -import 'package:flutter_screenutil/screenutil.dart';  
4 -import 'package:one_key/constant/state.dart'; 3 +// import 'package:flutter_screenutil/screenutil.dart';
  4 +// import 'package:one_key/constant/state.dart';
5 5
6 -import 'package:one_key/pages/my/customer_type/contant_list_page.dart'; 6 +// import 'package:one_key/pages/my/customer_type/contant_list_page.dart';
7 7
8 -import 'package:one_key/provider/customer_provider.dart';  
9 -import 'package:one_key/provider/user_model.dart';  
10 -import 'package:one_key/res/colors.dart';  
11 -import 'package:one_key/route/navigator_util.dart'; 8 +// import 'package:one_key/provider/customer_provider.dart';
  9 +// import 'package:one_key/provider/user_model.dart';
  10 +// import 'package:one_key/res/colors.dart';
  11 +// import 'package:one_key/route/navigator_util.dart';
12 12
13 -import 'package:one_key/utils/event_bus.dart';  
14 -import 'package:one_key/utils/utils.dart';  
15 -import 'package:one_key/widgets/common_button_flat.dart'; 13 +// import 'package:one_key/utils/event_bus.dart';
  14 +// import 'package:one_key/utils/utils.dart';
  15 +// import 'package:one_key/widgets/common_button_flat.dart';
16 16
17 -import 'package:one_key/widgets/custom_tab_indicator.dart';  
18 -import 'package:one_key/widgets/h_empty_view.dart';  
19 -import 'package:one_key/widgets/page_exception.dart'; 17 +// import 'package:one_key/widgets/custom_tab_indicator.dart';
  18 +// import 'package:one_key/widgets/h_empty_view.dart';
  19 +// import 'package:one_key/widgets/page_exception.dart';
20 20
21 -import 'package:one_key/widgets/system_app_bar.dart';  
22 -import 'package:one_key/widgets/v_empty_view.dart'; 21 +// import 'package:one_key/widgets/system_app_bar.dart';
  22 +// import 'package:one_key/widgets/v_empty_view.dart';
23 23
24 -import 'package:provider/provider.dart'; 24 +// import 'package:provider/provider.dart';
25 25
26 -typedef ClickCallback = void Function(dynamic value); 26 +// typedef ClickCallback = void Function(dynamic value);
27 27
28 -class CustomerListPage extends StatefulWidget {  
29 - @override  
30 - _CustomerListPageState createState() => _CustomerListPageState();  
31 -} 28 +// class CustomerListPage extends StatefulWidget {
  29 +// @override
  30 +// _CustomerListPageState createState() => _CustomerListPageState();
  31 +// }
32 32
33 -class _CustomerListPageState extends State<CustomerListPage>  
34 - with TickerProviderStateMixin {  
35 - List _tabBarTitle;  
36 - TabController tabController; 33 +// class _CustomerListPageState extends State<CustomerListPage>
  34 +// with TickerProviderStateMixin {
  35 +// List _tabBarTitle;
  36 +// TabController tabController;
37 37
38 - CustomerProvider customerProvider;  
39 - bool showFilter = false;  
40 - ScrollController _scrollCrl = ScrollController();  
41 - int dropValue = 0;  
42 - bool showDrop = true;  
43 - List<String> timeTilte = ['大于', '等于', '小于']; 38 +// CustomerProvider customerProvider;
  39 +// bool showFilter = false;
  40 +// ScrollController _scrollCrl = ScrollController();
  41 +// int dropValue = 0;
  42 +// bool showDrop = true;
  43 +// List<String> timeTilte = ['大于', '等于', '小于'];
44 44
45 - @override  
46 - void initState() {  
47 - _tabBarTitle = ['全部', '活跃', '沉睡', '流失'];  
48 - // timeTilte = ['大于', '等于', '小于'];  
49 - super.initState();  
50 - tabController = TabController(length: 4, vsync: this);  
51 - WidgetsBinding.instance.addPostFrameCallback((_) async {  
52 - _getContantData();  
53 - });  
54 - } 45 +// @override
  46 +// void initState() {
  47 +// _tabBarTitle = ['全部', '活跃', '沉睡', '流失'];
  48 +// // timeTilte = ['大于', '等于', '小于'];
  49 +// super.initState();
  50 +// tabController = TabController(length: 4, vsync: this);
  51 +// WidgetsBinding.instance.addPostFrameCallback((_) async {
  52 +// _getContantData();
  53 +// });
  54 +// }
55 55
56 - _getContantData() async {  
57 - Map<String, String> params = {  
58 - "sid": Provider.of<UserModel>(context, listen: false).user.sellerid,  
59 - };  
60 - await customerProvider.getUserHistorys(context, params);  
61 - await customerProvider.searchData(customerProvider.controller.text);  
62 - } 56 +// _getContantData() async {
  57 +// Map<String, String> params = {
  58 +// "sid": Provider.of<UserModel>(context, listen: false).user.sellerid,
  59 +// };
  60 +// await customerProvider.getUserHistorys(context, params);
  61 +// await customerProvider.searchData(customerProvider.controller.text);
  62 +// }
63 63
64 - ///选中的联系人widget  
65 - Widget _selectContantWidget() {  
66 - return Container(  
67 - // constraints: BoxConstraints(maxHeight: ScreenUtil().setWidth(760)),  
68 - // height: ScreenUtil().setWidth(400),  
69 - width: double.infinity,  
70 - padding: EdgeInsets.all(ScreenUtil().setWidth(40)),  
71 - decoration: BoxDecoration(  
72 - color: MyColours.color_ffffff,  
73 - boxShadow: [  
74 - BoxShadow(  
75 - color: MyColours.color_333333,  
76 - blurRadius: ScreenUtil().setWidth(14))  
77 - ],  
78 - borderRadius: BorderRadius.only(  
79 - topLeft: Radius.circular(ScreenUtil().setWidth(30)),  
80 - topRight: Radius.circular(ScreenUtil().setWidth(30)),  
81 - )),  
82 - child: Row(  
83 - children: [  
84 - Image.asset(Utils.getImgPath('select'),  
85 - width: ScreenUtil().setWidth(30)),  
86 - HEmptyView(10),  
87 - Text(  
88 - '全选',  
89 - style: TextStyle(  
90 - fontSize: ScreenUtil().setSp(26),  
91 - color: MyColours.color_333333),  
92 - ),  
93 - HEmptyView(20),  
94 - Expanded(  
95 - child: InkWell(  
96 - onTap: () {  
97 - NavigatorUtil.goMakeMarkingPage(context);  
98 - },  
99 - child: Container(  
100 - alignment: Alignment.center,  
101 - padding: EdgeInsets.all(ScreenUtil().setWidth(20)),  
102 - decoration: BoxDecoration(  
103 - borderRadius:  
104 - BorderRadius.circular(ScreenUtil().setWidth(40)),  
105 - color: MyColours.color_199095),  
106 - child: Text(  
107 - '已选[全部]10000位顾客,下发营销任务',  
108 - overflow: TextOverflow.ellipsis,  
109 - maxLines: 1,  
110 - style: TextStyle(  
111 - fontSize: ScreenUtil().setSp(28),  
112 - color: MyColours.color_ffffff,  
113 - ),  
114 - )),  
115 - )),  
116 - // Expanded(  
117 - // child: RoundButton(  
118 - // // width: ScreenUtil().setWidth(600),  
119 - // height: ScreenUtil().setWidth(80),  
120 - // radius: ScreenUtil().setWidth(40),  
121 - // text: '已选 [全部] 80位顾客,下发营销任务frfrfrfrfrffrfrfr',  
122 - // fontSize: 28,  
123 - // textColor: MyColours.color_ffffff,  
124 - // gradientStart: MyColours.color_199095,  
125 - // gradientEnd: MyColours.color_199095,  
126 - // onPressed: () {},  
127 - // ))  
128 - ],  
129 - ),  
130 - );  
131 - } 64 +// ///选中的联系人widget
  65 +// Widget _selectContantWidget() {
  66 +// return Container(
  67 +// // constraints: BoxConstraints(maxHeight: ScreenUtil().setWidth(760)),
  68 +// // height: ScreenUtil().setWidth(400),
  69 +// width: double.infinity,
  70 +// padding: EdgeInsets.all(ScreenUtil().setWidth(40)),
  71 +// decoration: BoxDecoration(
  72 +// color: MyColours.color_ffffff,
  73 +// boxShadow: [
  74 +// BoxShadow(
  75 +// color: MyColours.color_333333,
  76 +// blurRadius: ScreenUtil().setWidth(14))
  77 +// ],
  78 +// borderRadius: BorderRadius.only(
  79 +// topLeft: Radius.circular(ScreenUtil().setWidth(30)),
  80 +// topRight: Radius.circular(ScreenUtil().setWidth(30)),
  81 +// )),
  82 +// child: Row(
  83 +// children: [
  84 +// Image.asset(Utils.getImgPath('select'),
  85 +// width: ScreenUtil().setWidth(30)),
  86 +// HEmptyView(10),
  87 +// Text(
  88 +// '全选',
  89 +// style: TextStyle(
  90 +// fontSize: ScreenUtil().setSp(26),
  91 +// color: MyColours.color_333333),
  92 +// ),
  93 +// HEmptyView(20),
  94 +// Expanded(
  95 +// child: InkWell(
  96 +// onTap: () {
  97 +// NavigatorUtil.goMakeMarkingPage(context);
  98 +// },
  99 +// child: Container(
  100 +// alignment: Alignment.center,
  101 +// padding: EdgeInsets.all(ScreenUtil().setWidth(20)),
  102 +// decoration: BoxDecoration(
  103 +// borderRadius:
  104 +// BorderRadius.circular(ScreenUtil().setWidth(40)),
  105 +// color: MyColours.color_199095),
  106 +// child: Text(
  107 +// '已选[全部]10000位顾客,下发营销任务',
  108 +// overflow: TextOverflow.ellipsis,
  109 +// maxLines: 1,
  110 +// style: TextStyle(
  111 +// fontSize: ScreenUtil().setSp(28),
  112 +// color: MyColours.color_ffffff,
  113 +// ),
  114 +// )),
  115 +// )),
  116 +// // Expanded(
  117 +// // child: RoundButton(
  118 +// // // width: ScreenUtil().setWidth(600),
  119 +// // height: ScreenUtil().setWidth(80),
  120 +// // radius: ScreenUtil().setWidth(40),
  121 +// // text: '已选 [全部] 80位顾客,下发营销任务frfrfrfrfrffrfrfr',
  122 +// // fontSize: 28,
  123 +// // textColor: MyColours.color_ffffff,
  124 +// // gradientStart: MyColours.color_199095,
  125 +// // gradientEnd: MyColours.color_199095,
  126 +// // onPressed: () {},
  127 +// // ))
  128 +// ],
  129 +// ),
  130 +// );
  131 +// }
132 132
133 - /// 搜索框  
134 - Widget _searchWidget() {  
135 - return Container(  
136 - color: MyColours.color_ffffff,  
137 - padding: EdgeInsets.symmetric(  
138 - horizontal: ScreenUtil().setWidth(40),  
139 - ),  
140 - height: ScreenUtil().setWidth(45 * 2),  
141 - // alignment: Alignment.center, 133 +// /// 搜索框
  134 +// Widget _searchWidget() {
  135 +// return Container(
  136 +// color: MyColours.color_ffffff,
  137 +// padding: EdgeInsets.symmetric(
  138 +// horizontal: ScreenUtil().setWidth(40),
  139 +// ),
  140 +// height: ScreenUtil().setWidth(45 * 2),
  141 +// // alignment: Alignment.center,
142 142
143 - child: Container(  
144 - alignment: Alignment.center,  
145 - padding: EdgeInsets.only(  
146 - left: ScreenUtil().setWidth(20 * 2),  
147 - ),  
148 - decoration: BoxDecoration(  
149 - color: MyColours.color_ffffff,  
150 - borderRadius:  
151 - BorderRadius.circular(ScreenUtil().setWidth(24 * 2)),  
152 - border: Border.all(color: Color.fromRGBO(228, 228, 228, 1)),  
153 - boxShadow: [  
154 - BoxShadow(  
155 - color: Color.fromRGBO(220, 220, 220, 1), //投影颜色  
156 - offset: Offset(2, 3), //x,y轴  
157 - blurRadius: ScreenUtil().setWidth(6) //投影距离  
158 - )  
159 - ]),  
160 - child: Row(children: [  
161 - Expanded(  
162 - child: TextField(  
163 - maxLines: 1,  
164 - controller: customerProvider.controller,  
165 - // focusNode: _focusNode,  
166 - // autofocus: true, 143 +// child: Container(
  144 +// alignment: Alignment.center,
  145 +// padding: EdgeInsets.only(
  146 +// left: ScreenUtil().setWidth(20 * 2),
  147 +// ),
  148 +// decoration: BoxDecoration(
  149 +// color: MyColours.color_ffffff,
  150 +// borderRadius:
  151 +// BorderRadius.circular(ScreenUtil().setWidth(24 * 2)),
  152 +// border: Border.all(color: Color.fromRGBO(228, 228, 228, 1)),
  153 +// boxShadow: [
  154 +// BoxShadow(
  155 +// color: Color.fromRGBO(220, 220, 220, 1), //投影颜色
  156 +// offset: Offset(2, 3), //x,y轴
  157 +// blurRadius: ScreenUtil().setWidth(6) //投影距离
  158 +// )
  159 +// ]),
  160 +// child: Row(children: [
  161 +// Expanded(
  162 +// child: TextField(
  163 +// maxLines: 1,
  164 +// controller: customerProvider.controller,
  165 +// // focusNode: _focusNode,
  166 +// // autofocus: true,
167 167
168 - style: TextStyle(  
169 - color: MyColours.color_333333,  
170 - fontSize: ScreenUtil().setSp(26)),  
171 - // textAlignVertical: TextAlignVertical.center,  
172 - decoration: InputDecoration(  
173 - hintText: "输入手机号或姓名",  
174 - hintStyle: TextStyle(  
175 - color: MyColours.color_999999,  
176 - fontSize: ScreenUtil().setSp(26),  
177 - ),  
178 - // isCollapsed:  
179 - // true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度  
180 - border: OutlineInputBorder(borderSide: BorderSide.none),  
181 - contentPadding: EdgeInsets.zero,  
182 - // 左边图标设置  
183 - icon: Image.asset(  
184 - Utils.getImgPath('search'),  
185 - width: ScreenUtil().setWidth(30),  
186 - ),  
187 - //右边图标设置  
188 - // suffixIcon:  
189 - ),  
190 - keyboardType: TextInputType.text,  
191 - textInputAction: TextInputAction.done, 168 +// style: TextStyle(
  169 +// color: MyColours.color_333333,
  170 +// fontSize: ScreenUtil().setSp(26)),
  171 +// // textAlignVertical: TextAlignVertical.center,
  172 +// decoration: InputDecoration(
  173 +// hintText: "输入手机号或姓名",
  174 +// hintStyle: TextStyle(
  175 +// color: MyColours.color_999999,
  176 +// fontSize: ScreenUtil().setSp(26),
  177 +// ),
  178 +// // isCollapsed:
  179 +// // true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
  180 +// border: OutlineInputBorder(borderSide: BorderSide.none),
  181 +// contentPadding: EdgeInsets.zero,
  182 +// // 左边图标设置
  183 +// icon: Image.asset(
  184 +// Utils.getImgPath('search'),
  185 +// width: ScreenUtil().setWidth(30),
  186 +// ),
  187 +// //右边图标设置
  188 +// // suffixIcon:
  189 +// ),
  190 +// keyboardType: TextInputType.text,
  191 +// textInputAction: TextInputAction.done,
192 192
193 - onChanged: (value) {  
194 - // setState(() {});  
195 - // _searchSellerLocation();  
196 - customerProvider.searchData(value);  
197 - },  
198 - onEditingComplete: () {  
199 - FocusScope.of(context)  
200 - .requestFocus(FocusNode()); //点击空白处隐藏键盘  
201 - // contantShowModel.searchData(  
202 - // contantShowModel.controller.text);  
203 - // _searchSellerLocation();  
204 - // _focusNode.unfocus();  
205 - },  
206 - ),  
207 - ),  
208 - Offstage(  
209 - offstage: customerProvider.controller.text == '',  
210 - child: GestureDetector(  
211 - child: Container(  
212 - padding: EdgeInsets.symmetric(  
213 - horizontal: ScreenUtil().setWidth(40),  
214 - vertical: ScreenUtil().setWidth(20),  
215 - ),  
216 - // color: Colors.orange,  
217 - alignment: Alignment.centerRight,  
218 - child: Image.asset(  
219 - Utils.getImgPath('clear'),  
220 - width: ScreenUtil().setWidth(30),  
221 - height: ScreenUtil().setWidth(30),  
222 - ),  
223 - ),  
224 - onTap: () {  
225 - WidgetsBinding.instance.addPostFrameCallback(((_) {  
226 - customerProvider.controller.clear();  
227 - customerProvider.searchData('');  
228 - }));  
229 - },  
230 - )),  
231 - // Offstage(  
232 - // offstage: false,  
233 - // child: GestureDetector(  
234 - // child: Container(  
235 - // padding: EdgeInsets.only(  
236 - // right: ScreenUtil().setWidth(30),  
237 - // bottom: ScreenUtil().setWidth(20),  
238 - // top: ScreenUtil().setWidth(20),  
239 - // ),  
240 - // child: Text(  
241 - // '搜索',  
242 - // style: TextStyle(  
243 - // color: MyColours.color_199095,  
244 - // fontSize: ScreenUtil().setSp(28)),  
245 - // ),  
246 - // ),  
247 - // onTap: () {  
248 - // customerProvider.searchData(  
249 - // customerProvider.controller.text);  
250 - // },  
251 - // ))  
252 - ])));  
253 - } 193 +// onChanged: (value) {
  194 +// // setState(() {});
  195 +// // _searchSellerLocation();
  196 +// customerProvider.searchData(value);
  197 +// },
  198 +// onEditingComplete: () {
  199 +// FocusScope.of(context)
  200 +// .requestFocus(FocusNode()); //点击空白处隐藏键盘
  201 +// // contantShowModel.searchData(
  202 +// // contantShowModel.controller.text);
  203 +// // _searchSellerLocation();
  204 +// // _focusNode.unfocus();
  205 +// },
  206 +// ),
  207 +// ),
  208 +// Offstage(
  209 +// offstage: customerProvider.controller.text == '',
  210 +// child: GestureDetector(
  211 +// child: Container(
  212 +// padding: EdgeInsets.symmetric(
  213 +// horizontal: ScreenUtil().setWidth(40),
  214 +// vertical: ScreenUtil().setWidth(20),
  215 +// ),
  216 +// // color: Colors.orange,
  217 +// alignment: Alignment.centerRight,
  218 +// child: Image.asset(
  219 +// Utils.getImgPath('clear'),
  220 +// width: ScreenUtil().setWidth(30),
  221 +// height: ScreenUtil().setWidth(30),
  222 +// ),
  223 +// ),
  224 +// onTap: () {
  225 +// WidgetsBinding.instance.addPostFrameCallback(((_) {
  226 +// customerProvider.controller.clear();
  227 +// customerProvider.searchData('');
  228 +// }));
  229 +// },
  230 +// )),
  231 +// // Offstage(
  232 +// // offstage: false,
  233 +// // child: GestureDetector(
  234 +// // child: Container(
  235 +// // padding: EdgeInsets.only(
  236 +// // right: ScreenUtil().setWidth(30),
  237 +// // bottom: ScreenUtil().setWidth(20),
  238 +// // top: ScreenUtil().setWidth(20),
  239 +// // ),
  240 +// // child: Text(
  241 +// // '搜索',
  242 +// // style: TextStyle(
  243 +// // color: MyColours.color_199095,
  244 +// // fontSize: ScreenUtil().setSp(28)),
  245 +// // ),
  246 +// // ),
  247 +// // onTap: () {
  248 +// // customerProvider.searchData(
  249 +// // customerProvider.controller.text);
  250 +// // },
  251 +// // ))
  252 +// ])));
  253 +// }
254 254
255 - Widget _menuWidget() {  
256 - return Container(  
257 - margin: EdgeInsets.symmetric(  
258 - horizontal: ScreenUtil().setWidth(40),  
259 - vertical: ScreenUtil().setWidth(20)),  
260 - decoration: BoxDecoration(color: MyColours.color_ffffff, boxShadow: [  
261 - BoxShadow(  
262 - // color: Colors.red,  
263 - color: Color.fromRGBO(220, 220, 220, 1), //投影颜色  
264 - offset: Offset(2, 2), //x,y轴  
265 - blurRadius: ScreenUtil().setWidth(6) //投影距离  
266 - )  
267 - ]),  
268 - child: Row(  
269 - children: [  
270 - Expanded(  
271 - child: Container(  
272 - padding: EdgeInsets.only(bottom: ScreenUtil().setWidth(10)),  
273 - margin:  
274 - EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(30)),  
275 - child: TabBar(  
276 - controller: tabController,  
277 - indicator: CustomTabIndicator(  
278 - radius: 0,  
279 - ),  
280 - indicatorColor: MyColours.color_199095,  
281 - indicatorSize: TabBarIndicatorSize.tab,  
282 - // indicatorPadding: EdgeInsets.symmetric(  
283 - // horizontal: ScreenUtil().setWidth(12)),  
284 - labelColor: MyColours.color_199095,  
285 - labelStyle: TextStyle(  
286 - fontSize: ScreenUtil().setSp(32),  
287 - fontWeight: FontWeight.bold),  
288 - labelPadding: EdgeInsets.zero,  
289 - unselectedLabelStyle: TextStyle(  
290 - fontWeight: FontWeight.normal,  
291 - fontSize: ScreenUtil().setSp(28),  
292 - ),  
293 - unselectedLabelColor: MyColours.color_999999,  
294 - tabs: _tabBarTitle.map((value) {  
295 - return Tab(  
296 - child: Text(value),  
297 - );  
298 - }).toList()),  
299 - )),  
300 - InkWell(  
301 - onTap: () {  
302 - setState(() {  
303 - showFilter = !showFilter;  
304 - });  
305 - if (showFilter) {  
306 - _showFilterDialogFromTop(context, onPressedReset: () {  
307 - Navigator.of(context).pop();  
308 - setState(() {  
309 - showFilter = false;  
310 - });  
311 - }, onPressedComplete: () {  
312 - Navigator.of(context).pop();  
313 - setState(() {  
314 - showFilter = false;  
315 - });  
316 - }, tapWhiteBack: () {  
317 - // Navigator.of(context).pop();  
318 - // setState(() {  
319 - // showFilter = false;  
320 - // });  
321 - });  
322 - }  
323 - },  
324 - child: Container(  
325 - padding: EdgeInsets.only(bottom: ScreenUtil().setWidth(10)),  
326 - margin: EdgeInsets.only(right: ScreenUtil().setWidth(30)),  
327 - width: ScreenUtil().setWidth(100),  
328 - // height: ScreenUtil().setWidth(50),  
329 - child: Row(  
330 - children: [  
331 - Text(  
332 - '筛选',  
333 - style: TextStyle(  
334 - fontSize: ScreenUtil().setSp(28),  
335 - color: MyColours.color_999999),  
336 - ),  
337 - HEmptyView(10),  
338 - Image.asset(  
339 - Utils.getImgPath(  
340 - showFilter ? 'c_arrow_up' : 'c_arrow_down'),  
341 - width: ScreenUtil().setWidth(24),  
342 - // height: ScreenUtil().setWidth(10),  
343 - )  
344 - ],  
345 - )),  
346 - )  
347 - ],  
348 - ));  
349 - } 255 +// Widget _menuWidget() {
  256 +// return Container(
  257 +// margin: EdgeInsets.symmetric(
  258 +// horizontal: ScreenUtil().setWidth(40),
  259 +// vertical: ScreenUtil().setWidth(20)),
  260 +// decoration: BoxDecoration(color: MyColours.color_ffffff, boxShadow: [
  261 +// BoxShadow(
  262 +// // color: Colors.red,
  263 +// color: Color.fromRGBO(220, 220, 220, 1), //投影颜色
  264 +// offset: Offset(2, 2), //x,y轴
  265 +// blurRadius: ScreenUtil().setWidth(6) //投影距离
  266 +// )
  267 +// ]),
  268 +// child: Row(
  269 +// children: [
  270 +// Expanded(
  271 +// child: Container(
  272 +// padding: EdgeInsets.only(bottom: ScreenUtil().setWidth(10)),
  273 +// margin:
  274 +// EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(30)),
  275 +// child: TabBar(
  276 +// controller: tabController,
  277 +// indicator: CustomTabIndicator(
  278 +// radius: 0,
  279 +// ),
  280 +// indicatorColor: MyColours.color_199095,
  281 +// indicatorSize: TabBarIndicatorSize.tab,
  282 +// // indicatorPadding: EdgeInsets.symmetric(
  283 +// // horizontal: ScreenUtil().setWidth(12)),
  284 +// labelColor: MyColours.color_199095,
  285 +// labelStyle: TextStyle(
  286 +// fontSize: ScreenUtil().setSp(32),
  287 +// fontWeight: FontWeight.bold),
  288 +// labelPadding: EdgeInsets.zero,
  289 +// unselectedLabelStyle: TextStyle(
  290 +// fontWeight: FontWeight.normal,
  291 +// fontSize: ScreenUtil().setSp(28),
  292 +// ),
  293 +// unselectedLabelColor: MyColours.color_999999,
  294 +// tabs: _tabBarTitle.map((value) {
  295 +// return Tab(
  296 +// child: Text(value),
  297 +// );
  298 +// }).toList()),
  299 +// )),
  300 +// InkWell(
  301 +// onTap: () {
  302 +// setState(() {
  303 +// showFilter = !showFilter;
  304 +// });
  305 +// if (showFilter) {
  306 +// _showFilterDialogFromTop(context, onPressedReset: () {
  307 +// Navigator.of(context).pop();
  308 +// setState(() {
  309 +// showFilter = false;
  310 +// });
  311 +// }, onPressedComplete: () {
  312 +// Navigator.of(context).pop();
  313 +// setState(() {
  314 +// showFilter = false;
  315 +// });
  316 +// }, tapWhiteBack: () {
  317 +// // Navigator.of(context).pop();
  318 +// // setState(() {
  319 +// // showFilter = false;
  320 +// // });
  321 +// });
  322 +// }
  323 +// },
  324 +// child: Container(
  325 +// padding: EdgeInsets.only(bottom: ScreenUtil().setWidth(10)),
  326 +// margin: EdgeInsets.only(right: ScreenUtil().setWidth(30)),
  327 +// width: ScreenUtil().setWidth(100),
  328 +// // height: ScreenUtil().setWidth(50),
  329 +// child: Row(
  330 +// children: [
  331 +// Text(
  332 +// '筛选',
  333 +// style: TextStyle(
  334 +// fontSize: ScreenUtil().setSp(28),
  335 +// color: MyColours.color_999999),
  336 +// ),
  337 +// HEmptyView(10),
  338 +// Image.asset(
  339 +// Utils.getImgPath(
  340 +// showFilter ? 'c_arrow_up' : 'c_arrow_down'),
  341 +// width: ScreenUtil().setWidth(24),
  342 +// // height: ScreenUtil().setWidth(10),
  343 +// )
  344 +// ],
  345 +// )),
  346 +// )
  347 +// ],
  348 +// ));
  349 +// }
350 350
351 - ///筛选弹框  
352 - _showFilterDialogFromTop(BuildContext context,  
353 - {VoidCallback onPressedReset,  
354 - VoidCallback onPressedComplete,  
355 - GestureTapCallback tapWhiteBack}) {  
356 - showGeneralDialog(  
357 - context: context,  
358 - barrierDismissible: false,  
359 - barrierColor: Colors.transparent,  
360 - barrierLabel:  
361 - MaterialLocalizations.of(context).modalBarrierDismissLabel,  
362 - transitionDuration: const Duration(milliseconds: 150),  
363 - pageBuilder: (BuildContext context, Animation animation,  
364 - Animation secondaryAnimation) {  
365 - return Scaffold(  
366 - backgroundColor: Colors.transparent,  
367 - // resizeToAvoidBottomInset: false,  
368 - body: StatefulBuilder(builder: (context, state) {  
369 - return GestureDetector(  
370 - // behavior: HitTestBehavior.opaque,  
371 - onTap: tapWhiteBack,  
372 - child: _filterWidget(  
373 - state,  
374 - onPressedReset,  
375 - onPressedComplete,  
376 - ));  
377 - }));  
378 - });  
379 - } 351 +// ///筛选弹框
  352 +// _showFilterDialogFromTop(BuildContext context,
  353 +// {VoidCallback onPressedReset,
  354 +// VoidCallback onPressedComplete,
  355 +// GestureTapCallback tapWhiteBack}) {
  356 +// showGeneralDialog(
  357 +// context: context,
  358 +// barrierDismissible: false,
  359 +// barrierColor: Colors.transparent,
  360 +// barrierLabel:
  361 +// MaterialLocalizations.of(context).modalBarrierDismissLabel,
  362 +// transitionDuration: const Duration(milliseconds: 150),
  363 +// pageBuilder: (BuildContext context, Animation animation,
  364 +// Animation secondaryAnimation) {
  365 +// return Scaffold(
  366 +// backgroundColor: Colors.transparent,
  367 +// // resizeToAvoidBottomInset: false,
  368 +// body: StatefulBuilder(builder: (context, state) {
  369 +// return GestureDetector(
  370 +// // behavior: HitTestBehavior.opaque,
  371 +// onTap: tapWhiteBack,
  372 +// child: _filterWidget(
  373 +// state,
  374 +// onPressedReset,
  375 +// onPressedComplete,
  376 +// ));
  377 +// }));
  378 +// });
  379 +// }
380 380
381 - ///弹框text  
382 - _textWidget(String title, Color textColor, FontWeight fontWeight, int size) {  
383 - return Text(title,  
384 - style: TextStyle(  
385 - color: textColor,  
386 - decoration: TextDecoration.none,  
387 - fontWeight: fontWeight,  
388 - fontSize: ScreenUtil().setSp(size)));  
389 - } 381 +// ///弹框text
  382 +// _textWidget(String title, Color textColor, FontWeight fontWeight, int size) {
  383 +// return Text(title,
  384 +// style: TextStyle(
  385 +// color: textColor,
  386 +// decoration: TextDecoration.none,
  387 +// fontWeight: fontWeight,
  388 +// fontSize: ScreenUtil().setSp(size)));
  389 +// }
390 390
391 - ///客户经理  
392 - Widget _managerWidget() {  
393 - return Column(  
394 - crossAxisAlignment: CrossAxisAlignment.start,  
395 - children: [  
396 - Row(  
397 - mainAxisAlignment: MainAxisAlignment.spaceBetween,  
398 - children: [  
399 - _textWidget('客户经理', MyColours.color_333333, FontWeight.bold, 28),  
400 - GestureDetector(  
401 - onTap: () {},  
402 - child: _textWidget(  
403 - '全选', MyColours.color_199095, FontWeight.normal, 24),  
404 - )  
405 - ],  
406 - ),  
407 - VEmptyView(30),  
408 - Wrap(  
409 - spacing: ScreenUtil().setWidth(20),  
410 - runSpacing: ScreenUtil().setWidth(20),  
411 - children: _buildFilterItem([  
412 - {'title': 'kkkk', 'select': false},  
413 - {'title': 'kkkk', 'select': true},  
414 - {'title': 'kkkk', 'select': true},  
415 - {'title': 'kkkk', 'select': true},  
416 - {'title': 'k', 'select': true},  
417 - {'title': 'kkkk', 'select': true},  
418 - {'title': 'kkkk', 'select': true},  
419 - {'title': 'k', 'select': true},  
420 - {'title': 'kdsfjsfsdfhjsdfh', 'select': true},  
421 - {'title': 'kkkk', 'select': true},  
422 - ], false)),  
423 - ],  
424 - );  
425 - } 391 +// ///客户经理
  392 +// Widget _managerWidget() {
  393 +// return Column(
  394 +// crossAxisAlignment: CrossAxisAlignment.start,
  395 +// children: [
  396 +// Row(
  397 +// mainAxisAlignment: MainAxisAlignment.spaceBetween,
  398 +// children: [
  399 +// _textWidget('客户经理', MyColours.color_333333, FontWeight.bold, 28),
  400 +// GestureDetector(
  401 +// onTap: () {},
  402 +// child: _textWidget(
  403 +// '全选', MyColours.color_199095, FontWeight.normal, 24),
  404 +// )
  405 +// ],
  406 +// ),
  407 +// VEmptyView(30),
  408 +// Wrap(
  409 +// spacing: ScreenUtil().setWidth(20),
  410 +// runSpacing: ScreenUtil().setWidth(20),
  411 +// children: _buildFilterItem([
  412 +// {'title': 'kkkk', 'select': false},
  413 +// {'title': 'kkkk', 'select': true},
  414 +// {'title': 'kkkk', 'select': true},
  415 +// {'title': 'kkkk', 'select': true},
  416 +// {'title': 'k', 'select': true},
  417 +// {'title': 'kkkk', 'select': true},
  418 +// {'title': 'kkkk', 'select': true},
  419 +// {'title': 'k', 'select': true},
  420 +// {'title': 'kdsfjsfsdfhjsdfh', 'select': true},
  421 +// {'title': 'kkkk', 'select': true},
  422 +// ], false)),
  423 +// ],
  424 +// );
  425 +// }
426 426
427 - ///活跃度  
428 - Widget _activityWidget() {  
429 - return Column(  
430 - crossAxisAlignment: CrossAxisAlignment.start,  
431 - children: [  
432 - Row(  
433 - mainAxisAlignment: MainAxisAlignment.spaceBetween,  
434 - children: [  
435 - _textWidget('活跃度', MyColours.color_333333, FontWeight.bold, 28),  
436 - GestureDetector(  
437 - onTap: () {},  
438 - child: _textWidget(  
439 - '全选', MyColours.color_199095, FontWeight.normal, 24),  
440 - )  
441 - ],  
442 - ),  
443 - VEmptyView(30),  
444 - Wrap(  
445 - spacing: ScreenUtil().setWidth(20),  
446 - runSpacing: ScreenUtil().setWidth(20),  
447 - children: _buildFilterItem([  
448 - {'title': 'kkkk', 'select': false},  
449 - {'title': 'kkkk', 'select': true},  
450 - {'title': 'kkkk', 'select': true},  
451 - {'title': 'kkkk', 'select': true},  
452 - {'title': 'k', 'select': true},  
453 - {'title': 'kkkk', 'select': true},  
454 - {'title': 'kkkk', 'select': true},  
455 - {'title': 'k', 'select': true},  
456 - {'title': 'kdsfjsfsdfhjsdfh', 'select': true},  
457 - {'title': 'kkkk', 'select': true},  
458 - ], false)),  
459 - ],  
460 - );  
461 - } 427 +// ///活跃度
  428 +// Widget _activityWidget() {
  429 +// return Column(
  430 +// crossAxisAlignment: CrossAxisAlignment.start,
  431 +// children: [
  432 +// Row(
  433 +// mainAxisAlignment: MainAxisAlignment.spaceBetween,
  434 +// children: [
  435 +// _textWidget('活跃度', MyColours.color_333333, FontWeight.bold, 28),
  436 +// GestureDetector(
  437 +// onTap: () {},
  438 +// child: _textWidget(
  439 +// '全选', MyColours.color_199095, FontWeight.normal, 24),
  440 +// )
  441 +// ],
  442 +// ),
  443 +// VEmptyView(30),
  444 +// Wrap(
  445 +// spacing: ScreenUtil().setWidth(20),
  446 +// runSpacing: ScreenUtil().setWidth(20),
  447 +// children: _buildFilterItem([
  448 +// {'title': 'kkkk', 'select': false},
  449 +// {'title': 'kkkk', 'select': true},
  450 +// {'title': 'kkkk', 'select': true},
  451 +// {'title': 'kkkk', 'select': true},
  452 +// {'title': 'k', 'select': true},
  453 +// {'title': 'kkkk', 'select': true},
  454 +// {'title': 'kkkk', 'select': true},
  455 +// {'title': 'k', 'select': true},
  456 +// {'title': 'kdsfjsfsdfhjsdfh', 'select': true},
  457 +// {'title': 'kkkk', 'select': true},
  458 +// ], false)),
  459 +// ],
  460 +// );
  461 +// }
462 462
463 - ///自定义标签  
464 - Widget _labelWidget() {  
465 - return Column(  
466 - crossAxisAlignment: CrossAxisAlignment.start,  
467 - children: [  
468 - Row(  
469 - mainAxisAlignment: MainAxisAlignment.spaceBetween,  
470 - children: [  
471 - _textWidget('自定义标签', MyColours.color_333333, FontWeight.bold, 28),  
472 - GestureDetector(  
473 - onTap: () {},  
474 - child: _textWidget(  
475 - '全选', MyColours.color_199095, FontWeight.normal, 24),  
476 - )  
477 - ],  
478 - ),  
479 - VEmptyView(30),  
480 - Wrap(  
481 - spacing: ScreenUtil().setWidth(20),  
482 - runSpacing: ScreenUtil().setWidth(20),  
483 - children: _buildFilterItem([  
484 - {'title': 'kkkk', 'select': false},  
485 - {'title': 'kkkk', 'select': true},  
486 - {'title': 'kkkk', 'select': true},  
487 - {'title': 'kkkk', 'select': true},  
488 - {'title': 'k', 'select': true},  
489 - {'title': 'kkkk', 'select': true},  
490 - {'title': 'kkkk', 'select': true},  
491 - {'title': 'k', 'select': true},  
492 - {'title': 'kdsfjsfsdfhjsdfh', 'select': false},  
493 - {'title': 'kkkk', 'select': true},  
494 - ], true)),  
495 - ],  
496 - );  
497 - } 463 +// ///自定义标签
  464 +// Widget _labelWidget() {
  465 +// return Column(
  466 +// crossAxisAlignment: CrossAxisAlignment.start,
  467 +// children: [
  468 +// Row(
  469 +// mainAxisAlignment: MainAxisAlignment.spaceBetween,
  470 +// children: [
  471 +// _textWidget('自定义标签', MyColours.color_333333, FontWeight.bold, 28),
  472 +// GestureDetector(
  473 +// onTap: () {},
  474 +// child: _textWidget(
  475 +// '全选', MyColours.color_199095, FontWeight.normal, 24),
  476 +// )
  477 +// ],
  478 +// ),
  479 +// VEmptyView(30),
  480 +// Wrap(
  481 +// spacing: ScreenUtil().setWidth(20),
  482 +// runSpacing: ScreenUtil().setWidth(20),
  483 +// children: _buildFilterItem([
  484 +// {'title': 'kkkk', 'select': false},
  485 +// {'title': 'kkkk', 'select': true},
  486 +// {'title': 'kkkk', 'select': true},
  487 +// {'title': 'kkkk', 'select': true},
  488 +// {'title': 'k', 'select': true},
  489 +// {'title': 'kkkk', 'select': true},
  490 +// {'title': 'kkkk', 'select': true},
  491 +// {'title': 'k', 'select': true},
  492 +// {'title': 'kdsfjsfsdfhjsdfh', 'select': false},
  493 +// {'title': 'kkkk', 'select': true},
  494 +// ], true)),
  495 +// ],
  496 +// );
  497 +// }
498 498
499 - ///大于、等于、小于  
500 - List<DropdownMenuItem> _dropdownMenuItem() {  
501 - List<DropdownMenuItem> list = [];  
502 - for (int i = 0; i < timeTilte.length; i++) {  
503 - list.add(DropdownMenuItem(  
504 - child: _textWidget(  
505 - timeTilte[i], MyColours.color_199095, FontWeight.normal, 24),  
506 - value: i));  
507 - }  
508 - return list;  
509 - } 499 +// ///大于、等于、小于
  500 +// List<DropdownMenuItem> _dropdownMenuItem() {
  501 +// List<DropdownMenuItem> list = [];
  502 +// for (int i = 0; i < timeTilte.length; i++) {
  503 +// list.add(DropdownMenuItem(
  504 +// child: _textWidget(
  505 +// timeTilte[i], MyColours.color_199095, FontWeight.normal, 24),
  506 +// value: i));
  507 +// }
  508 +// return list;
  509 +// }
510 510
511 - _selectWidget(List<String> data, ClickCallback onTap) {  
512 - return Container(  
513 - decoration: BoxDecoration(  
514 - color: MyColours.color_ffffff,  
515 - borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10)),  
516 - border: Border.all(  
517 - color: MyColours.color_cccccc,  
518 - width: ScreenUtil().setWidth(2))),  
519 - width: ScreenUtil().setWidth(130 * 2),  
520 - // constraints: BoxConstraints(  
521 - // maxHeight: ScreenUtil().setWidth(130 * 2),  
522 - // ),  
523 - child: ListView.builder(  
524 - shrinkWrap: true,  
525 - padding: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(8)),  
526 - itemCount: data.length,  
527 - itemBuilder: (context, index) {  
528 - return InkWell(  
529 - onTap: () {  
530 - onTap(index);  
531 - },  
532 - child: Container(  
533 - padding:  
534 - EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(20)),  
535 - decoration: BoxDecoration(  
536 - border: Border(  
537 - bottom: BorderSide(  
538 - color: MyColours.color_efefef,  
539 - width: data.length - 1 == index  
540 - ? 0  
541 - : ScreenUtil().setWidth(2)))),  
542 - child: Text(data[index],  
543 - style: TextStyle(  
544 - color: MyColours.color_199095,  
545 - fontWeight: FontWeight.bold,  
546 - fontSize: ScreenUtil().setSp(28))),  
547 - ),  
548 - );  
549 - }));  
550 - } 511 +// _selectWidget(List<String> data, ClickCallback onTap) {
  512 +// return Container(
  513 +// decoration: BoxDecoration(
  514 +// color: MyColours.color_ffffff,
  515 +// borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10)),
  516 +// border: Border.all(
  517 +// color: MyColours.color_cccccc,
  518 +// width: ScreenUtil().setWidth(2))),
  519 +// width: ScreenUtil().setWidth(130 * 2),
  520 +// // constraints: BoxConstraints(
  521 +// // maxHeight: ScreenUtil().setWidth(130 * 2),
  522 +// // ),
  523 +// child: ListView.builder(
  524 +// shrinkWrap: true,
  525 +// padding: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(8)),
  526 +// itemCount: data.length,
  527 +// itemBuilder: (context, index) {
  528 +// return InkWell(
  529 +// onTap: () {
  530 +// onTap(index);
  531 +// },
  532 +// child: Container(
  533 +// padding:
  534 +// EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(20)),
  535 +// decoration: BoxDecoration(
  536 +// border: Border(
  537 +// bottom: BorderSide(
  538 +// color: MyColours.color_efefef,
  539 +// width: data.length - 1 == index
  540 +// ? 0
  541 +// : ScreenUtil().setWidth(2)))),
  542 +// child: Text(data[index],
  543 +// style: TextStyle(
  544 +// color: MyColours.color_199095,
  545 +// fontWeight: FontWeight.bold,
  546 +// fontSize: ScreenUtil().setSp(28))),
  547 +// ),
  548 +// );
  549 +// }));
  550 +// }
551 551
552 - ///高级筛选  
553 - Widget _advancedFilterWidget(state) {  
554 - return Column(  
555 - crossAxisAlignment: CrossAxisAlignment.start,  
556 - children: [  
557 - Row(  
558 - mainAxisAlignment: MainAxisAlignment.spaceBetween,  
559 - children: [  
560 - _textWidget('高级筛选', MyColours.color_333333, FontWeight.bold, 28),  
561 - GestureDetector(  
562 - onTap: () {},  
563 - child: _textWidget(  
564 - '清空', MyColours.color_199095, FontWeight.normal, 24),  
565 - )  
566 - ],  
567 - ),  
568 - VEmptyView(30),  
569 - Row(  
570 - children: [  
571 - Expanded(child: _textFeildWidget()),  
572 - HEmptyView(10),  
573 - _textWidget('至', MyColours.color_199095, FontWeight.normal, 24),  
574 - HEmptyView(10),  
575 - Expanded(child: _textFeildWidget()),  
576 - ],  
577 - ),  
578 - VEmptyView(30),  
579 - Wrap(  
580 - spacing: ScreenUtil().setWidth(20),  
581 - runSpacing: ScreenUtil().setWidth(20),  
582 - children: _buildFilterItem([  
583 - {'title': '7天', 'select': true},  
584 - {'title': '30天', 'select': true},  
585 - {'title': '60天', 'select': true},  
586 - {'title': '120天', 'select': true},  
587 - ], true, grayBack: true)),  
588 - VEmptyView(30),  
589 - _textWidget('时间内预订次数', MyColours.color_333333, FontWeight.normal, 24),  
590 - VEmptyView(30),  
591 - /**  
592 - Column(crossAxisAlignment: CrossAxisAlignment.start, children: [  
593 - Material(  
594 - child: Container(  
595 - height: ScreenUtil().setWidth(50),  
596 - width: ScreenUtil().setWidth(130),  
597 - decoration: BoxDecoration(  
598 - borderRadius:  
599 - BorderRadius.circular(ScreenUtil().setWidth(30)),  
600 - color: Color.fromRGBO(239, 239, 239, 1)),  
601 - child: _buttonChoose(dropValue, (value) {  
602 - state(() {  
603 - showDrop = !showDrop;  
604 - _scrollCrl.jumpTo(_scrollCrl.position.maxScrollExtent);  
605 - }); 552 +// ///高级筛选
  553 +// Widget _advancedFilterWidget(state) {
  554 +// return Column(
  555 +// crossAxisAlignment: CrossAxisAlignment.start,
  556 +// children: [
  557 +// Row(
  558 +// mainAxisAlignment: MainAxisAlignment.spaceBetween,
  559 +// children: [
  560 +// _textWidget('高级筛选', MyColours.color_333333, FontWeight.bold, 28),
  561 +// GestureDetector(
  562 +// onTap: () {},
  563 +// child: _textWidget(
  564 +// '清空', MyColours.color_199095, FontWeight.normal, 24),
  565 +// )
  566 +// ],
  567 +// ),
  568 +// VEmptyView(30),
  569 +// Row(
  570 +// children: [
  571 +// Expanded(child: _textFeildWidget()),
  572 +// HEmptyView(10),
  573 +// _textWidget('至', MyColours.color_199095, FontWeight.normal, 24),
  574 +// HEmptyView(10),
  575 +// Expanded(child: _textFeildWidget()),
  576 +// ],
  577 +// ),
  578 +// VEmptyView(30),
  579 +// Wrap(
  580 +// spacing: ScreenUtil().setWidth(20),
  581 +// runSpacing: ScreenUtil().setWidth(20),
  582 +// children: _buildFilterItem([
  583 +// {'title': '7天', 'select': true},
  584 +// {'title': '30天', 'select': true},
  585 +// {'title': '60天', 'select': true},
  586 +// {'title': '120天', 'select': true},
  587 +// ], true, grayBack: true)),
  588 +// VEmptyView(30),
  589 +// _textWidget('时间内预订次数', MyColours.color_333333, FontWeight.normal, 24),
  590 +// VEmptyView(30),
  591 +// /**
  592 +// Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
  593 +// Material(
  594 +// child: Container(
  595 +// height: ScreenUtil().setWidth(50),
  596 +// width: ScreenUtil().setWidth(130),
  597 +// decoration: BoxDecoration(
  598 +// borderRadius:
  599 +// BorderRadius.circular(ScreenUtil().setWidth(30)),
  600 +// color: Color.fromRGBO(239, 239, 239, 1)),
  601 +// child: _buttonChoose(dropValue, (value) {
  602 +// state(() {
  603 +// showDrop = !showDrop;
  604 +// _scrollCrl.jumpTo(_scrollCrl.position.maxScrollExtent);
  605 +// });
606 606
607 - // _scrollCrl.position  
608 - // .didUpdateScrollPositionBy(2); //这里触发更新滚动条  
609 - }))),  
610 - VEmptyView(10),  
611 - Material(  
612 - child: Offstage(  
613 - offstage: showDrop,  
614 - child: _selectWidget(timeTilte, (index) {  
615 - print(timeTilte[index]);  
616 - state(() {  
617 - showDrop = !showDrop;  
618 - // _provider.currentIndex = index;  
619 - dropValue = timeTilte[index];  
620 - });  
621 - }),  
622 - )),  
623 - ]),  
624 - VEmptyView(50),  
625 - */  
626 - Row(children: [  
627 - Material(  
628 - child: Container(  
629 - height: ScreenUtil().setWidth(50),  
630 - // width: ScreenUtil().setWidth(100),  
631 - padding: EdgeInsets.symmetric(  
632 - horizontal: ScreenUtil().setWidth(20)),  
633 - decoration: BoxDecoration(  
634 - borderRadius:  
635 - BorderRadius.circular(ScreenUtil().setWidth(30)),  
636 - color: Color.fromRGBO(239, 239, 239, 1)),  
637 - child: DropdownButton(  
638 - underline: SizedBox(),  
639 - value: dropValue,  
640 - isDense: true,  
641 - style: TextStyle(  
642 - color: MyColours.color_333333,  
643 - fontSize: ScreenUtil().setSp(28)),  
644 - focusColor: MyColours.color_199095,  
645 - items: _dropdownMenuItem(),  
646 - icon: Row(  
647 - children: [  
648 - HEmptyView(10),  
649 - Image.asset(  
650 - Utils.getImgPath('c_arrow_down'),  
651 - width: ScreenUtil().setWidth(24),  
652 - // height: ScreenUtil().setWidth(10),  
653 - )  
654 - ],  
655 - ),  
656 - onChanged: (value) {  
657 - print(value);  
658 - state(() => dropValue = value);  
659 - }))),  
660 - HEmptyView(20),  
661 - Container(  
662 - // padding: EdgeInsets.symmetric(  
663 - // horizontal: ScreenUtil().setWidth(20),  
664 - // ),  
665 - width: ScreenUtil().setWidth(160),  
666 - height: ScreenUtil().setWidth(50),  
667 - // alignment: Alignment.center,  
668 - decoration: BoxDecoration(  
669 - border: Border(  
670 - bottom: BorderSide(  
671 - color: Color.fromRGBO(180, 180, 180, 1),  
672 - width: ScreenUtil().setWidth(2))),  
673 - ),  
674 - child: Material(  
675 - color: MyColours.color_ffffff,  
676 - child: TextField(  
677 - maxLines: 1,  
678 - controller: customerProvider.controller,  
679 - // focusNode: _focusNode,  
680 - // autofocus: true, 607 +// // _scrollCrl.position
  608 +// // .didUpdateScrollPositionBy(2); //这里触发更新滚动条
  609 +// }))),
  610 +// VEmptyView(10),
  611 +// Material(
  612 +// child: Offstage(
  613 +// offstage: showDrop,
  614 +// child: _selectWidget(timeTilte, (index) {
  615 +// print(timeTilte[index]);
  616 +// state(() {
  617 +// showDrop = !showDrop;
  618 +// // _provider.currentIndex = index;
  619 +// dropValue = timeTilte[index];
  620 +// });
  621 +// }),
  622 +// )),
  623 +// ]),
  624 +// VEmptyView(50),
  625 +// */
  626 +// Row(children: [
  627 +// Material(
  628 +// child: Container(
  629 +// height: ScreenUtil().setWidth(50),
  630 +// // width: ScreenUtil().setWidth(100),
  631 +// padding: EdgeInsets.symmetric(
  632 +// horizontal: ScreenUtil().setWidth(20)),
  633 +// decoration: BoxDecoration(
  634 +// borderRadius:
  635 +// BorderRadius.circular(ScreenUtil().setWidth(30)),
  636 +// color: Color.fromRGBO(239, 239, 239, 1)),
  637 +// child: DropdownButton(
  638 +// underline: SizedBox(),
  639 +// value: dropValue,
  640 +// isDense: true,
  641 +// style: TextStyle(
  642 +// color: MyColours.color_333333,
  643 +// fontSize: ScreenUtil().setSp(28)),
  644 +// focusColor: MyColours.color_199095,
  645 +// items: _dropdownMenuItem(),
  646 +// icon: Row(
  647 +// children: [
  648 +// HEmptyView(10),
  649 +// Image.asset(
  650 +// Utils.getImgPath('c_arrow_down'),
  651 +// width: ScreenUtil().setWidth(24),
  652 +// // height: ScreenUtil().setWidth(10),
  653 +// )
  654 +// ],
  655 +// ),
  656 +// onChanged: (value) {
  657 +// print(value);
  658 +// state(() => dropValue = value);
  659 +// }))),
  660 +// HEmptyView(20),
  661 +// Container(
  662 +// // padding: EdgeInsets.symmetric(
  663 +// // horizontal: ScreenUtil().setWidth(20),
  664 +// // ),
  665 +// width: ScreenUtil().setWidth(160),
  666 +// height: ScreenUtil().setWidth(50),
  667 +// // alignment: Alignment.center,
  668 +// decoration: BoxDecoration(
  669 +// border: Border(
  670 +// bottom: BorderSide(
  671 +// color: Color.fromRGBO(180, 180, 180, 1),
  672 +// width: ScreenUtil().setWidth(2))),
  673 +// ),
  674 +// child: Material(
  675 +// color: MyColours.color_ffffff,
  676 +// child: TextField(
  677 +// maxLines: 1,
  678 +// controller: customerProvider.controller,
  679 +// // focusNode: _focusNode,
  680 +// // autofocus: true,
681 681
682 - style: TextStyle(  
683 - color: MyColours.color_333333,  
684 - fontSize: ScreenUtil().setSp(26)),  
685 - // textAlignVertical: TextAlignVertical.center,  
686 - decoration: InputDecoration(  
687 - // hintText: "xxx",  
688 - hintStyle: TextStyle(  
689 - color: MyColours.color_999999,  
690 - fontSize: ScreenUtil().setSp(26),  
691 - ),  
692 - // isCollapsed:  
693 - // true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度  
694 - border: OutlineInputBorder(borderSide: BorderSide.none),  
695 - contentPadding: EdgeInsets.zero,  
696 - ),  
697 - keyboardType: TextInputType.text,  
698 - textInputAction: TextInputAction.done, 682 +// style: TextStyle(
  683 +// color: MyColours.color_333333,
  684 +// fontSize: ScreenUtil().setSp(26)),
  685 +// // textAlignVertical: TextAlignVertical.center,
  686 +// decoration: InputDecoration(
  687 +// // hintText: "xxx",
  688 +// hintStyle: TextStyle(
  689 +// color: MyColours.color_999999,
  690 +// fontSize: ScreenUtil().setSp(26),
  691 +// ),
  692 +// // isCollapsed:
  693 +// // true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
  694 +// border: OutlineInputBorder(borderSide: BorderSide.none),
  695 +// contentPadding: EdgeInsets.zero,
  696 +// ),
  697 +// keyboardType: TextInputType.text,
  698 +// textInputAction: TextInputAction.done,
699 699
700 - onChanged: (value) {  
701 - // setState(() {});  
702 - // _searchSellerLocation();  
703 - customerProvider.searchData(value);  
704 - },  
705 - onEditingComplete: () {  
706 - FocusScope.of(context)  
707 - .requestFocus(FocusNode()); //点击空白处隐藏键盘  
708 - // contantShowModel.searchData(  
709 - // contantShowModel.controller.text);  
710 - // _searchSellerLocation();  
711 - // _focusNode.unfocus();  
712 - },  
713 - ),  
714 - )),  
715 - HEmptyView(20),  
716 - _textWidget('次预订', MyColours.color_333333, FontWeight.normal, 24),  
717 - ]),  
718 - VEmptyView(30),  
719 - ],  
720 - );  
721 - } 700 +// onChanged: (value) {
  701 +// // setState(() {});
  702 +// // _searchSellerLocation();
  703 +// customerProvider.searchData(value);
  704 +// },
  705 +// onEditingComplete: () {
  706 +// FocusScope.of(context)
  707 +// .requestFocus(FocusNode()); //点击空白处隐藏键盘
  708 +// // contantShowModel.searchData(
  709 +// // contantShowModel.controller.text);
  710 +// // _searchSellerLocation();
  711 +// // _focusNode.unfocus();
  712 +// },
  713 +// ),
  714 +// )),
  715 +// HEmptyView(20),
  716 +// _textWidget('次预订', MyColours.color_333333, FontWeight.normal, 24),
  717 +// ]),
  718 +// VEmptyView(30),
  719 +// ],
  720 +// );
  721 +// }
722 722
723 - _buttonChoose(String title, ClickCallback callback) {  
724 - return InkWell(  
725 - onTap: () {  
726 - callback(title);  
727 - },  
728 - child: Container(  
729 - padding: EdgeInsets.symmetric(  
730 - horizontal: ScreenUtil().setWidth(20),  
731 - vertical: ScreenUtil().setWidth(10)),  
732 - height: ScreenUtil().setWidth(60),  
733 - decoration: BoxDecoration(  
734 - // border: Border.all(  
735 - // width: ScreenUtil().setWidth(2),  
736 - // color: MyColours.color_199095),  
737 - borderRadius: BorderRadius.circular(ScreenUtil().setWidth(30))),  
738 - child: Row(  
739 - children: [  
740 - Text(  
741 - title,  
742 - style: TextStyle(  
743 - color: title == '时间(选填)' || title == '(选填)'  
744 - ? MyColours.color_999999  
745 - : MyColours.color_199095,  
746 - fontSize: ScreenUtil().setWidth(28)),  
747 - ),  
748 - HEmptyView(10),  
749 - Image.asset(  
750 - Utils.getImgPath('enter_order_arrow'),  
751 - width: ScreenUtil().setWidth(20),  
752 - height: ScreenUtil().setWidth(10),  
753 - )  
754 - ],  
755 - )));  
756 - } 723 +// _buttonChoose(String title, ClickCallback callback) {
  724 +// return InkWell(
  725 +// onTap: () {
  726 +// callback(title);
  727 +// },
  728 +// child: Container(
  729 +// padding: EdgeInsets.symmetric(
  730 +// horizontal: ScreenUtil().setWidth(20),
  731 +// vertical: ScreenUtil().setWidth(10)),
  732 +// height: ScreenUtil().setWidth(60),
  733 +// decoration: BoxDecoration(
  734 +// // border: Border.all(
  735 +// // width: ScreenUtil().setWidth(2),
  736 +// // color: MyColours.color_199095),
  737 +// borderRadius: BorderRadius.circular(ScreenUtil().setWidth(30))),
  738 +// child: Row(
  739 +// children: [
  740 +// Text(
  741 +// title,
  742 +// style: TextStyle(
  743 +// color: title == '时间(选填)' || title == '(选填)'
  744 +// ? MyColours.color_999999
  745 +// : MyColours.color_199095,
  746 +// fontSize: ScreenUtil().setWidth(28)),
  747 +// ),
  748 +// HEmptyView(10),
  749 +// Image.asset(
  750 +// Utils.getImgPath('enter_order_arrow'),
  751 +// width: ScreenUtil().setWidth(20),
  752 +// height: ScreenUtil().setWidth(10),
  753 +// )
  754 +// ],
  755 +// )));
  756 +// }
757 757
758 - /// 高级筛选输入框  
759 - Widget _textFeildWidget() {  
760 - return Container(  
761 - padding: EdgeInsets.symmetric(  
762 - horizontal: ScreenUtil().setWidth(20),  
763 - ),  
764 - height: ScreenUtil().setWidth(50),  
765 - // alignment: Alignment.center,  
766 - decoration: BoxDecoration(  
767 - color: Color.fromRGBO(239, 239, 239, 1),  
768 - borderRadius: BorderRadius.circular(ScreenUtil().setWidth(30))),  
769 - child: Material(  
770 - color: Color.fromRGBO(239, 239, 239, 1),  
771 - child: Row(children: [  
772 - Expanded(  
773 - child: TextField(  
774 - maxLines: 1,  
775 - controller: customerProvider.controller,  
776 - // focusNode: _focusNode,  
777 - // autofocus: true, 758 +// /// 高级筛选输入框
  759 +// Widget _textFeildWidget() {
  760 +// return Container(
  761 +// padding: EdgeInsets.symmetric(
  762 +// horizontal: ScreenUtil().setWidth(20),
  763 +// ),
  764 +// height: ScreenUtil().setWidth(50),
  765 +// // alignment: Alignment.center,
  766 +// decoration: BoxDecoration(
  767 +// color: Color.fromRGBO(239, 239, 239, 1),
  768 +// borderRadius: BorderRadius.circular(ScreenUtil().setWidth(30))),
  769 +// child: Material(
  770 +// color: Color.fromRGBO(239, 239, 239, 1),
  771 +// child: Row(children: [
  772 +// Expanded(
  773 +// child: TextField(
  774 +// maxLines: 1,
  775 +// controller: customerProvider.controller,
  776 +// // focusNode: _focusNode,
  777 +// // autofocus: true,
778 778
779 - style: TextStyle(  
780 - color: MyColours.color_333333,  
781 - fontSize: ScreenUtil().setSp(26)),  
782 - // textAlignVertical: TextAlignVertical.center,  
783 - decoration: InputDecoration(  
784 - hintText: "xxx",  
785 - hintStyle: TextStyle(  
786 - color: MyColours.color_999999,  
787 - fontSize: ScreenUtil().setSp(26),  
788 - ),  
789 - // isCollapsed:  
790 - // true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度  
791 - border: OutlineInputBorder(borderSide: BorderSide.none),  
792 - contentPadding: EdgeInsets.zero,  
793 - ),  
794 - keyboardType: TextInputType.text,  
795 - textInputAction: TextInputAction.done, 779 +// style: TextStyle(
  780 +// color: MyColours.color_333333,
  781 +// fontSize: ScreenUtil().setSp(26)),
  782 +// // textAlignVertical: TextAlignVertical.center,
  783 +// decoration: InputDecoration(
  784 +// hintText: "xxx",
  785 +// hintStyle: TextStyle(
  786 +// color: MyColours.color_999999,
  787 +// fontSize: ScreenUtil().setSp(26),
  788 +// ),
  789 +// // isCollapsed:
  790 +// // true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
  791 +// border: OutlineInputBorder(borderSide: BorderSide.none),
  792 +// contentPadding: EdgeInsets.zero,
  793 +// ),
  794 +// keyboardType: TextInputType.text,
  795 +// textInputAction: TextInputAction.done,
796 796
797 - onChanged: (value) {  
798 - // setState(() {});  
799 - // _searchSellerLocation();  
800 - customerProvider.searchData(value);  
801 - },  
802 - onEditingComplete: () {  
803 - FocusScope.of(context)  
804 - .requestFocus(FocusNode()); //点击空白处隐藏键盘  
805 - // contantShowModel.searchData(  
806 - // contantShowModel.controller.text);  
807 - // _searchSellerLocation();  
808 - // _focusNode.unfocus();  
809 - },  
810 - ),  
811 - ),  
812 - _textWidget('天', MyColours.color_333333, FontWeight.normal, 24),  
813 - ])));  
814 - } 797 +// onChanged: (value) {
  798 +// // setState(() {});
  799 +// // _searchSellerLocation();
  800 +// customerProvider.searchData(value);
  801 +// },
  802 +// onEditingComplete: () {
  803 +// FocusScope.of(context)
  804 +// .requestFocus(FocusNode()); //点击空白处隐藏键盘
  805 +// // contantShowModel.searchData(
  806 +// // contantShowModel.controller.text);
  807 +// // _searchSellerLocation();
  808 +// // _focusNode.unfocus();
  809 +// },
  810 +// ),
  811 +// ),
  812 +// _textWidget('天', MyColours.color_333333, FontWeight.normal, 24),
  813 +// ])));
  814 +// }
815 815
816 - ///筛选布局  
817 - Widget _filterWidget(  
818 - StateSetter state,  
819 - VoidCallback onPressedReset,  
820 - VoidCallback onPressedComplete,  
821 - ) {  
822 - return Container(  
823 - padding: EdgeInsets.symmetric(  
824 - // horizontal: ScreenUtil().setWidth(30),  
825 - ),  
826 - // height: ScreenUtil().setWidth(100),  
827 - margin: EdgeInsets.only(  
828 - top: ScreenUtil().setWidth(92 + 52 + 30 * 3 + 90) +  
829 - ScreenUtil.statusBarHeight),  
830 - color: Color.fromRGBO(00, 00, 00, 0.49),  
831 - child: Align(  
832 - alignment: Alignment.topCenter,  
833 - child: Container(  
834 - decoration: BoxDecoration(  
835 - color: MyColours.color_ffffff,  
836 - borderRadius: BorderRadius.only(  
837 - bottomRight: Radius.circular(ScreenUtil().setWidth(20)),  
838 - bottomLeft: Radius.circular(ScreenUtil().setWidth(20)))),  
839 - margin: EdgeInsets.only(  
840 - left: ScreenUtil().setWidth(40),  
841 - bottom: ScreenUtil().setWidth(140),  
842 - right: ScreenUtil().setWidth(40)),  
843 - padding:  
844 - EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(40)),  
845 - child: Column(  
846 - children: [  
847 - Expanded(  
848 - child: Scrollbar(  
849 - isAlwaysShown: true, //设置滚动条常亮  
850 - controller: _scrollCrl, //必须设置一个controller 816 +// ///筛选布局
  817 +// Widget _filterWidget(
  818 +// StateSetter state,
  819 +// VoidCallback onPressedReset,
  820 +// VoidCallback onPressedComplete,
  821 +// ) {
  822 +// return Container(
  823 +// padding: EdgeInsets.symmetric(
  824 +// // horizontal: ScreenUtil().setWidth(30),
  825 +// ),
  826 +// // height: ScreenUtil().setWidth(100),
  827 +// margin: EdgeInsets.only(
  828 +// top: ScreenUtil().setWidth(92 + 52 + 30 * 3 + 90) +
  829 +// ScreenUtil.statusBarHeight),
  830 +// color: Color.fromRGBO(00, 00, 00, 0.49),
  831 +// child: Align(
  832 +// alignment: Alignment.topCenter,
  833 +// child: Container(
  834 +// decoration: BoxDecoration(
  835 +// color: MyColours.color_ffffff,
  836 +// borderRadius: BorderRadius.only(
  837 +// bottomRight: Radius.circular(ScreenUtil().setWidth(20)),
  838 +// bottomLeft: Radius.circular(ScreenUtil().setWidth(20)))),
  839 +// margin: EdgeInsets.only(
  840 +// left: ScreenUtil().setWidth(40),
  841 +// bottom: ScreenUtil().setWidth(140),
  842 +// right: ScreenUtil().setWidth(40)),
  843 +// padding:
  844 +// EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(40)),
  845 +// child: Column(
  846 +// children: [
  847 +// Expanded(
  848 +// child: Scrollbar(
  849 +// isAlwaysShown: true, //设置滚动条常亮
  850 +// controller: _scrollCrl, //必须设置一个controller
851 851
852 - ///添加进度条  
853 - child: SingleChildScrollView(  
854 - controller: _scrollCrl,  
855 - // primary: true,  
856 - // reverse: true,  
857 - // physics: BouncingScrollPhysics(),  
858 - // padding: EdgeInsets.only(  
859 - // bottom:  
860 - // MediaQuery.of(context).viewInsets.bottom),  
861 - child: Column(  
862 - crossAxisAlignment: CrossAxisAlignment.start,  
863 - children: [  
864 - VEmptyView(20),  
865 - _managerWidget(),  
866 - VEmptyView(30),  
867 - _activityWidget(),  
868 - VEmptyView(30),  
869 - _labelWidget(),  
870 - VEmptyView(30),  
871 - _advancedFilterWidget(state)  
872 - ],  
873 - ),  
874 - ))),  
875 - Row(  
876 - children: [  
877 - Container(  
878 - width: ScreenUtil.screenWidthDp -  
879 - ScreenUtil().setWidth(40 * 4),  
880 - height: ScreenUtil().setWidth(100),  
881 - // padding: EdgeInsets.symmetric(  
882 - // horizontal: ScreenUtil().setWidth(40)),  
883 - decoration: BoxDecoration(  
884 - boxShadow: [  
885 - BoxShadow(  
886 - color: MyColours.color_E0E0E0,  
887 - blurRadius: ScreenUtil().setWidth(14))  
888 - ],  
889 - color: MyColours.color_ffffff,  
890 - borderRadius: BorderRadius.circular(  
891 - ScreenUtil().setWidth(20),  
892 - )),  
893 - child: Row(  
894 - // mainAxisAlignment: MainAxisAlignment.spaceEvenly,  
895 - // crossAxisAlignment: CrossAxisAlignment.center,  
896 - children: <Widget>[  
897 - Expanded(  
898 - flex: 1,  
899 - child: Material(  
900 - child: InkWell(  
901 - onTap: onPressedReset,  
902 - child: Container(  
903 - decoration: BoxDecoration(  
904 - color: MyColours.color_ffffff,  
905 - borderRadius: BorderRadius.only(  
906 - bottomLeft: Radius.circular(  
907 - ScreenUtil().setWidth(20)),  
908 - topLeft: Radius.circular(  
909 - ScreenUtil().setWidth(20)),  
910 - )),  
911 - child: Align(  
912 - alignment: Alignment.center,  
913 - child: _textWidget(  
914 - '重置',  
915 - MyColours.color_333333,  
916 - FontWeight.normal,  
917 - 30),  
918 - ),  
919 - ),  
920 - ))),  
921 - Expanded(  
922 - flex: 1,  
923 - child: Material(  
924 - child: InkWell(  
925 - onTap: onPressedComplete,  
926 - child: Container(  
927 - decoration: BoxDecoration(  
928 - color: MyColours.color_199095,  
929 - borderRadius: BorderRadius.only(  
930 - topRight: Radius.circular(  
931 - ScreenUtil().setWidth(20)),  
932 - bottomRight: Radius.circular(  
933 - ScreenUtil().setWidth(20)),  
934 - )),  
935 - child: Align(  
936 - alignment: Alignment.center,  
937 - child: _textWidget(  
938 - '确定',  
939 - MyColours.color_ffffff,  
940 - FontWeight.normal,  
941 - 30),  
942 - ),  
943 - ),  
944 - )))  
945 - ],  
946 - ),  
947 - ),  
948 - ],  
949 - ),  
950 - VEmptyView(30)  
951 - ],  
952 - ),  
953 - )));  
954 - } 852 +// ///添加进度条
  853 +// child: SingleChildScrollView(
  854 +// controller: _scrollCrl,
  855 +// // primary: true,
  856 +// // reverse: true,
  857 +// // physics: BouncingScrollPhysics(),
  858 +// // padding: EdgeInsets.only(
  859 +// // bottom:
  860 +// // MediaQuery.of(context).viewInsets.bottom),
  861 +// child: Column(
  862 +// crossAxisAlignment: CrossAxisAlignment.start,
  863 +// children: [
  864 +// VEmptyView(20),
  865 +// _managerWidget(),
  866 +// VEmptyView(30),
  867 +// _activityWidget(),
  868 +// VEmptyView(30),
  869 +// _labelWidget(),
  870 +// VEmptyView(30),
  871 +// _advancedFilterWidget(state)
  872 +// ],
  873 +// ),
  874 +// ))),
  875 +// Row(
  876 +// children: [
  877 +// Container(
  878 +// width: ScreenUtil.screenWidthDp -
  879 +// ScreenUtil().setWidth(40 * 4),
  880 +// height: ScreenUtil().setWidth(100),
  881 +// // padding: EdgeInsets.symmetric(
  882 +// // horizontal: ScreenUtil().setWidth(40)),
  883 +// decoration: BoxDecoration(
  884 +// boxShadow: [
  885 +// BoxShadow(
  886 +// color: MyColours.color_E0E0E0,
  887 +// blurRadius: ScreenUtil().setWidth(14))
  888 +// ],
  889 +// color: MyColours.color_ffffff,
  890 +// borderRadius: BorderRadius.circular(
  891 +// ScreenUtil().setWidth(20),
  892 +// )),
  893 +// child: Row(
  894 +// // mainAxisAlignment: MainAxisAlignment.spaceEvenly,
  895 +// // crossAxisAlignment: CrossAxisAlignment.center,
  896 +// children: <Widget>[
  897 +// Expanded(
  898 +// flex: 1,
  899 +// child: Material(
  900 +// child: InkWell(
  901 +// onTap: onPressedReset,
  902 +// child: Container(
  903 +// decoration: BoxDecoration(
  904 +// color: MyColours.color_ffffff,
  905 +// borderRadius: BorderRadius.only(
  906 +// bottomLeft: Radius.circular(
  907 +// ScreenUtil().setWidth(20)),
  908 +// topLeft: Radius.circular(
  909 +// ScreenUtil().setWidth(20)),
  910 +// )),
  911 +// child: Align(
  912 +// alignment: Alignment.center,
  913 +// child: _textWidget(
  914 +// '重置',
  915 +// MyColours.color_333333,
  916 +// FontWeight.normal,
  917 +// 30),
  918 +// ),
  919 +// ),
  920 +// ))),
  921 +// Expanded(
  922 +// flex: 1,
  923 +// child: Material(
  924 +// child: InkWell(
  925 +// onTap: onPressedComplete,
  926 +// child: Container(
  927 +// decoration: BoxDecoration(
  928 +// color: MyColours.color_199095,
  929 +// borderRadius: BorderRadius.only(
  930 +// topRight: Radius.circular(
  931 +// ScreenUtil().setWidth(20)),
  932 +// bottomRight: Radius.circular(
  933 +// ScreenUtil().setWidth(20)),
  934 +// )),
  935 +// child: Align(
  936 +// alignment: Alignment.center,
  937 +// child: _textWidget(
  938 +// '确定',
  939 +// MyColours.color_ffffff,
  940 +// FontWeight.normal,
  941 +// 30),
  942 +// ),
  943 +// ),
  944 +// )))
  945 +// ],
  946 +// ),
  947 +// ),
  948 +// ],
  949 +// ),
  950 +// VEmptyView(30)
  951 +// ],
  952 +// ),
  953 +// )));
  954 +// }
955 955
956 - //构建筛选按钮  
957 - List<Widget> _buildFilterItem(List<Map> data, bool round,  
958 - {bool grayBack = false}) {  
959 - List<Widget> items = []; 956 +// //构建筛选按钮
  957 +// List<Widget> _buildFilterItem(List<Map> data, bool round,
  958 +// {bool grayBack = false}) {
  959 +// List<Widget> items = [];
960 960
961 - for (Map item in data) {  
962 - items.add(Container(  
963 - padding: EdgeInsets.symmetric(  
964 - horizontal: ScreenUtil().setWidth(20),  
965 - vertical: ScreenUtil().setWidth(6)),  
966 - decoration: BoxDecoration(  
967 - color: grayBack  
968 - ? Color.fromRGBO(239, 239, 239, 1)  
969 - : item['select']  
970 - ? MyColours.color_199095  
971 - : MyColours.color_ffffff,  
972 - border: Border.all(  
973 - color: grayBack  
974 - ? Color.fromRGBO(239, 239, 239, 1)  
975 - : item['select']  
976 - ? MyColours.color_199095  
977 - : round  
978 - ? Color.fromRGBO(155, 155, 155, 1)  
979 - : MyColours.color_199095,  
980 - width: ScreenUtil().setWidth(2)),  
981 - borderRadius: BorderRadius.circular(  
982 - ScreenUtil().setWidth(round ? 30 : 10))),  
983 - child: _textWidget(  
984 - item['title'],  
985 - grayBack  
986 - ? MyColours.color_333333  
987 - : item['select']  
988 - ? MyColours.color_ffffff  
989 - : round  
990 - ? MyColours.color_333333  
991 - : MyColours.color_199095,  
992 - FontWeight.normal,  
993 - 24)));  
994 - }  
995 - return items;  
996 - } 961 +// for (Map item in data) {
  962 +// items.add(Container(
  963 +// padding: EdgeInsets.symmetric(
  964 +// horizontal: ScreenUtil().setWidth(20),
  965 +// vertical: ScreenUtil().setWidth(6)),
  966 +// decoration: BoxDecoration(
  967 +// color: grayBack
  968 +// ? Color.fromRGBO(239, 239, 239, 1)
  969 +// : item['select']
  970 +// ? MyColours.color_199095
  971 +// : MyColours.color_ffffff,
  972 +// border: Border.all(
  973 +// color: grayBack
  974 +// ? Color.fromRGBO(239, 239, 239, 1)
  975 +// : item['select']
  976 +// ? MyColours.color_199095
  977 +// : round
  978 +// ? Color.fromRGBO(155, 155, 155, 1)
  979 +// : MyColours.color_199095,
  980 +// width: ScreenUtil().setWidth(2)),
  981 +// borderRadius: BorderRadius.circular(
  982 +// ScreenUtil().setWidth(round ? 30 : 10))),
  983 +// child: _textWidget(
  984 +// item['title'],
  985 +// grayBack
  986 +// ? MyColours.color_333333
  987 +// : item['select']
  988 +// ? MyColours.color_ffffff
  989 +// : round
  990 +// ? MyColours.color_333333
  991 +// : MyColours.color_199095,
  992 +// FontWeight.normal,
  993 +// 24)));
  994 +// }
  995 +// return items;
  996 +// }
997 997
998 - @override  
999 - Widget build(BuildContext context) {  
1000 - customerProvider = Provider.of<CustomerProvider>(context, listen: true);  
1001 - return Material(  
1002 - child: InkWell(  
1003 - onTap: () {  
1004 - // FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘  
1005 - },  
1006 - child: Scaffold(  
1007 - resizeToAvoidBottomInset: false,  
1008 - backgroundColor: MyColours.color_ffffff,  
1009 - appBar: SystemAppBar(  
1010 - '全店客户',  
1011 - onTap: () {  
1012 - Navigator.of(context).pop();  
1013 - },  
1014 - ),  
1015 - body: SafeArea(  
1016 - child: Column(children: [  
1017 - _searchWidget(), _menuWidget(),  
1018 - Expanded(child:  
1019 - Consumer<CustomerProvider>(builder: (context, model, _) {  
1020 - if (model.pageState != PageState.Success) {  
1021 - return ExceptionPage(  
1022 - pageState: model.pageState,  
1023 - callback: () {  
1024 - model.pageState = PageState.Loading;  
1025 - model.notifyListeners();  
1026 - _getContantData();  
1027 - },  
1028 - emptyMsg: "暂时没有联系人哦",  
1029 - emptyImg: "empty_search",  
1030 - showMsg: "加载中,请稍后...",  
1031 - );  
1032 - } else {  
1033 - return Column(children: [  
1034 - Expanded(  
1035 - child: TabBarView(  
1036 - controller: tabController,  
1037 - physics: NeverScrollableScrollPhysics(),  
1038 - children: <Widget>[  
1039 - ContactListPage(  
1040 - contacts: model.userHistorysShow,  
1041 - provider: customerProvider),  
1042 - ContactListPage(  
1043 - contacts: model.userHistorysShow,  
1044 - provider: customerProvider),  
1045 - ContactListPage(  
1046 - contacts: model.userHistorysShow,  
1047 - provider: customerProvider),  
1048 - ContactListPage(  
1049 - contacts: model.userHistorysShow,  
1050 - provider: customerProvider),  
1051 - ])),  
1052 - customerProvider.pageState == PageState.Success  
1053 - ? _selectContantWidget()  
1054 - : SizedBox(),  
1055 - ]);  
1056 - }  
1057 - })),  
1058 - // _searchWidget(),  
1059 - // Positioned(  
1060 - // top: 0,  
1061 - // left: ScreenUtil().setWidth(40),  
1062 - // right: ScreenUtil().setWidth(40),  
1063 - // child: _filterWidget())  
1064 - // ],  
1065 - ])),  
1066 - )));  
1067 - }  
1068 -} 998 +// @override
  999 +// Widget build(BuildContext context) {
  1000 +// customerProvider = Provider.of<CustomerProvider>(context, listen: true);
  1001 +// return Material(
  1002 +// child: InkWell(
  1003 +// onTap: () {
  1004 +// // FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
  1005 +// },
  1006 +// child: Scaffold(
  1007 +// resizeToAvoidBottomInset: false,
  1008 +// backgroundColor: MyColours.color_ffffff,
  1009 +// appBar: SystemAppBar(
  1010 +// '全店客户',
  1011 +// onTap: () {
  1012 +// Navigator.of(context).pop();
  1013 +// },
  1014 +// ),
  1015 +// body: SafeArea(
  1016 +// child: Column(children: [
  1017 +// _searchWidget(), _menuWidget(),
  1018 +// Expanded(child:
  1019 +// Consumer<CustomerProvider>(builder: (context, model, _) {
  1020 +// if (model.pageState != PageState.Success) {
  1021 +// return ExceptionPage(
  1022 +// pageState: model.pageState,
  1023 +// callback: () {
  1024 +// model.pageState = PageState.Loading;
  1025 +// model.notifyListeners();
  1026 +// _getContantData();
  1027 +// },
  1028 +// emptyMsg: "暂时没有联系人哦",
  1029 +// emptyImg: "empty_search",
  1030 +// showMsg: "加载中,请稍后...",
  1031 +// );
  1032 +// } else {
  1033 +// return Column(children: [
  1034 +// Expanded(
  1035 +// child: TabBarView(
  1036 +// controller: tabController,
  1037 +// physics: NeverScrollableScrollPhysics(),
  1038 +// children: <Widget>[
  1039 +// ContactListPage(
  1040 +// contacts: model.userHistorysShow,
  1041 +// provider: customerProvider),
  1042 +// ContactListPage(
  1043 +// contacts: model.userHistorysShow,
  1044 +// provider: customerProvider),
  1045 +// ContactListPage(
  1046 +// contacts: model.userHistorysShow,
  1047 +// provider: customerProvider),
  1048 +// ContactListPage(
  1049 +// contacts: model.userHistorysShow,
  1050 +// provider: customerProvider),
  1051 +// ])),
  1052 +// customerProvider.pageState == PageState.Success
  1053 +// ? _selectContantWidget()
  1054 +// : SizedBox(),
  1055 +// ]);
  1056 +// }
  1057 +// })),
  1058 +// // _searchWidget(),
  1059 +// // Positioned(
  1060 +// // top: 0,
  1061 +// // left: ScreenUtil().setWidth(40),
  1062 +// // right: ScreenUtil().setWidth(40),
  1063 +// // child: _filterWidget())
  1064 +// // ],
  1065 +// ])),
  1066 +// )));
  1067 +// }
  1068 +// }
@@ -71,13 +71,6 @@ packages: @@ -71,13 +71,6 @@ packages:
71 url: "https://pub.flutter-io.cn" 71 url: "https://pub.flutter-io.cn"
72 source: hosted 72 source: hosted
73 version: "0.14.2" 73 version: "0.14.2"
74 - azlistview:  
75 - dependency: "direct main"  
76 - description:  
77 - name: azlistview  
78 - url: "https://pub.flutter-io.cn"  
79 - source: hosted  
80 - version: "1.1.1"  
81 boolean_selector: 74 boolean_selector:
82 dependency: transitive 75 dependency: transitive
83 description: 76 description: