From 5c7475e7ccb63db387ab1c638e5853a4c78f29e1 Mon Sep 17 00:00:00 2001 From: WinUser01 Date: Tue, 3 May 2022 14:39:04 +0800 Subject: [PATCH 01/13] =?UTF-8?q?hyzp=5Fybqx-Commit139=EF=BC=9Areset?= =?UTF-8?q?=E5=88=B0hyzp=5Fybqx-Commit138=EF=BC=8C=E5=9C=A8=E6=AD=A4?= =?UTF-8?q?=E6=AC=A1=E6=8F=90=E4=BA=A4=E5=9F=BA=E7=A1=80=E4=B8=8A=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E4=BF=AE=E6=94=B9=EF=BC=8C=E4=B8=8D=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E4=BB=BB=E4=BD=95=E5=A4=96=E9=83=A8=E6=A8=A1=E5=9D=97=E3=80=82?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8C=85=E6=8B=AC=EF=BC=9A=20=20=20=20=201?= =?UTF-8?q?=E3=80=81=E4=BF=AE=E6=94=B9IOS=E7=9A=84=E7=82=B9=E4=BD=8D?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E6=96=87=E6=9C=AC=E5=9B=BE=E6=A0=87=E5=85=83?= =?UTF-8?q?=E7=B4=A0=E7=9A=84=E4=B8=8A=E4=B8=8B=E9=A1=BA=E5=BA=8F=EF=BC=8C?= =?UTF-8?q?IOS=E7=89=88=E7=82=B9=E4=BD=8D=E5=9C=B0=E5=9B=BE=E7=9A=84?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E5=9B=BE=E6=A0=87=E5=AE=9A=E4=BD=8D=E5=9F=BA?= =?UTF-8?q?=E6=9C=AC=E5=87=86=E7=A1=AE=EF=BC=9B=20=20=20=20=202=E3=80=81?= =?UTF-8?q?=E6=8C=89=E5=85=AC=E5=8F=B8=E8=A6=81=E6=B1=82=E5=90=88=E5=B9=B6?= =?UTF-8?q?=E5=88=9D=E5=AE=A1=E3=80=81=E5=A4=8D=E5=AE=A1=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E7=9A=84=E8=BD=A6=E7=89=8C=E6=96=87=E5=AD=97=E5=92=8C=E9=A2=9C?= =?UTF-8?q?=E8=89=B2=E6=A1=86=E5=88=B0=E4=B8=80=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/Works/DWDT/dwInfo_data.dart | 5 +- lib/pages/Works/DWDT/widget_to_image.dart | 38 ++--- lib/pages/Works/HYSH/hysh_group.dart | 3 +- lib/pages/Works/TJXX/tj_data.dart | 2 + lib/widget/CarNumberAndCpysItems.dart | 181 ++++++++++---------- lib/widget/CarNumberAndCpysItems0.dart | 193 ++++++++++++++++++++++ 6 files changed, 306 insertions(+), 116 deletions(-) create mode 100644 lib/widget/CarNumberAndCpysItems0.dart diff --git a/lib/pages/Works/DWDT/dwInfo_data.dart b/lib/pages/Works/DWDT/dwInfo_data.dart index 3c92c1c..11838d0 100644 --- a/lib/pages/Works/DWDT/dwInfo_data.dart +++ b/lib/pages/Works/DWDT/dwInfo_data.dart @@ -45,6 +45,8 @@ Future getListBMFMarker({List listDwinfo}) async { for (int i = 0; i < len; i++) { BMFMarker marker; if (Platform.isIOS) { + // if (true) { + // 用于安卓环境下测试 marker = BMFMarker( position: getBMFCoordinate(listDwinfo[i]["dwzb"]), // title: '${listDwinfo[i]["id"].toString()}、${listDwinfo[i]["dwmc"]}', @@ -98,7 +100,6 @@ Future getListBMFMarker({List listDwinfo}) async { draggable: dragable); } - // 百度地图的脑残设计,用Flutter添加多个BMFMarker时,必须在添加BMFMarker时自己保存ID, // 否则响应点击时无法确定用户点击的是哪个定位标注 // 代码不会自动返回,也没有任何文档说明,是花了一天时间搜索网络无果,是自己翻江倒海摸索出来的 @@ -109,6 +110,8 @@ Future getListBMFMarker({List listDwinfo}) async { // android版专有 if (Platform.isAndroid) { + // if (false) { + // 用于安卓环境下测试 g_listBMFText.add(BMFText( // text: '${listDwinfo[i]["id"].toString()}、${listDwinfo[i]["dwmc"]}', text: '${(i + 1).toString()}、${listDwinfo[i]["dwmc"]}', diff --git a/lib/pages/Works/DWDT/widget_to_image.dart b/lib/pages/Works/DWDT/widget_to_image.dart index a5a3035..c5bd99d 100644 --- a/lib/pages/Works/DWDT/widget_to_image.dart +++ b/lib/pages/Works/DWDT/widget_to_image.dart @@ -22,25 +22,6 @@ Future getIconWidget(String name) async { color: Colors.transparent, child: Column( children: [ - Row( - textDirection: TextDirection.ltr, - children: [ - SizedBox(width: _widthBtn * 0.5 + _icon_width), - Container( - // margin: EdgeInsets.only(left: _widthBtn * 0.5), - // padding: EdgeInsets.only(left: _widthBtn * 0.5), - width: _widthBtn, - height: _text_height, - color: Colors.yellow, - child: Directionality( - textDirection: TextDirection.ltr, - child: Text(name, - textAlign: TextAlign.center, - style: TextStyle( - color: Colors.black, fontWeight: FontWeight.bold, fontSize: 36.0))), - ), - ], - ), Container( width: _widthBtn, height: _icon_height, @@ -62,6 +43,25 @@ Future getIconWidget(String name) async { ), ), ), + Row( + textDirection: TextDirection.ltr, + children: [ + SizedBox(width: _widthBtn * 0.5 + _icon_width), + Container( + // margin: EdgeInsets.only(left: _widthBtn * 0.5), + // padding: EdgeInsets.only(left: _widthBtn * 0.5), + width: _widthBtn, + height: _text_height, + color: Colors.yellow, + child: Directionality( + textDirection: TextDirection.ltr, + child: Text(name, + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.black, fontWeight: FontWeight.bold, fontSize: 36.0))), + ), + ], + ), ], ), ); diff --git a/lib/pages/Works/HYSH/hysh_group.dart b/lib/pages/Works/HYSH/hysh_group.dart index 9107bdc..3f34084 100644 --- a/lib/pages/Works/HYSH/hysh_group.dart +++ b/lib/pages/Works/HYSH/hysh_group.dart @@ -93,7 +93,8 @@ class _HyshGroupState extends State { return Container( width: ScreenUtil().setWidth(1022), // height: ScreenUtil().setHeight(550), - height: ScreenUtil().setHeight(480), + // height: ScreenUtil().setHeight(480), + height: ScreenUtil().setHeight(380), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.all( diff --git a/lib/pages/Works/TJXX/tj_data.dart b/lib/pages/Works/TJXX/tj_data.dart index df120c5..9a84c3b 100644 --- a/lib/pages/Works/TJXX/tj_data.dart +++ b/lib/pages/Works/TJXX/tj_data.dart @@ -697,6 +697,8 @@ Future getAllSumCll(String field, List listStatis) async { Future bmfInit() async { // 只有IOS版才需要 if (Platform.isIOS) { + // if (true) { + // 用于安卓环境下测试 g_myIconPathPre = await createDir(g_myIconDir); print("g_myIconPathPre = $g_myIconPathPre"); // g_myIconPathPre = /data/user/0/com.example.hyzp_yibin_bmfmap/app_flutter/myIcons diff --git a/lib/widget/CarNumberAndCpysItems.dart b/lib/widget/CarNumberAndCpysItems.dart index 40c348a..997649a 100644 --- a/lib/widget/CarNumberAndCpysItems.dart +++ b/lib/widget/CarNumberAndCpysItems.dart @@ -85,104 +85,95 @@ class _CarNumberAndCpysItemsState extends State { Widget getCarNumberAndCpys(int i) { return Container( width: ScreenUtil().setWidth(1022), - height: ScreenUtil().setHeight(my_listTileHeight2 * 2 + 15), - child: Column(children: [ - //1、车牌号码 - Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox(width: ScreenUtil().setWidth(my_marginLeft2)), - Text('${mapGetZpjlGetDataSpecial['car_number'].fieldText}: ', - style: TextStyle(fontSize: my_fontSize)), - Container( - alignment: Alignment(-1, 0), - //widthTrail = 400报错,360刚能显示,300换行,260 - height: ScreenUtil().setHeight(my_listTileHeight2), //最大高度 - width: ScreenUtil().setWidth(400), - child: TextField( - textAlign: TextAlign.center, - style: TextStyle( - fontSize: my_fontSize, - //color: cpysList[getIndexOfCpysList(colorText: listGetZpjl[i]['cpys'])].cpysFont, - //color: cpysList[getIndexOfCpysList(colorText: topTabs_map['cpysText_List'][i])].cpysFont, - color: cpysList[getIndexOfCpysList(colorText: selectedValue)].cpysFont, - ), - // background: Paint() - // ..color = cpysList[getIndexOfCpysList(colorText: listGetZpjl[i]['cpys'])] - // .cpysBackground), - decoration: InputDecoration( - focusedBorder: OutlineInputBorder( - borderSide: BorderSide(width: 2.0), borderRadius: BorderRadius.circular(3.0)), - enabledBorder: OutlineInputBorder( - borderSide: BorderSide(width: 2.0), borderRadius: BorderRadius.circular(3.0)), - //prefixText: "pre", - filled: true, - //fillColor: cpysList[getIndexOfCpysList(colorText: listGetZpjl[i]['cpys'])].cpysBackground, - //fillColor: cpysList[getIndexOfCpysList(colorText: topTabs_map['cpysText_List'][i])].cpysBackground, - fillColor: cpysList[getIndexOfCpysList(colorText: selectedValue)].cpysBackground, - hintText: '车牌号码', - //border: InputBorder.none, //TextField去掉下划线 - //contentPadding: EdgeInsets.only(right: 0), - //contentPadding: const EdgeInsets.symmetric(vertical: _textFieldHeight), - //contentPadding: EdgeInsets.symmetric(vertical: _textFieldHeight), - contentPadding: EdgeInsets.all(0), - //contentPadding: EdgeInsets.only(top: 0), + height: ScreenUtil().setHeight(my_listTileHeight2 + 15), + child: Row( + children: [ + SizedBox(width: ScreenUtil().setWidth(my_marginLeft2)), + //1、车牌号码 + // Text('${mapGetZpjlGetDataSpecial['car_number'].fieldText}: ', + // style: TextStyle(fontSize: my_fontSize)), + Text('车牌号码\n及颜色: ', maxLines: 2), + SizedBox(width: ScreenUtil().setWidth(my_marginLeft)), + Container( + alignment: Alignment(-1, 0), + //widthTrail = 400报错,360刚能显示,300换行,260 + height: ScreenUtil().setHeight(my_listTileHeight2), //最大高度 + width: ScreenUtil().setWidth(400), + child: TextField( + textAlign: TextAlign.center, + style: TextStyle( + fontSize: my_fontSize, + //color: cpysList[getIndexOfCpysList(colorText: listGetZpjl[i]['cpys'])].cpysFont, + //color: cpysList[getIndexOfCpysList(colorText: topTabs_map['cpysText_List'][i])].cpysFont, + color: cpysList[getIndexOfCpysList(colorText: selectedValue)].cpysFont, + ), + // background: Paint() + // ..color = cpysList[getIndexOfCpysList(colorText: listGetZpjl[i]['cpys'])] + // .cpysBackground), + decoration: InputDecoration( + focusedBorder: OutlineInputBorder( + borderSide: BorderSide(width: 2.0), borderRadius: BorderRadius.circular(3.0)), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(width: 2.0), borderRadius: BorderRadius.circular(3.0)), + //prefixText: "pre", + filled: true, + //fillColor: cpysList[getIndexOfCpysList(colorText: listGetZpjl[i]['cpys'])].cpysBackground, + //fillColor: cpysList[getIndexOfCpysList(colorText: topTabs_map['cpysText_List'][i])].cpysBackground, + fillColor: cpysList[getIndexOfCpysList(colorText: selectedValue)].cpysBackground, + hintText: '车牌号码', + //border: InputBorder.none, //TextField去掉下划线 + //contentPadding: EdgeInsets.only(right: 0), + //contentPadding: const EdgeInsets.symmetric(vertical: _textFieldHeight), + //contentPadding: EdgeInsets.symmetric(vertical: _textFieldHeight), + contentPadding: EdgeInsets.all(0), + //contentPadding: EdgeInsets.only(top: 0), - // border: OutlineInputBorder( - // //borderRadius: BorderRadius.circular(1.0), - // borderSide: BorderSide( - // //color: cpysList[getIndexOfCpysList(colorText: listGetZpjl[i]['cpys'])].cpysBorder, - // color: - // cpysList[getIndexOfCpysList(colorText: topTabs_map['cpysText_List'][i])] - // .cpysBorder, - // width: 2.0)), - ), - //controller: listZpljController[i][indexField], - controller: TextEditingController.fromValue(TextEditingValue( - text: listGetZpjl[i]['car_number'].toString(), - // 保持光标在最后 - selection: TextSelection.fromPosition(TextPosition( - affinity: TextAffinity.downstream, - offset: '${listGetZpjl[i]['car_number'].toString()}'.length)))), - enabled: true, - //利用控制器初始化文本 - onChanged: (value) { - listGetZpjl[i]['car_number'] = value; - }, + // border: OutlineInputBorder( + // //borderRadius: BorderRadius.circular(1.0), + // borderSide: BorderSide( + // //color: cpysList[getIndexOfCpysList(colorText: listGetZpjl[i]['cpys'])].cpysBorder, + // color: + // cpysList[getIndexOfCpysList(colorText: topTabs_map['cpysText_List'][i])] + // .cpysBorder, + // width: 2.0)), ), + //controller: listZpljController[i][indexField], + controller: TextEditingController.fromValue(TextEditingValue( + text: listGetZpjl[i]['car_number'].toString(), + // 保持光标在最后 + selection: TextSelection.fromPosition(TextPosition( + affinity: TextAffinity.downstream, + offset: '${listGetZpjl[i]['car_number'].toString()}'.length)))), + enabled: true, + //利用控制器初始化文本 + onChanged: (value) { + listGetZpjl[i]['car_number'] = value; + }, ), - SizedBox(width: ScreenUtil().setWidth(my_marginLeft2)), - ], - ), - SizedBox(height: ScreenUtil().setHeight(15)), - //2、车牌颜色 - Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox(width: ScreenUtil().setWidth(my_marginLeft2)), - Text('车牌颜色: ', - style: TextStyle(fontSize: my_fontSize)), - Container( - alignment: Alignment(1, 0), - //widthTrail = 400报错,360刚能显示,300换行,260 - height: ScreenUtil().setHeight(my_listTileHeight2), //最大高度 - width: ScreenUtil().setWidth(400), - margin: EdgeInsets.only(bottom: 0), - padding: EdgeInsets.only(left: 0, bottom: 2), - decoration: BoxDecoration( - //color: cpysList[getIndexOfCpysList(colorText: listGetZpjl[i]['cpys'])].cpysBackground, - //color: cpysList[getIndexOfCpysList(colorText: topTabs_map['cpysText_List'][i])].cpysBackground, - color: cpysList[getIndexOfCpysList(colorText: selectedValue)].cpysBackground, - border: Border.all(color: Colors.black87, width: 2), - //边框圆角设置 - borderRadius: BorderRadius.vertical( - top: Radius.elliptical(3, 3), bottom: Radius.elliptical(3, 3)), - ), - child: getDropdownButton(), - ) - ], - ), - ],), + ), + SizedBox(width: ScreenUtil().setWidth(my_marginLeft)), + //2、车牌颜色 + Container( + alignment: Alignment(1, 0), + //widthTrail = 400报错,360刚能显示,300换行,260 + height: ScreenUtil().setHeight(my_listTileHeight2), + //最大高度 + width: ScreenUtil().setWidth(400), + margin: EdgeInsets.only(bottom: 0), + padding: EdgeInsets.only(left: 0, bottom: 2), + decoration: BoxDecoration( + //color: cpysList[getIndexOfCpysList(colorText: listGetZpjl[i]['cpys'])].cpysBackground, + //color: cpysList[getIndexOfCpysList(colorText: topTabs_map['cpysText_List'][i])].cpysBackground, + color: cpysList[getIndexOfCpysList(colorText: selectedValue)].cpysBackground, + border: Border.all(color: Colors.black87, width: 2), + //边框圆角设置 + borderRadius: BorderRadius.vertical( + top: Radius.elliptical(3, 3), bottom: Radius.elliptical(3, 3)), + ), + child: getDropdownButton(), + ), + ], + ), ); } diff --git a/lib/widget/CarNumberAndCpysItems0.dart b/lib/widget/CarNumberAndCpysItems0.dart new file mode 100644 index 0000000..40c348a --- /dev/null +++ b/lib/widget/CarNumberAndCpysItems0.dart @@ -0,0 +1,193 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/screen_util.dart'; +import '../components/hyxx_data_handle.dart'; +import '../services/EventBus.dart'; + +class CarNumberAndCpysItems extends StatefulWidget { + int index; + String initValue; + + CarNumberAndCpysItems( + this.index, this.initValue); //I don't know what is this index for but I will put it in anyway + @override + _CarNumberAndCpysItemsState createState() => _CarNumberAndCpysItemsState(); +} + +class _CarNumberAndCpysItemsState extends State { + List> _dropDownMenuItems; + String selectedValue; + + @override + void initState() { + super.initState(); + selectedValue = widget.initValue; + _dropDownMenuItems = getDropDownMenuItems(); + } + + List> getDropDownMenuItems() { + List> items = []; + int len = cpysList.length; + for (int i = 0; i < len; i++) { + items.add( + DropdownMenuItem( + value: cpysList[i].cpysText, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + cpysList[i].cpysText, + style: TextStyle( + color: cpysList[i].cpysFont, + background: Paint()..color = cpysList[i].cpysBackground), + ), + (selectedValue == cpysList[i].cpysText) + ? Icon( + Icons.check, + //color: cpysList[i].cpysBackground, + size: 16, + ) + : SizedBox( + width: 0, + ), + ], + ), + ), + ); + } + return items; + } + + Widget getDropdownButton() { + //DropdownButton默认有一条下划线,DropdownButtonHideUnderline去除下划线 + //更改图标亮度 + return Theme( + //data: Theme.of(context).copyWith(primaryColor: cpysList[getIndexOfCpysList(colorText: selectedValue)].cpysFont), + data: Theme.of(context).copyWith(brightness: Brightness.dark), + child: DropdownButtonHideUnderline( + child: DropdownButton( + iconEnabledColor: cpysList[getIndexOfCpysList(colorText: selectedValue)].cpysFont, + value: selectedValue, + items: _dropDownMenuItems, + onChanged: (String _selectedFruit) { + selectedValue = _selectedFruit; + _dropDownMenuItems = getDropDownMenuItems(); + //黑烟初审数据审核Dropdown选项改变广播 + eventBus.fire(HycsDataAuditDropdownEvent('黑烟初审数据审核Dropdown选项已改变', selectedValue)); + setState(() {}); + print('selectedValue = $selectedValue'); + }, + ), + ), + ); + } + + //Tab页面中的车牌号码、车牌颜色组件 + Widget getCarNumberAndCpys(int i) { + return Container( + width: ScreenUtil().setWidth(1022), + height: ScreenUtil().setHeight(my_listTileHeight2 * 2 + 15), + child: Column(children: [ + //1、车牌号码 + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox(width: ScreenUtil().setWidth(my_marginLeft2)), + Text('${mapGetZpjlGetDataSpecial['car_number'].fieldText}: ', + style: TextStyle(fontSize: my_fontSize)), + Container( + alignment: Alignment(-1, 0), + //widthTrail = 400报错,360刚能显示,300换行,260 + height: ScreenUtil().setHeight(my_listTileHeight2), //最大高度 + width: ScreenUtil().setWidth(400), + child: TextField( + textAlign: TextAlign.center, + style: TextStyle( + fontSize: my_fontSize, + //color: cpysList[getIndexOfCpysList(colorText: listGetZpjl[i]['cpys'])].cpysFont, + //color: cpysList[getIndexOfCpysList(colorText: topTabs_map['cpysText_List'][i])].cpysFont, + color: cpysList[getIndexOfCpysList(colorText: selectedValue)].cpysFont, + ), + // background: Paint() + // ..color = cpysList[getIndexOfCpysList(colorText: listGetZpjl[i]['cpys'])] + // .cpysBackground), + decoration: InputDecoration( + focusedBorder: OutlineInputBorder( + borderSide: BorderSide(width: 2.0), borderRadius: BorderRadius.circular(3.0)), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(width: 2.0), borderRadius: BorderRadius.circular(3.0)), + //prefixText: "pre", + filled: true, + //fillColor: cpysList[getIndexOfCpysList(colorText: listGetZpjl[i]['cpys'])].cpysBackground, + //fillColor: cpysList[getIndexOfCpysList(colorText: topTabs_map['cpysText_List'][i])].cpysBackground, + fillColor: cpysList[getIndexOfCpysList(colorText: selectedValue)].cpysBackground, + hintText: '车牌号码', + //border: InputBorder.none, //TextField去掉下划线 + //contentPadding: EdgeInsets.only(right: 0), + //contentPadding: const EdgeInsets.symmetric(vertical: _textFieldHeight), + //contentPadding: EdgeInsets.symmetric(vertical: _textFieldHeight), + contentPadding: EdgeInsets.all(0), + //contentPadding: EdgeInsets.only(top: 0), + + // border: OutlineInputBorder( + // //borderRadius: BorderRadius.circular(1.0), + // borderSide: BorderSide( + // //color: cpysList[getIndexOfCpysList(colorText: listGetZpjl[i]['cpys'])].cpysBorder, + // color: + // cpysList[getIndexOfCpysList(colorText: topTabs_map['cpysText_List'][i])] + // .cpysBorder, + // width: 2.0)), + ), + //controller: listZpljController[i][indexField], + controller: TextEditingController.fromValue(TextEditingValue( + text: listGetZpjl[i]['car_number'].toString(), + // 保持光标在最后 + selection: TextSelection.fromPosition(TextPosition( + affinity: TextAffinity.downstream, + offset: '${listGetZpjl[i]['car_number'].toString()}'.length)))), + enabled: true, + //利用控制器初始化文本 + onChanged: (value) { + listGetZpjl[i]['car_number'] = value; + }, + ), + ), + SizedBox(width: ScreenUtil().setWidth(my_marginLeft2)), + ], + ), + SizedBox(height: ScreenUtil().setHeight(15)), + //2、车牌颜色 + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox(width: ScreenUtil().setWidth(my_marginLeft2)), + Text('车牌颜色: ', + style: TextStyle(fontSize: my_fontSize)), + Container( + alignment: Alignment(1, 0), + //widthTrail = 400报错,360刚能显示,300换行,260 + height: ScreenUtil().setHeight(my_listTileHeight2), //最大高度 + width: ScreenUtil().setWidth(400), + margin: EdgeInsets.only(bottom: 0), + padding: EdgeInsets.only(left: 0, bottom: 2), + decoration: BoxDecoration( + //color: cpysList[getIndexOfCpysList(colorText: listGetZpjl[i]['cpys'])].cpysBackground, + //color: cpysList[getIndexOfCpysList(colorText: topTabs_map['cpysText_List'][i])].cpysBackground, + color: cpysList[getIndexOfCpysList(colorText: selectedValue)].cpysBackground, + border: Border.all(color: Colors.black87, width: 2), + //边框圆角设置 + borderRadius: BorderRadius.vertical( + top: Radius.elliptical(3, 3), bottom: Radius.elliptical(3, 3)), + ), + child: getDropdownButton(), + ) + ], + ), + ],), + ); + } + + @override + Widget build(BuildContext context) { + return getCarNumberAndCpys(widget.index); + } +} From 72848612cefb57a366746caec82bb5bfd4c7a484 Mon Sep 17 00:00:00 2001 From: WinUser01 Date: Tue, 3 May 2022 14:40:26 +0800 Subject: [PATCH 02/13] =?UTF-8?q?hyzp=5Fybqx-Commit139=EF=BC=9Areset?= =?UTF-8?q?=E5=88=B0hyzp=5Fybqx-Commit139=EF=BC=8C=E5=9C=A8=E6=AD=A4?= =?UTF-8?q?=E6=AC=A1=E6=8F=90=E4=BA=A4=E5=9F=BA=E7=A1=80=E4=B8=8A=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E4=BF=AE=E6=94=B9=EF=BC=8C=E4=B8=8D=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E4=BB=BB=E4=BD=95=E5=A4=96=E9=83=A8=E6=A8=A1=E5=9D=97=E3=80=82?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8C=85=E6=8B=AC=EF=BC=9A=20=20=20=20=201?= =?UTF-8?q?=E3=80=81=E4=BF=AE=E6=94=B9IOS=E7=9A=84=E7=82=B9=E4=BD=8D?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E6=96=87=E6=9C=AC=E5=9B=BE=E6=A0=87=E5=85=83?= =?UTF-8?q?=E7=B4=A0=E7=9A=84=E4=B8=8A=E4=B8=8B=E9=A1=BA=E5=BA=8F=EF=BC=8C?= =?UTF-8?q?IOS=E7=89=88=E7=82=B9=E4=BD=8D=E5=9C=B0=E5=9B=BE=E7=9A=84?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E5=9B=BE=E6=A0=87=E5=AE=9A=E4=BD=8D=E5=9F=BA?= =?UTF-8?q?=E6=9C=AC=E5=87=86=E7=A1=AE=EF=BC=9B=20=20=20=20=202=E3=80=81?= =?UTF-8?q?=E6=8C=89=E5=85=AC=E5=8F=B8=E8=A6=81=E6=B1=82=E5=90=88=E5=B9=B6?= =?UTF-8?q?=E5=88=9D=E5=AE=A1=E3=80=81=E5=A4=8D=E5=AE=A1=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E7=9A=84=E8=BD=A6=E7=89=8C=E6=96=87=E5=AD=97=E5=92=8C=E9=A2=9C?= =?UTF-8?q?=E8=89=B2=E6=A1=86=E5=88=B0=E4=B8=80=E8=A1=8C=20=20=20=20=203?= =?UTF-8?q?=E3=80=81=E7=89=88=E6=9C=AC=E5=8F=B7=E6=9B=B4=E6=96=B0=E4=B8=BA?= =?UTF-8?q?version:=201.4.30+20220504?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pubspec.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index c5b5b39..c6cc40d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -67,7 +67,8 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev #version: 1.4.26+20220426 #version: 1.4.27+20220426 #version: 1.4.28+20220426 -version: 1.4.29+20220502 +#version: 1.4.29+20220502 +version: 1.4.30+20220504 environment: sdk: ">=2.7.0 <3.0.0" From 3f51f0db432471ca90f6f6fd5f109717833461eb Mon Sep 17 00:00:00 2001 From: WinUser01 Date: Tue, 3 May 2022 14:55:03 +0800 Subject: [PATCH 03/13] =?UTF-8?q?hyzp=5Fybqx-Commit141=EF=BC=9Areset?= =?UTF-8?q?=E5=88=B0hyzp=5Fybqx-Commit138=EF=BC=8C=E5=9C=A8=E6=AD=A4?= =?UTF-8?q?=E6=AC=A1=E6=8F=90=E4=BA=A4=E5=9F=BA=E7=A1=80=E4=B8=8A=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E4=BF=AE=E6=94=B9=EF=BC=8C=E4=B8=8D=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E4=BB=BB=E4=BD=95=E5=A4=96=E9=83=A8=E6=A8=A1=E5=9D=97=E3=80=82?= =?UTF-8?q?=E4=B8=8A=E4=B8=80=E6=AC=A1=E6=8F=90=E4=BA=A4=E5=BA=94=E8=AF=A5?= =?UTF-8?q?=E6=98=AFCommit140=E3=80=82=E4=BF=AE=E6=94=B9=E5=8C=85=E6=8B=AC?= =?UTF-8?q?=EF=BC=9A=20=20=20=20=201=E3=80=81=E4=BF=AE=E6=94=B9IOS?= =?UTF-8?q?=E7=9A=84=E7=82=B9=E4=BD=8D=E5=9C=B0=E5=9B=BE=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E5=85=83=E7=B4=A0=E7=9A=84=E4=B8=8A=E4=B8=8B?= =?UTF-8?q?=E9=A1=BA=E5=BA=8F=EF=BC=8CIOS=E7=89=88=E7=82=B9=E4=BD=8D?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E7=9A=84=E6=96=87=E6=9C=AC=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E5=AE=9A=E4=BD=8D=E5=9F=BA=E6=9C=AC=E5=87=86=E7=A1=AE=EF=BC=9B?= =?UTF-8?q?=20=20=20=20=202=E3=80=81=E6=8C=89=E5=85=AC=E5=8F=B8=E8=A6=81?= =?UTF-8?q?=E6=B1=82=E5=90=88=E5=B9=B6=E5=88=9D=E5=AE=A1=E3=80=81=E5=A4=8D?= =?UTF-8?q?=E5=AE=A1=E9=A1=B5=E9=9D=A2=E7=9A=84=E8=BD=A6=E7=89=8C=E6=96=87?= =?UTF-8?q?=E5=AD=97=E5=92=8C=E9=A2=9C=E8=89=B2=E6=A1=86=E5=88=B0=E4=B8=80?= =?UTF-8?q?=E8=A1=8C=20=20=20=20=203=E3=80=81=E7=89=88=E6=9C=AC=E5=8F=B7?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=B8=BAversion:=201.4.30+20220504?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android/app/release/output.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/release/output.json b/android/app/release/output.json index e6aa759..758c3cd 100644 --- a/android/app/release/output.json +++ b/android/app/release/output.json @@ -1 +1 @@ -[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":20220502,"versionName":"1.4.29","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}] \ No newline at end of file +[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":20220504,"versionName":"1.4.30","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}] \ No newline at end of file From 0aea1358f2922f974cb0de3b81353a93da9911f1 Mon Sep 17 00:00:00 2001 From: WinUser01 Date: Tue, 3 May 2022 22:29:39 +0800 Subject: [PATCH 04/13] =?UTF-8?q?hyzp=5Fybqx-Commit142=EF=BC=9A=E6=89=80?= =?UTF-8?q?=E6=9C=89=E9=A1=B5=E9=9D=A2=E7=9A=84=E8=BF=9D=E7=AB=A0=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E5=AE=BD=E9=AB=98=E6=AF=94=E9=83=BD=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=B8=BAg=5FradioImage=20=3D=2016:10?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/components/commonFun.dart | 4 ++++ lib/pages/Works/HYSH/fhycx_content_new.dart | 7 ++++--- lib/pages/Works/HYSH/hysh_content_new.dart | 15 ++++++++------- lib/pages/Works/HYSH/tsjj_content_new.dart | 8 +++++--- lib/pages/Works/TJXX/today_list_zpjl_content.dart | 7 ++++--- .../Works/TJXX/today_list_zpjl_content_new.dart | 7 ++++--- 6 files changed, 29 insertions(+), 19 deletions(-) diff --git a/lib/components/commonFun.dart b/lib/components/commonFun.dart index 492f25a..b601d3b 100644 --- a/lib/components/commonFun.dart +++ b/lib/components/commonFun.dart @@ -23,6 +23,10 @@ import 'UserInfo.dart'; import 'dioFun.dart'; //////////////////////////////////////////// +double g_radioImage = 10 / 16; // 违章图片默认宽高比率 + + + AudioPlayer playerClick; AudioPlayer playerClacks; AudioPlayer playerVoiceRemind; diff --git a/lib/pages/Works/HYSH/fhycx_content_new.dart b/lib/pages/Works/HYSH/fhycx_content_new.dart index 97b5a76..47d41c4 100644 --- a/lib/pages/Works/HYSH/fhycx_content_new.dart +++ b/lib/pages/Works/HYSH/fhycx_content_new.dart @@ -138,7 +138,7 @@ class _FhycxPageState extends State { imageUrl: url, alignment: Alignment.topCenter, imageBuilder: (context, imageProvider) => DragScaleContainer( - doubleTapStillScale: true, child: Image(image: imageProvider) + doubleTapStillScale: true, child: Image(image: imageProvider, fit: BoxFit.fill) // child: Image( // image: NetworkImage( // 'http://h.hiphotos.baidu.com/zhidao/wh%3D450%2C600/sign=0d023672312ac65c67506e77cec29e27/9f2f070828381f30dea167bbad014c086e06f06c.jpg'), @@ -268,7 +268,7 @@ class _FhycxPageState extends State { width: ScreenUtil().setWidth(1022), //height: ScreenUtil().setHeight(639), //height: ScreenUtil().setHeight(22 + 1022 * _radioImage), - height: ScreenUtil().setHeight(30 + 1022 * _radioImage), + height: ScreenUtil().setHeight(30 + 1022 * g_radioImage), decoration: BoxDecoration( //color: Colors.white, borderRadius: BorderRadius.all( @@ -281,7 +281,8 @@ class _FhycxPageState extends State { top: ScreenUtil().setHeight(_marginLeft), child: Container( width: ScreenUtil().setWidth(1022), - height: ScreenUtil().setHeight(30 + 1022 * _radioImage), + // height: ScreenUtil().setHeight(30 + 1022 * _radioImage), + height: ScreenUtil().setHeight(30 + 1022 * g_radioImage), child: getNetworkImage(getMediaUrl(_mapGetTsjjGetData['pic_url'])), ), ) diff --git a/lib/pages/Works/HYSH/hysh_content_new.dart b/lib/pages/Works/HYSH/hysh_content_new.dart index b8eaf03..f293a45 100644 --- a/lib/pages/Works/HYSH/hysh_content_new.dart +++ b/lib/pages/Works/HYSH/hysh_content_new.dart @@ -261,7 +261,7 @@ class _HyshPageState extends State with SingleTickerProviderStat imageUrl: url, alignment: Alignment.topCenter, imageBuilder: (context, imageProvider) => DragScaleContainer( - doubleTapStillScale: true, child: Image(image: imageProvider) + doubleTapStillScale: true, child: Image(image: imageProvider, fit: BoxFit.fill) // child: Image( // image: NetworkImage( // 'http://h.hiphotos.baidu.com/zhidao/wh%3D450%2C600/sign=0d023672312ac65c67506e77cec29e27/9f2f070828381f30dea167bbad014c086e06f06c.jpg'), @@ -550,9 +550,9 @@ class _HyshPageState extends State with SingleTickerProviderStat Container( width: ScreenUtil().setWidth(1022), //height: ScreenUtil().setHeight(639), - // height: ScreenUtil().setHeight(22 + 1022 * (9 / 16)), // 兴文县的违章图片无法获取,暂时调整 - height: ScreenUtil() - .setHeight(22 + 1022 * (ratioList.isNotEmpty ? ratioList[index] : 9 / 16)), + height: ScreenUtil().setHeight(22 + 1022 * g_radioImage), // 兴文县的违章图片无法获取,暂时调整 + // height: ScreenUtil() + // .setHeight(22 + 1022 * (ratioList.isNotEmpty ? ratioList[index] : 9 / 16)), decoration: BoxDecoration( //color: Colors.white, borderRadius: BorderRadius.all( @@ -565,9 +565,10 @@ class _HyshPageState extends State with SingleTickerProviderStat top: ScreenUtil().setHeight(11), child: Container( width: ScreenUtil().setWidth(1022), - height: - ScreenUtil().setHeight(1022 * (ratioList.isNotEmpty ? ratioList[index] : 9 / 16)), - // height: ScreenUtil().setHeight(1022 * (9 / 16)), // 兴文县的违章图片无法获取,暂时调整 + // height: + // ScreenUtil().setHeight(1022 * (ratioList.isNotEmpty ? ratioList[index] : 9 / 16)), + height: ScreenUtil().setHeight(1022 * g_radioImage), + // 兴文县的违章图片无法获取,暂时调整 child: getNetworkImage(getMediaUrl(listGetZpjl[index]['pic_url'])), ), ) diff --git a/lib/pages/Works/HYSH/tsjj_content_new.dart b/lib/pages/Works/HYSH/tsjj_content_new.dart index ccd9ac2..fadb4d6 100644 --- a/lib/pages/Works/HYSH/tsjj_content_new.dart +++ b/lib/pages/Works/HYSH/tsjj_content_new.dart @@ -150,7 +150,7 @@ class _LoginPageState extends State with SingleTickerProviderSta imageUrl: url, alignment: Alignment.topCenter, imageBuilder: (context, imageProvider) => DragScaleContainer( - doubleTapStillScale: true, child: Image(image: imageProvider) + doubleTapStillScale: true, child: Image(image: imageProvider, fit: BoxFit.fill) // child: Image( // image: NetworkImage( // 'http://h.hiphotos.baidu.com/zhidao/wh%3D450%2C600/sign=0d023672312ac65c67506e77cec29e27/9f2f070828381f30dea167bbad014c086e06f06c.jpg'), @@ -278,7 +278,8 @@ class _LoginPageState extends State with SingleTickerProviderSta //height: ScreenUtil().setHeight(639), //height: ScreenUtil().setHeight(22 + 1022 * _radioImage), // height: ScreenUtil().setHeight(30 + 1022 * _radioImage), - height: ScreenUtil().setHeight(30 + 1022 * _radioImage), + // height: ScreenUtil().setHeight(30 + 1022 * _radioImage), + height: ScreenUtil().setHeight(30 + 1022 * g_radioImage), decoration: BoxDecoration( // color: Colors.red, borderRadius: BorderRadius.all( @@ -291,7 +292,8 @@ class _LoginPageState extends State with SingleTickerProviderSta top: ScreenUtil().setHeight(25), child: Container( width: ScreenUtil().setWidth(1022), - height: ScreenUtil().setHeight(30 + 1022 * _radioImage), + // height: ScreenUtil().setHeight(30 + 1022 * _radioImage), + height: ScreenUtil().setHeight(30 + 1022 * g_radioImage), child: getNetworkImage(getMediaUrl(_mapGetTsjjGetData['pic_url'])), ), ) diff --git a/lib/pages/Works/TJXX/today_list_zpjl_content.dart b/lib/pages/Works/TJXX/today_list_zpjl_content.dart index eaab13b..e3d5f33 100644 --- a/lib/pages/Works/TJXX/today_list_zpjl_content.dart +++ b/lib/pages/Works/TJXX/today_list_zpjl_content.dart @@ -102,7 +102,7 @@ class _TodayListZpjlPageState extends State { imageUrl: url, alignment: Alignment.topCenter, imageBuilder: (context, imageProvider) => DragScaleContainer( - doubleTapStillScale: true, child: Image(image: imageProvider) + doubleTapStillScale: true, child: Image(image: imageProvider, fit: BoxFit.fill) // child: Image( // image: NetworkImage( // 'http://h.hiphotos.baidu.com/zhidao/wh%3D450%2C600/sign=0d023672312ac65c67506e77cec29e27/9f2f070828381f30dea167bbad014c086e06f06c.jpg'), @@ -232,7 +232,7 @@ class _TodayListZpjlPageState extends State { width: ScreenUtil().setWidth(1022), //height: ScreenUtil().setHeight(639), //height: ScreenUtil().setHeight(22 + 1022 * _radioImage), - height: ScreenUtil().setHeight(30 + 1022 * _radioImage), + height: ScreenUtil().setHeight(30 + 1022 * g_radioImage), decoration: BoxDecoration( //color: Colors.white, borderRadius: BorderRadius.all( @@ -245,7 +245,8 @@ class _TodayListZpjlPageState extends State { top: ScreenUtil().setHeight(_marginLeft), child: Container( width: ScreenUtil().setWidth(1022), - height: ScreenUtil().setHeight(30 + 1022 * _radioImage), + // height: ScreenUtil().setHeight(30 + 1022 * _radioImage), + height: ScreenUtil().setHeight(30 + 1022 * g_radioImage), child: getNetworkImage(getMediaUrl(widget.mapZpjl['pic_url'])), ), ) diff --git a/lib/pages/Works/TJXX/today_list_zpjl_content_new.dart b/lib/pages/Works/TJXX/today_list_zpjl_content_new.dart index 76c50f0..4773f18 100644 --- a/lib/pages/Works/TJXX/today_list_zpjl_content_new.dart +++ b/lib/pages/Works/TJXX/today_list_zpjl_content_new.dart @@ -134,7 +134,7 @@ class _TodayListZpjlPageState extends State { imageUrl: url, alignment: Alignment.topCenter, imageBuilder: (context, imageProvider) => DragScaleContainer( - doubleTapStillScale: true, child: Image(image: imageProvider) + doubleTapStillScale: true, child: Image(image: imageProvider, fit: BoxFit.fill) // child: Image( // image: NetworkImage( // 'http://h.hiphotos.baidu.com/zhidao/wh%3D450%2C600/sign=0d023672312ac65c67506e77cec29e27/9f2f070828381f30dea167bbad014c086e06f06c.jpg'), @@ -263,7 +263,7 @@ class _TodayListZpjlPageState extends State { width: ScreenUtil().setWidth(1022), //height: ScreenUtil().setHeight(639), //height: ScreenUtil().setHeight(22 + 1022 * _radioImage), - height: ScreenUtil().setHeight(30 + 1022 * _radioImage), + height: ScreenUtil().setHeight(30 + 1022 * g_radioImage), decoration: BoxDecoration( //color: Colors.white, borderRadius: BorderRadius.all( @@ -276,7 +276,8 @@ class _TodayListZpjlPageState extends State { top: ScreenUtil().setHeight(_marginLeft), child: Container( width: ScreenUtil().setWidth(1022), - height: ScreenUtil().setHeight(30 + 1022 * _radioImage), + // height: ScreenUtil().setHeight(30 + 1022 * _radioImage), + height: ScreenUtil().setHeight(30 + 1022 * g_radioImage), child: getNetworkImage(getMediaUrl(mapZpjl['pic_url'])), ), ) From f09362e635e2b3446dcb6a7fb64f7715b2eb29ef Mon Sep 17 00:00:00 2001 From: WinUser01 Date: Tue, 3 May 2022 23:00:58 +0800 Subject: [PATCH 05/13] =?UTF-8?q?hyzp=5Fybqx-Commit143=EF=BC=9A=E7=94=A8?= =?UTF-8?q?=20Expanded=20=E8=A7=A3=E5=86=B3Text=E5=86=85=E5=AE=B9=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E8=B6=8A=E7=95=8C=E5=95=8F=E9=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/Works/HYSH/fhycx_content_new.dart | 10 +- .../Works/TJXX/today_list_zpjl_content.dart | 779 ------------------ .../TJXX/today_list_zpjl_content_new.dart | 10 +- 3 files changed, 13 insertions(+), 786 deletions(-) delete mode 100644 lib/pages/Works/TJXX/today_list_zpjl_content.dart diff --git a/lib/pages/Works/HYSH/fhycx_content_new.dart b/lib/pages/Works/HYSH/fhycx_content_new.dart index 47d41c4..fe4fd52 100644 --- a/lib/pages/Works/HYSH/fhycx_content_new.dart +++ b/lib/pages/Works/HYSH/fhycx_content_new.dart @@ -11,6 +11,7 @@ import 'package:keyboard_avoider/keyboard_avoider.dart'; // import '../../../components/commonFun.dart'; + //import 'package:hyzp_ybqx/widget/player_pro_new.dart'; import '../../../components/dioFun.dart'; import '../../../components/doJSON.dart'; @@ -112,7 +113,8 @@ class _FhycxPageState extends State { _mapTsjjGetTsStatus = await tsjjGetTsStatus(widget.id); // 获取网络图片尺寸 - await flustars.WidgetUtil.getImageWH(url: getMediaUrl(_mapGetTsjjGetData['pic_url'])).then((rect) { + await flustars.WidgetUtil.getImageWH(url: getMediaUrl(_mapGetTsjjGetData['pic_url'])) + .then((rect) { if (null != rect) { _radioImage = rect.height / rect.width; } @@ -618,8 +620,10 @@ class _FhycxPageState extends State { width: ScreenUtil().setWidth(1022) / _radio, child: Row(mainAxisAlignment: MainAxisAlignment.start, children: [ SizedBox(width: ScreenUtil().setWidth(_marginLeft)), - Text('$_hyshlx用户:' + _hyshMap['uname'], - textAlign: TextAlign.left, overflow: TextOverflow.ellipsis), + // Flutter 解决Text内容展示越界 + Expanded( + child: Text('$_hyshlx用户:' + _hyshMap['uname'], + textAlign: TextAlign.left, overflow: TextOverflow.ellipsis)), ]), ), SizedBox(width: ScreenUtil().setWidth(_marginLeft)), diff --git a/lib/pages/Works/TJXX/today_list_zpjl_content.dart b/lib/pages/Works/TJXX/today_list_zpjl_content.dart deleted file mode 100644 index e3d5f33..0000000 --- a/lib/pages/Works/TJXX/today_list_zpjl_content.dart +++ /dev/null @@ -1,779 +0,0 @@ -//import '../../../widget/player_pro.dart'; - -import 'package:cached_network_image/cached_network_image.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_drag_scale/flutter_drag_scale.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:hyzp_ybqx/widget/my_superplayer.dart'; -import 'package:keyboard_avoider/keyboard_avoider.dart'; - -// -import '../../../components/commonFun.dart'; -import '../../../components/doJSON.dart'; -import '../../../components/hyxx_data_handle.dart'; - -// "today": { -// "total": 4, -// "data": [ -// { -// "id": 428549, -// "car_number": "川15A2563", -// "cpys": "绿色", -// "zpsj": "2021-04-04 11:31:11", -// "dwip": "172.16.3.3", -// "dwms": "岷江南路森林小区附近", -// "cplx": "农用车", -// "lgmzs": 3, -// "pic_url": "/wwwroot/admin/Api/wwwroot/public/uploads/e936524e92f90541cbaeca3b092c95be.jpg", -// "video_url": "video/3_6063_20210404_113111_川15A2563.mp4" -// }, - -class TodayListZpjlContent extends StatefulWidget { - TodayListZpjlContent({ - @required this.hyshlx, - @required this.num, - @required this.text, - @required this.mapZpjl, - this.tsztText = '', - Key key, - }) : super(key: key); - String hyshlx; - String num; - String text; - Map mapZpjl; - String tsztText; - - _TodayListZpjlPageState createState() => _TodayListZpjlPageState(); -} - -//用TabController实现顶部tab切换 -class _TodayListZpjlPageState extends State { - //try_setState(); //避免如下异常报错 - try_setState() { - try { - setState(() {}); - } catch (e) { - print('setState(() {})异常:${e}'); - } - } - - dispose() { - super.dispose(); - } - - BuildContext _context; - - //flutter_screenUtil 4.x 用法,ScreenUtil.screenWidth (sdk>=2.6 : 1.sw) //设备宽度 - double _screenWidth = 1.sw; - - double _marginLeft = 25; - double _marginCenter = 35; - double _fontSize = 16; - double _widthLeft = 40; // = _screenWidth / 3; - double _iconSize = 18; - double _stampSize = 100; - double _listTileHeight = 30; - Color _iconColor = Colors.blue; - double _marginVer = 10; - - Map _mapTsjjGetTsStatus = {}; - - Map mapName = {}; - - void initState() { - _context = context; - _widthLeft = _screenWidth / 2.6; - //getListFlields(); - - //得到字段名称 - mapName['plate_id'] = widget.hyshlx == 'jrzp' ? 'car_number' : 'plate_id'; - mapName['plate_color'] = widget.hyshlx == 'jrzp' ? 'cpys' : 'plate_color'; - - imageWztp = getWztp(); //得到违章图片 - super.initState(); - } - - double _radioImage = 9 / 16; - - // 使用 cached_network_image 插件实现网络图片缓存 - // 使用 flutter_drag_scale 实现可缩放可拖拽双击放大的图片功能。PhotoView插件不好用,有问题 - Widget getNetworkImage(String url) { - return CachedNetworkImage( - imageUrl: url, - alignment: Alignment.topCenter, - imageBuilder: (context, imageProvider) => DragScaleContainer( - doubleTapStillScale: true, child: Image(image: imageProvider, fit: BoxFit.fill) - // child: Image( - // image: NetworkImage( - // 'http://h.hiphotos.baidu.com/zhidao/wh%3D450%2C600/sign=0d023672312ac65c67506e77cec29e27/9f2f070828381f30dea167bbad014c086e06f06c.jpg'), - // ), - ), - // imageBuilder: (context, imageProvider) => PhotoView( - // imageProvider: imageProvider, - // ), - //placeholder: (context, url) => CircularProgressIndicator(), - placeholder: (context, url) => - getMoreWidget(color: Colors.black38, size: 20.0, strokeWidth: 2.0), - errorWidget: (context, url, error) => Icon(Icons.error), - ); - } - - // 167 50 3.34 - Widget getLgmzs(int lgmzs, {double width = 127, double height = 127}) { - int _rgb = (255 * (5 - lgmzs)) ~/ 5; - return Stack( - children: [ - Container( - width: ScreenUtil().setWidth(width), - height: ScreenUtil().setHeight(height), - padding: EdgeInsets.only( - right: ScreenUtil().setWidth(6), left: ScreenUtil().setWidth(6), top: 0, bottom: 4), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - Text('$lgmzs级${lgmzs * 20}%', style: TextStyle(fontSize: 10)), - //SizedBox(height: 0), - Container( - width: ScreenUtil().setWidth(66), - height: ScreenUtil().setHeight(66), - decoration: BoxDecoration( - border: Border.all(color: Colors.grey), - color: Color.fromRGBO(_rgb, _rgb, _rgb, 1.0), - borderRadius: new BorderRadius.circular(0), - ), - ) - ], - ), - ), - Positioned( - top: ScreenUtil().setHeight(4), - child: Container( - width: ScreenUtil().setWidth(width), - height: ScreenUtil().setHeight(height - 8), - padding: EdgeInsets.only( - right: ScreenUtil().setWidth(6), left: ScreenUtil().setWidth(6), top: 0, bottom: 0), - decoration: BoxDecoration( - border: Border.all( - color: (lgmzs == widget.mapZpjl['lgmzs']) - ? Colors.red - : Color.fromRGBO(244, 244, 244, 1), - width: 2), - //color: Colors.lightBlue, - borderRadius: new BorderRadius.circular(3.0), - ), - ), - ) - ], - ); - } - - //得到tsjj页面组件 - //1、得到格林曼黑度标准和视频播放按钮组件 - Widget getHdAndPlay() { - return Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - getLgmzs(0), - getLgmzs(1), - getLgmzs(2), - getLgmzs(3), - getLgmzs(4), - getLgmzs(5, width: 153), - getIconBtnSizeX( - height: 104, - //getIconBtnSizeX 中已经使用ScreenUtil().setHeight(126),此处不能传 ScreenUtil().setHeight(126) ,否则严重错位 - width: 168, - text: "视频", - textSize: 12, - circular: 4, - color: Color.fromRGBO(52, 157, 237, 1), - onTop: () async { - if (Playing) { - //禁止同时启动两次播放器 - return; - } - - Playing = true; //禁止同时启动两次播放器 - urlnew = getMediaUrl(widget.mapZpjl['video_url']); - - //获取视频地址失败 - if (!isVideoUrl(urlnew)) { - return; - } - - Navigator.of(_context).push(MaterialPageRoute( - builder: (context) => SuperPlayerPage( - loop: 0, //设置播放循环,默认播放器的循环次数是1, 即不循环播放。如果设置循环次数0,表示无限循环。 - url: urlnew, - title: - '${widget.text}视频${widget.num}\n${widget.mapZpjl[mapName['plate_id']]}(${getDwmc(widget.mapZpjl['dwip'])})'))); - - // Navigator.of(_context).push(MaterialPageRoute( - // builder: (context) => PlayerProNew( - // loop: 0, //设置播放循环,默认播放器的循环次数是1, 即不循环播放。如果设置循环次数0,表示无限循环。 - // url: urlnew, - // title: - // '${widget.text}视频${widget.num}\n${widget.mapZpjl[mapName['plate_id']]}(${getDwmc(widget.mapZpjl['dwip'])})'))); - }, - ), - SizedBox(width: ScreenUtil().setWidth(15)), - ], - ); - } - - Widget imageWztp; - - //2、得到违章图片组件 - Widget getWztp() { - //ratioList[index] = 0.5714285714285714 - return Stack( - children: [ - Container( - width: ScreenUtil().setWidth(1022), - //height: ScreenUtil().setHeight(639), - //height: ScreenUtil().setHeight(22 + 1022 * _radioImage), - height: ScreenUtil().setHeight(30 + 1022 * g_radioImage), - decoration: BoxDecoration( - //color: Colors.white, - borderRadius: BorderRadius.all( - Radius.circular(12), - ), - ), - ), - Positioned( - //left: ScreenUtil().setWidth(_marginLeft), - top: ScreenUtil().setHeight(_marginLeft), - child: Container( - width: ScreenUtil().setWidth(1022), - // height: ScreenUtil().setHeight(30 + 1022 * _radioImage), - height: ScreenUtil().setHeight(30 + 1022 * g_radioImage), - child: getNetworkImage(getMediaUrl(widget.mapZpjl['pic_url'])), - ), - ) - ], - ); - } - - // void printScreenInformation() { - // print('Device width dp:${1.sw}dp'); - // print('Device height dp:${1.sh}dp'); - // print('Device pixel density:${ScreenUtil().pixelRatio}'); - // print('Bottom safe zone distance dp:${ScreenUtil().bottomBarHeight}dp'); - // print('Status bar height dp:${ScreenUtil().statusBarHeight}dp'); - // print('The ratio of actual width to UI design:${ScreenUtil().scaleWidth}'); - // print( - // 'The ratio of actual height to UI design:${ScreenUtil().scaleHeight}'); - // print('System font scaling:${ScreenUtil().textScaleFactor}'); - // print('0.5 times the screen width:${0.5.sw}dp'); - // print('0.5 times the screen height:${0.5.sh}dp'); - // } - - void printScreenInformation() { - print('ScreenUtil().screenWidth = ${ScreenUtil().screenWidth}'); - print('设备宽度:${1.sw}dp'); - print('"1.w" = ${1.w}'); - print('"1.sw" = ${1.sw}'); - print('设备高度:${1.sh}dp'); - print('设备的像素密度:${ScreenUtil().pixelRatio}'); - print('底部安全区距离:${ScreenUtil().bottomBarHeight}dp'); - print('状态栏高度:${ScreenUtil().statusBarHeight}dp'); - print('实际宽度的dp与设计稿px的比例:${ScreenUtil().scaleWidth}'); - print('实际高度的dp与设计稿px的比例:${ScreenUtil().scaleHeight}'); - print('宽度和字体相对于设计稿放大的比例:${ScreenUtil().scaleWidth * ScreenUtil().pixelRatio}'); - print('高度相对于设计稿放大的比例:${ScreenUtil().scaleHeight * ScreenUtil().pixelRatio}'); - print('系统的字体缩放比例:${ScreenUtil().textScaleFactor}'); - print('屏幕宽度的0.5:${0.5.sw}dp'); - print('屏幕高度的0.5:${0.5.sh}dp'); - } - - //3、得到违章图片说明信息组件 - Widget getWztpSmxx() { - return Container( - width: ScreenUtil().setWidth(1022), - height: ScreenUtil().setHeight(390), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all( - Radius.circular(12), - ), - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - //违章信息组件1:车牌号码、车牌颜色 - getWzxxPart1(), - //违章信息组件2:抓拍时间组件 - getWzxxText('抓拍时间:' + widget.mapZpjl['zpsj']), - //违章信息组件3:车牌类型 + 黑度 - getWzxxPart3(), - //违章信息组件4:抓拍地点(简称) - getWzxxText('抓拍地点:' + getDwmc(widget.mapZpjl['dwip']) + ' (简称)'), - //违章信息组件5:抓拍地点 - getWzxxText('抓拍地点:' + widget.mapZpjl['dwms']), - ], - ), - ); - } - - // I/flutter (22989): ScreenUtil().screenWidth = 360.0 - // I/flutter (22989): 设备宽度:360.0dp - // I/flutter (22989): "1.w" = 0.3333333333333333 - // I/flutter (22989): "1.sw" = 360.0 - // I/flutter (22989): 设备高度:640.0dp - // I/flutter (22989): 设备的像素密度:3.0 - // I/flutter (22989): 底部安全区距离:0.0dp - // I/flutter (22989): 状态栏高度:24.0dp - // I/flutter (22989): 实际宽度的dp与设计稿px的比例:0.3333333333333333 - // I/flutter (22989): 实际高度的dp与设计稿px的比例:0.3333333333333333 - // I/flutter (22989): 宽度和字体相对于设计稿放大的比例:1.0 - // I/flutter (22989): 高度相对于设计稿放大的比例:1.0 - // I/flutter (22989): 系统的字体缩放比例:1.0 - // I/flutter (22989): 屏幕宽度的0.5:180.0dp - // I/flutter (22989): 屏幕高度的0.5:320.0dp - - //3、得到违章信息组件1:车牌号码、车牌颜色 - //车牌颜色Map cpysMap = { - // '蓝色': cpysItem( - // cpysText: '蓝色', - // cpysBackground: Colors.blue, - // cpysFont: Colors.white, - // cpysBorder: Colors.orange), - // } - Widget getWzxxPart1() { - //printScreenInformation(); - return Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox(width: ScreenUtil().setWidth(_marginLeft)), - getTitleText('车牌号码:'), - getBoderText(widget.mapZpjl[mapName['plate_id']].toString(), - width: ScreenUtil().setWidth(1022 / 3.2)), - Expanded(child: SizedBox.shrink()), - getTitleText('颜色:'), - getBoderText(widget.mapZpjl[mapName['plate_color']], - width: ScreenUtil().setWidth(1022 / 4.8)), - SizedBox(width: ScreenUtil().setWidth(_marginLeft)), - ], - ); - } - - Widget getTitleRichText(String text1, {String text2 = '', double fontSize = 16}) { - return RichText( - overflow: TextOverflow.ellipsis, - textAlign: TextAlign.left, - text: TextSpan( - text: text1, - style: TextStyle(fontSize: fontSize, color: Colors.black), - children: [ - TextSpan( - text: text2, - style: TextStyle(fontSize: fontSize, color: Colors.blue, fontWeight: FontWeight.w500), - ), - ], - ), - ); - } - - Widget getTitleText(String text, {double fontSize = 16}) { - return Text(text, - style: TextStyle(fontSize: fontSize), - textAlign: TextAlign.left, - overflow: TextOverflow.ellipsis); - } - - Widget getTrailText(String text, {double fontSize = 16, double off = 0}) { - return Container( - width: _screenWidth - _widthLeft - off - (2 * ScreenUtil().setWidth(_marginLeft)), - child: Text(text, - style: TextStyle(fontSize: fontSize), - textAlign: TextAlign.left, - overflow: TextOverflow.ellipsis), - ); - } - - Widget getBoderText(String text, {double width = 40}) { - cpysItem _cpysItem = cpysMap[widget.mapZpjl[mapName['plate_color']]]; - - return Container( - //color: _cpysItem.cpysBackground, - alignment: Alignment(0, -1), - width: width, - decoration: BoxDecoration( - border: Border.all(color: _cpysItem.cpysBorder, width: 2), - color: _cpysItem.cpysBackground, - borderRadius: BorderRadius.circular(3), - ), - child: Padding( - padding: EdgeInsets.only(bottom: 3), - child: Text(text, - style: TextStyle(fontSize: _fontSize, color: _cpysItem.cpysFont), - textAlign: TextAlign.left, - overflow: TextOverflow.ellipsis), - ), - ); - } - - //I/flutter (17555): mapZpjl = { - // id: 1222, plate_id: 川Q736X2, plate_color: 蓝色, zpsj: 1612857077, yjxx_id: 1399, workflow: 999, - // video_url: video/9_6063_20210209_155117_川Q736X2.mp4, - // pic_url: /wwwroot/admin/Api/wwwroot/public/uploads/9d2f45fd24b41f2b94abe42b30970d75.jpg, - // clfl: 集装箱卡车, dwip: 172.16.3.9, dwms: 宜长路出城方向, lgmzs: 3, jczxd: 994, sfhy: 黑烟车 - // } - - Widget getIcon(IconData _iconData) { - return Container( - width: _iconSize - 2, - height: _iconSize, - child: Padding( - padding: EdgeInsets.only(top: 2), - child: Icon(_iconData, size: _iconSize, color: _iconColor), - ), - ); - } - - Widget getWzxxText(String _text, {double fontSize = 16}) { - return Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox(width: ScreenUtil().setWidth(_marginLeft)), - Container( - alignment: Alignment(-1, 0), - width: ScreenUtil().setWidth(1022) - ScreenUtil().setWidth(_marginLeft), - child: Text(_text, - style: TextStyle(fontSize: fontSize), - textAlign: TextAlign.left, - overflow: TextOverflow.ellipsis), - ), - ], - ); - } - - Widget getWzxxPart3() { - return Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox(width: ScreenUtil().setWidth(_marginLeft)), - Container( - alignment: Alignment(-1, 0), - //width: ScreenUtil().setWidth(1022) - ScreenUtil().setWidth(_marginLeft), - child: getTitleText('车牌类型:' + widget.mapZpjl['cplx']), - ), - Expanded(child: SizedBox.shrink()), - //getTitleText('黑度: ${widget.mapZpjl['lgmzs']}'), - getTitleRichText('黑度:', text2: '${widget.mapZpjl['lgmzs']} '), - SizedBox(width: ScreenUtil().setWidth(_marginLeft)), - ], - ); - } - - Widget getText(String text, {Color color}) { - return Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Container( - alignment: Alignment(-1, 0), - width: ScreenUtil().setWidth(1022 - 2 * _marginLeft), - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox(width: ScreenUtil().setWidth(_marginLeft)), - Text(text, - textAlign: TextAlign.left, - overflow: TextOverflow.ellipsis, - style: TextStyle(color: color)) - ], - ), - ), - ], - ); - } - - Widget getText2(String text1, String text2, String text3, {Color color}) { - return Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Container( - alignment: Alignment(-1, 0), - width: ScreenUtil().setWidth(1022 - 2 * _marginLeft), - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox(width: ScreenUtil().setWidth(_marginLeft)), - Text(text1, textAlign: TextAlign.left), - Text(text2, - textAlign: TextAlign.left, - overflow: TextOverflow.ellipsis, - style: TextStyle(color: color, fontWeight: FontWeight.w500)), - Text(text3, textAlign: TextAlign.left), - ], - ), - ), - ], - ); - } - - //5、得到黑烟初审'hycsInfo'、或者黑烟'hyfhInfo'複核信息组件 - //style: TextStyle(fontSize: _fontSize), - Widget getHyshInfo(String _hyshInfo) { - String _hyshLx = (_hyshInfo == 'hycsInfo' ? '初审' : '复审'); //黑烟审核类型 - String _hyshYh = (_hyshInfo == 'hycsInfo' ? 'cs_username' : 'fs_username'); //黑烟审核用户 - String _hyshSj = (_hyshInfo == 'hycsInfo' ? 'cs_time' : 'fs_time'); //黑烟审核时间 - String _hyshJg = (_hyshInfo == 'hycsInfo' ? 'cs_tile' : 'fs_tile'); //黑烟审核结果 - String _hyshYj = (_hyshInfo == 'hycsInfo' ? 'cs_shuoming' : 'fs_shuoming'); //黑烟审核意见 - - double _height = _hyshInfo == 'hyfhInfo' && widget.hyshlx == 'tsjj' ? 315 : 265; - return Column( - children: [ - Container( - width: ScreenUtil().setWidth(1022), - height: ScreenUtil().setHeight(_height), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all( - Radius.circular(12), - ), - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Container( - alignment: Alignment(-1, 0), - width: ScreenUtil().setWidth(1022 - 2 * _marginLeft), - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox(width: ScreenUtil().setWidth(_marginLeft)), - Text('${_hyshLx}结果:' + widget.mapZpjl[_hyshJg], - textAlign: TextAlign.left, overflow: TextOverflow.ellipsis), - SizedBox(width: ScreenUtil().setWidth(20)), - Container( - width: my_iconSize, - height: my_iconSize, - decoration: widget.mapZpjl[_hyshJg] == '' - ? null - : BoxDecoration( - //color: Colors.white, - image: DecorationImage( - image: AssetImage(widget.mapZpjl[_hyshJg] == "黑烟车" - ? "assets/images/hyc.png" - : "assets/images/fhyc.png"), - fit: BoxFit.contain), - ), - alignment: Alignment.center, - //child: - ), - ], - ), - ), - ], - ), - getText('${_hyshLx}意见:' + widget.mapZpjl[_hyshYj]), - getText('${_hyshLx}用户:' + widget.mapZpjl[_hyshYh]), - getText('${_hyshLx}时间:' + widget.mapZpjl[_hyshSj]), - _hyshInfo == 'hyfhInfo' && widget.hyshlx == 'tsjj' - ? (getText2('推送状态:', widget.tsztText, ' (${getDate(widget.mapZpjl['ts_time'])})', - color: - widget.tsztText.indexOf('成功') >= 0 ? Colors.blueAccent : Colors.black26)) - : SizedBox.shrink(), - ], - ), - ), - SizedBox(height: ScreenUtil().setHeight(_marginVer)), - ], - ); - } - - //9、得到推送交警状态信息组件7:推送状态 - // tszt 整型 推送状态:0-未推送 | 1-推送失败 | 3-推送成功 - //_mapTsjjGetTsStatus['tszt'] - Widget getWzxxPart7() { - return Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox(width: ScreenUtil().setWidth(_marginLeft)), - Container( - alignment: Alignment(-1, 0), - width: _screenWidth - ScreenUtil().setWidth(_marginLeft), - child: getTitleText('推送状态:' + mapTsztText[_mapTsjjGetTsStatus['tszt']]), - ), - ], - ); - } - - //10、得到推送交警确认组件 - Widget getTsjjQr() { - return Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - getBtnSizeX( - text: "返回", - onPressedFun: () async { - Navigator.pop(context); - }, - width: 90.0), - ], - ); - } - - bool showMoreWidget = false; - - @override - Widget build(BuildContext context) { - return Scaffold( - //resizeToAvoidBottomPadding: false, - appBar: PreferredSize( - preferredSize: Size.fromHeight(ScreenUtil().setHeight(173)), // 设置appBar高度 - // 设置appBar高度 - child: AppBar( - automaticallyImplyLeading: false, - centerTitle: true, - titleSpacing: 0.0, - //设置title的左边距 - flexibleSpace: Container( - //SizedBox(height: ScreenUtil().statusBarHeight), //显示顶部状态栏 - // SizedBox(height: ScreenUtil().setHeight(10)), //显示顶部状态栏 - padding: EdgeInsets.only(top: ScreenUtil().statusBarHeight), //留出顶部状态栏高度 - child: Container( - //height: ScreenUtil().setHeight(173), - decoration: BoxDecoration( - gradient: LinearGradient( - begin: Alignment.centerLeft, - end: Alignment.centerRight, - colors: [ - Color.fromRGBO(12, 186, 156, 1), - Color.fromRGBO(39, 127, 235, 1), - ], - ), - ), - // decoration: BoxDecoration( - // gradient: LinearGradient(colors: [ - // Color(0xFF0018EB), - // Color(0xFF01C1D9), - // ], begin: Alignment.bottomCenter, end: Alignment.topCenter), - // ), - ), - ), - title: Padding( - padding: EdgeInsets.only(left: 0, right: 0), - child: Row( - //mainAxisAlignment: MainAxisAlignment.start, - children: [ - getIconAndTextButton( - iconColor: Colors.white, - iconData: Icons.chevron_left_outlined, - onPress: showMoreWidget - ? null - : () { - Navigator.pop(context); - }, - ), - Expanded( - child: Text(widget.text + '记录' + widget.num, - style: TextStyle(color: Colors.white, fontSize: 20), - textAlign: TextAlign.center, - overflow: TextOverflow.ellipsis), - ), - SizedBox(width: 30), - ], - ), - ), - ), - ), - body: null == imageWztp - // 显示加载中的圈圈 - ? getMoreWidget(color: Colors.black38, size: 20.0, strokeWidth: 2.0) - : Stack( - children: [ - //SizedBox.shrink() 创建父类允许最小尺寸的约束Box - showMoreWidget - ? Align( - alignment: Alignment(0, 0.8), - child: Container( - height: 200, - width: 200, - child: getMoreWidget2( - text: '加载中...', - color: Colors.red, - size: 40.0, - strokeWidth: 3.0), //显示加载中的圈圈, - ), - ) - : SizedBox.shrink(), - KeyboardAvoider( - autoScroll: true, - child: Container( - color: Color.fromRGBO(244, 244, 244, 1), - child: Column( - children: [ - //1、得到格林曼黑度标准和视频播放按钮组件 - getHdAndPlay(), - //2、得到违章图片组件 - imageWztp, - SizedBox(height: ScreenUtil().setHeight(_marginVer)), - //3、得到违章图片说明信息组件 - getWztpSmxx(), - SizedBox(height: ScreenUtil().setHeight(_marginVer)), - //7、得到黑烟初审信息组件 - widget.hyshlx == 'hycs' || - widget.hyshlx == 'hyfh' || - widget.hyshlx == 'tsjj' - ? getHyshInfo('hycsInfo') - : SizedBox.shrink(), - //8、得到黑烟复审信息组件 - widget.hyshlx == 'hyfh' || widget.hyshlx == 'tsjj' - ? getHyshInfo('hyfhInfo') - : SizedBox.shrink(), - SizedBox(height: widget.hyshlx == 'tsjj' ? 0 : 15), - //9、得到推送交警确认组件 - getTsjjQr(), - //SizedBox(height: 10), - ], - ), - ), - ), - widget.hyshlx == 'tsjj' - ? Positioned( - //alignment: Alignment(0.9, 0.35), - //alignment: Alignment(0.8, 0.45), - right: ScreenUtil().setWidth(50), - top: ScreenUtil().setHeight(1423), - child: Container( - //alignment: Alignment(0.5, -0.5), - width: _stampSize, - height: _stampSize, - //color: Colors.black12, - decoration: BoxDecoration( - //color: Colors.white, - image: DecorationImage( - //image: AssetImage("assets/images/jkzx_stamp.png"), fit: BoxFit.contain), - image: AssetImage(widget.mapZpjl['fs_tile'] == '黑烟车' - ? "assets/images/hyc.png" - : "assets/images/fhyc.png"), - fit: BoxFit.contain), - ), - //child: - ), - ) - : SizedBox.shrink(), - ], - ), - ); - } - - Widget getBtnSizeX({@required text, width = 70.0, height = 35.0, onPressedFun}) { - return Container( - color: Colors.white12, //onPressedFun为null时无效 - width: width, - height: height, - child: RaisedButton( - padding: EdgeInsets.all(0), - textColor: Colors.black, - child: Text(text), - onPressed: onPressedFun, - ), - ); - } -} diff --git a/lib/pages/Works/TJXX/today_list_zpjl_content_new.dart b/lib/pages/Works/TJXX/today_list_zpjl_content_new.dart index 4773f18..5d7ef70 100644 --- a/lib/pages/Works/TJXX/today_list_zpjl_content_new.dart +++ b/lib/pages/Works/TJXX/today_list_zpjl_content_new.dart @@ -507,10 +507,12 @@ class _TodayListZpjlPageState extends State { mainAxisAlignment: MainAxisAlignment.start, children: [ SizedBox(width: ScreenUtil().setWidth(_marginLeft)), - Text(text, - textAlign: TextAlign.left, - overflow: TextOverflow.ellipsis, - style: TextStyle(color: color)) + // Flutter 解决Text内容展示越界 + Expanded( + child: Text(text, + textAlign: TextAlign.left, + overflow: TextOverflow.ellipsis, + style: TextStyle(color: color))) ], ), ), From 5f4c95c7443e9c75b3d1267fcdec366562e84965 Mon Sep 17 00:00:00 2001 From: WinUser01 Date: Tue, 3 May 2022 23:29:28 +0800 Subject: [PATCH 06/13] =?UTF-8?q?hyzp=5Fybqx-Commit144=EF=BC=9A=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E5=88=9D=E5=AE=A1=E4=B8=BA=E9=9D=9E=E9=BB=91=E7=83=9F?= =?UTF-8?q?=E3=80=81=E5=A4=8D=E5=AE=A1=E9=BB=98=E8=AE=A4=E5=8B=BE=E9=80=89?= =?UTF-8?q?=E9=9D=9E=E9=BB=91=E7=83=9F=E8=BD=A6=EF=BC=8C=E5=90=8C=E6=97=B6?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=8B=BE=E9=80=89=E2=80=9C=E5=90=8C=E6=97=B6?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E4=BA=A4=E8=AD=A6=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/Works/HYSH/hysh_group.dart | 64 +--------------------------- 1 file changed, 1 insertion(+), 63 deletions(-) diff --git a/lib/pages/Works/HYSH/hysh_group.dart b/lib/pages/Works/HYSH/hysh_group.dart index 3f34084..2c9a334 100644 --- a/lib/pages/Works/HYSH/hysh_group.dart +++ b/lib/pages/Works/HYSH/hysh_group.dart @@ -48,6 +48,7 @@ class _HyshGroupState extends State { void initState() { _selectedRadio = widget.selectedRadio; + tsjj = _selectedRadio == 0 ? true : false; // 解决初审为非黑烟、复审默认勾选非黑烟车,同时取消勾选“同时推送交警” //黑烟审核推送交警Checkbox改变事件 eventBus.on().listen((event) { @@ -407,69 +408,6 @@ class _HyshGroupState extends State { ); } - //5.3-0、得到审核结果组件 - Widget getShjg0(int index) { - return Container( - width: ScreenUtil().setWidth(1022), - height: ScreenUtil().setHeight(175), - child: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox(width: my_marginLeft), - Text((widget.hyshlx == 'hyfh' ? '复审' : '初审') + '结果: ', - style: TextStyle( - fontSize: widget.fontSize, - color: 0 == _selectedRadio ? Colors.red : Colors.green)), - CustomRadioWidget( - value: 0, - title: mapHyshlx[hyshlx]['nick_text'] + "为黑烟车", - fontSize: widget.fontSize, - width: ScreenUtil().setWidth(400), - groupValue: _selectedRadio, - onChanged: (int value) { - _selectedRadio = value; - fh_hyc = true; //复审为黑烟车 - tsjj = true; //同时推送交警 - //黑烟初审数据审核Radio选项改变广播 - eventBus.fire(HycsDataAuditRadioEvent('黑烟初审数据审核Radio选项已改变', _selectedRadio)); - setState(() {}); - print('selectedRadio = ${_selectedRadio.toString()}'); - }, - ), - ], - ), - SizedBox(height: ScreenUtil().setHeight(15)), - Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox(width: my_marginLeft), - Text((widget.hyshlx == 'hyfh' ? '复审' : '初审') + '结果: ', - style: TextStyle(fontSize: widget.fontSize, color: Colors.white)), - CustomRadioWidget( - value: 1, - title: "非黑烟车", - fontSize: widget.fontSize, - width: ScreenUtil().setWidth(400), - groupValue: _selectedRadio, - onChanged: (int value) { - _selectedRadio = value; - fh_hyc = false; //复审为黑烟车 - tsjj = false; //同时推送交警 - //黑烟初审数据审核Radio选项改变广播 - eventBus.fire(HycsDataAuditRadioEvent('黑烟初审数据审核Radio选项已改变', _selectedRadio)); - setState(() {}); - print('selectedRadio = ${_selectedRadio.toString()}'); - }, - ), - ], - ), - ], - ), - ); - } - //5.2、得到审核意见组件 Widget getShyj(int index) { // return ConstrainedBox( From e15d953342b6ffc2c334137b8f3f894662b149ea Mon Sep 17 00:00:00 2001 From: WinUser01 Date: Wed, 4 May 2022 09:11:05 +0800 Subject: [PATCH 07/13] =?UTF-8?q?hyzp=5Fybqx-Commit145=EF=BC=9A=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E5=AD=97=E5=A4=A7=E5=B0=8F=E4=B8=8D=E9=9A=8F?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E5=AD=97=E4=BD=93=E8=AE=BE=E7=BD=AE=E6=94=B9?= =?UTF-8?q?=E5=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/components/commonFun.dart | 2 +- lib/main.dart | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/components/commonFun.dart b/lib/components/commonFun.dart index b601d3b..96fc6cf 100644 --- a/lib/components/commonFun.dart +++ b/lib/components/commonFun.dart @@ -875,7 +875,7 @@ Widget getImageWidget() { color: Color.fromRGBO(49, 216, 123, 1), fontWeight: FontWeight.bold)), ), - SizedBox(height: ScreenUtil().setHeight(copyright_info.contains('\n') ? 40 : 90)), + SizedBox(height: ScreenUtil().setHeight(copyright_info.contains('\n') ? 25 : 90)), Container( alignment: Alignment.center, child: Text(copyright_info, diff --git a/lib/main.dart b/lib/main.dart index 9864b49..61fbf21 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -184,6 +184,13 @@ class _MyAppState extends State { theme: ThemeData( // primaryColor: Colors.yellow primaryColor: Colors.white), + //设置文字大小不随系统字体设置改变 + builder: (context, widget) { + return MediaQuery( + data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0), + child: widget, + ); + }, ), ), ); From d4b515d9e2ceff6d30fe761f674122ed87adf351 Mon Sep 17 00:00:00 2001 From: WinUser01 Date: Wed, 4 May 2022 09:29:58 +0800 Subject: [PATCH 08/13] =?UTF-8?q?hyzp=5Fybqx-Commit146=EF=BC=9A=20?= =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=88=9D=E5=AE=A1=E4=B8=BA=E9=9D=9E=E9=BB=91?= =?UTF-8?q?=E7=83=9F=E3=80=81=E5=A4=8D=E5=AE=A1=E9=BB=98=E8=AE=A4=E5=8B=BE?= =?UTF-8?q?=E9=80=89=E9=9D=9E=E9=BB=91=E7=83=9F=E8=BD=A6=EF=BC=8C=E5=90=8C?= =?UTF-8?q?=E6=97=B6=E5=8F=96=E6=B6=88=E5=8B=BE=E9=80=89=E5=B9=B6=E7=A6=81?= =?UTF-8?q?=E7=94=A8=E2=80=9C=E5=90=8C=E6=97=B6=E6=8E=A8=E9=80=81=E4=BA=A4?= =?UTF-8?q?=E8=AD=A6=E2=80=9D=E5=A4=8D=E9=80=89=E6=A1=86=20=20=20=20=20tsj?= =?UTF-8?q?j=20=3D=20=5FselectedRadio=20=3D=3D=200=20=3F=20true=20:=20fals?= =?UTF-8?q?e;=20//=20=E6=98=AF=E5=90=A6=E9=80=89=E4=B8=AD=E2=80=9C?= =?UTF-8?q?=E5=90=8C=E6=97=B6=E6=8E=A8=E9=80=81=E4=BA=A4=E8=AD=A6=E2=80=9D?= =?UTF-8?q?=E5=A4=8D=E9=80=89=E6=A1=86=20=20=20=20=20fh=5Fhyc=20=3D=20=5Fs?= =?UTF-8?q?electedRadio=20=3D=3D=200=20=3F=20true=20:=20false;=20//=20?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E7=A6=81=E7=94=A8=E2=80=9C=E5=90=8C=E6=97=B6?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E4=BA=A4=E8=AD=A6=E2=80=9D=E5=A4=8D=E9=80=89?= =?UTF-8?q?=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/Works/HYSH/hysh_group.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/pages/Works/HYSH/hysh_group.dart b/lib/pages/Works/HYSH/hysh_group.dart index 2c9a334..5719938 100644 --- a/lib/pages/Works/HYSH/hysh_group.dart +++ b/lib/pages/Works/HYSH/hysh_group.dart @@ -48,7 +48,10 @@ class _HyshGroupState extends State { void initState() { _selectedRadio = widget.selectedRadio; - tsjj = _selectedRadio == 0 ? true : false; // 解决初审为非黑烟、复审默认勾选非黑烟车,同时取消勾选“同时推送交警” + + // 解决初审为非黑烟、复审默认勾选非黑烟车,同时取消勾选“同时推送交警”复选框 + tsjj = _selectedRadio == 0 ? true : false; // 是否选中“同时推送交警”复选框 + fh_hyc = _selectedRadio == 0 ? true : false; // 是否禁用“同时推送交警”复选框 //黑烟审核推送交警Checkbox改变事件 eventBus.on().listen((event) { From 05fc688d4b9aadbe4025da4c6acdd7b757281a74 Mon Sep 17 00:00:00 2001 From: WinUser01 Date: Wed, 4 May 2022 11:59:12 +0800 Subject: [PATCH 09/13] =?UTF-8?q?hyzp=5Fybqx-Commit147=EF=BC=9A=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8F=B7=E6=9B=B4=E6=96=B0=E4=B8=BAversion:=201.4.31+?= =?UTF-8?q?20220506?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pubspec.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index c6cc40d..40cad69 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -68,7 +68,8 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev #version: 1.4.27+20220426 #version: 1.4.28+20220426 #version: 1.4.29+20220502 -version: 1.4.30+20220504 +#version: 1.4.30+20220504 +version: 1.4.31+20220506 environment: sdk: ">=2.7.0 <3.0.0" From e16c970b9a7013bed078d3ea95ea44c9c473c08e Mon Sep 17 00:00:00 2001 From: WinUser01 Date: Fri, 6 May 2022 16:49:25 +0800 Subject: [PATCH 10/13] =?UTF-8?q?hyzp=5Fybqx-Commit148=EF=BC=9A=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E4=BB=8A=E6=97=A5=E7=BB=9F=E8=AE=A1=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9A=84=E5=B8=83=E5=B1=80=EF=BC=8C=E5=9C=A8?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E9=A1=B5=E9=9D=A2=E4=B8=AD=E5=B0=B1=E8=83=BD?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=AE=8C=EF=BC=8C=E9=81=BF=E5=85=8D=E6=BB=9A?= =?UTF-8?q?=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TJXX/today_list_zpjl_content_new.dart | 41 +- .../TJXX/today_list_zpjl_content_new0.dart | 873 ++++++++++++++++++ 2 files changed, 910 insertions(+), 4 deletions(-) create mode 100644 lib/pages/Works/TJXX/today_list_zpjl_content_new0.dart diff --git a/lib/pages/Works/TJXX/today_list_zpjl_content_new.dart b/lib/pages/Works/TJXX/today_list_zpjl_content_new.dart index 5d7ef70..65a5701 100644 --- a/lib/pages/Works/TJXX/today_list_zpjl_content_new.dart +++ b/lib/pages/Works/TJXX/today_list_zpjl_content_new.dart @@ -1,6 +1,7 @@ //import '../../../widget/player_pro.dart'; import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flustars/flustars.dart' as flustars; //该组件中有ScreenUtil import 'package:flutter/material.dart'; import 'package:flutter_drag_scale/flutter_drag_scale.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -11,7 +12,6 @@ import 'package:keyboard_avoider/keyboard_avoider.dart'; import '../../../components/commonFun.dart'; import '../../../components/doJSON.dart'; import '../../../components/hyxx_data_handle.dart'; -import 'package:flustars/flustars.dart' as flustars; //该组件中有ScreenUtil // "today": { // "total": 4, @@ -520,6 +520,35 @@ class _TodayListZpjlPageState extends State { ); } + Widget getUserAndTime(String user, String time, {Color color}) { + return Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + alignment: Alignment(-1, 0), + width: ScreenUtil().setWidth(1022 - 2 * _marginLeft), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox(width: ScreenUtil().setWidth(_marginLeft)), + Text(user, + textAlign: TextAlign.left, + overflow: TextOverflow.ellipsis, + style: TextStyle(color: color)), + SizedBox(width: ScreenUtil().setWidth(_marginCenter)), + // Flutter 解决Text内容展示越界 + Expanded( + child: Text(time, + textAlign: TextAlign.left, + overflow: TextOverflow.ellipsis, + style: TextStyle(color: color))) + ], + ), + ), + ], + ); + } + Widget getText2(String text1, String text2, String text3, {Color color}) { return Row( mainAxisAlignment: MainAxisAlignment.start, @@ -553,7 +582,9 @@ class _TodayListZpjlPageState extends State { String _hyshJg = (_hyshInfo == 'hycsInfo' ? 'cs_tile' : 'fs_tile'); //黑烟审核结果 String _hyshYj = (_hyshInfo == 'hycsInfo' ? 'cs_shuoming' : 'fs_shuoming'); //黑烟审核意见 - double _height = _hyshInfo == 'hyfhInfo' && widget.hyshlx == 'tsjj' ? 315 : 265; + // double _height = _hyshInfo == 'hyfhInfo' && widget.hyshlx == 'tsjj' ? 315 : 265; + double _height = _hyshInfo == 'hyfhInfo' && widget.hyshlx == 'tsjj' ? 285 : 215; + return Column( children: [ Container( @@ -603,8 +634,10 @@ class _TodayListZpjlPageState extends State { ], ), getText('${_hyshLx}意见:' + mapZpjl[_hyshYj]), - getText('${_hyshLx}用户:' + mapZpjl[_hyshYh]), - getText('${_hyshLx}时间:' + mapZpjl[_hyshSj]), + // getText('${_hyshLx}用户:' + mapZpjl[_hyshYh]), + // getText('${_hyshLx}时间:' + mapZpjl[_hyshSj]), + getUserAndTime( + '${_hyshLx}用户:' + mapZpjl[_hyshYh], '${_hyshLx}时间:' + mapZpjl[_hyshSj]), _hyshInfo == 'hyfhInfo' && widget.hyshlx == 'tsjj' ? (getText2('推送状态:', widget.tsztText, ' (${getDate(mapZpjl['ts_time'])})', color: diff --git a/lib/pages/Works/TJXX/today_list_zpjl_content_new0.dart b/lib/pages/Works/TJXX/today_list_zpjl_content_new0.dart new file mode 100644 index 0000000..5d7ef70 --- /dev/null +++ b/lib/pages/Works/TJXX/today_list_zpjl_content_new0.dart @@ -0,0 +1,873 @@ +//import '../../../widget/player_pro.dart'; + +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_drag_scale/flutter_drag_scale.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:hyzp_ybqx/widget/my_superplayer.dart'; +import 'package:keyboard_avoider/keyboard_avoider.dart'; + +// +import '../../../components/commonFun.dart'; +import '../../../components/doJSON.dart'; +import '../../../components/hyxx_data_handle.dart'; +import 'package:flustars/flustars.dart' as flustars; //该组件中有ScreenUtil + +// "today": { +// "total": 4, +// "data": [ +// { +// "id": 428549, +// "car_number": "川15A2563", +// "cpys": "绿色", +// "zpsj": "2021-04-04 11:31:11", +// "dwip": "172.16.3.3", +// "dwms": "岷江南路森林小区附近", +// "cplx": "农用车", +// "lgmzs": 3, +// "pic_url": "/wwwroot/admin/Api/wwwroot/public/uploads/e936524e92f90541cbaeca3b092c95be.jpg", +// "video_url": "video/3_6063_20210404_113111_川15A2563.mp4" +// }, + +class TodayListZpjlContentNew extends StatefulWidget { + TodayListZpjlContentNew({ + @required this.hyshlx, + @required this.index, + // @required this.num, + @required this.text, + // @required this.mapZpjl, + this.tsztText = '', + Key key, + }) : super(key: key); + String hyshlx; + + // String num; + int index; + String text; + + // Map mapZpjl; + String tsztText; + + _TodayListZpjlPageState createState() => _TodayListZpjlPageState(); +} + +//用TabController实现顶部tab切换 +class _TodayListZpjlPageState extends State { + //try_setState(); //避免如下异常报错 + try_setState() { + try { + if (mounted) { + setState(() {}); + } + } catch (e) { + print('setState(() {})异常:${e}'); + } + } + + dispose() { + super.dispose(); + } + + BuildContext _context; + + //flutter_screenUtil 4.x 用法,ScreenUtil.screenWidth (sdk>=2.6 : 1.sw) //设备宽度 + double _screenWidth = 1.sw; + + double _marginLeft = 25; + double _marginCenter = 35; + double _fontSize = 16; + double _widthLeft = 40; // = _screenWidth / 3; + double _iconSize = 18; + double _stampSize = 100; + double _listTileHeight = 30; + Color _iconColor = Colors.blue; + double _marginVer = 10; + + Map _mapTsjjGetTsStatus = {}; + + Map mapName = {}; + + int listLen = 0; + String num; + Map mapZpjl; + + @override + void initState() { + _context = context; + _widthLeft = _screenWidth / 2.6; + //getListFlields(); + + //得到字段名称 + mapName['plate_id'] = widget.hyshlx == 'jrzp' ? 'car_number' : 'plate_id'; + mapName['plate_color'] = widget.hyshlx == 'jrzp' ? 'cpys' : 'plate_color'; + + getZpjlData(); // 得到 index 对应的今日抓拍记录数据 + super.initState(); + } + + getZpjlData() async { + listLen = listTodayList.length; + num = '(${widget.index + 1}/${listLen})'; + mapZpjl = listTodayList[widget.index]; + + // 获取网络图片尺寸,getMediaUrl(_mapGetTsjjGetData['pic_url']) + await flustars.WidgetUtil.getImageWH(url: getMediaUrl(mapZpjl['pic_url'])).then((rect) { + if (null != rect) { + _radioImage = rect.height / rect.width; + print("rect = $rect,_radioImage = $_radioImage"); + // rect = Rect.fromLTRB(0.0, 0.0, 0.0, 0.0),_radioImage = NaN + // rect = Rect.fromLTRB(0.0, 0.0, 4096.0, 3360.0),_radioImage = 0.8203125 + } + }); + + imageWztp = getWztp(); //得到违章图片 + getPreBtn_NextBtn(); + try_setState(); + } + + double _radioImage = 9 / 16; + + // 使用 cached_network_image 插件实现网络图片缓存 + // 使用 flutter_drag_scale 实现可缩放可拖拽双击放大的图片功能。PhotoView插件不好用,有问题 + Widget getNetworkImage(String url) { + return CachedNetworkImage( + imageUrl: url, + alignment: Alignment.topCenter, + imageBuilder: (context, imageProvider) => DragScaleContainer( + doubleTapStillScale: true, child: Image(image: imageProvider, fit: BoxFit.fill) + // child: Image( + // image: NetworkImage( + // 'http://h.hiphotos.baidu.com/zhidao/wh%3D450%2C600/sign=0d023672312ac65c67506e77cec29e27/9f2f070828381f30dea167bbad014c086e06f06c.jpg'), + // ), + ), + // imageBuilder: (context, imageProvider) => PhotoView( + // imageProvider: imageProvider, + // ), + //placeholder: (context, url) => CircularProgressIndicator(), + placeholder: (context, url) => + getMoreWidget(color: Colors.black38, size: 20.0, strokeWidth: 2.0), + errorWidget: (context, url, error) => Icon(Icons.error), + ); + } + + // 167 50 3.34 + Widget getLgmzs(int lgmzs, {double width = 127, double height = 127}) { + int _rgb = (255 * (5 - lgmzs)) ~/ 5; + return Stack( + children: [ + Container( + width: ScreenUtil().setWidth(width), + height: ScreenUtil().setHeight(height), + padding: EdgeInsets.only( + right: ScreenUtil().setWidth(6), left: ScreenUtil().setWidth(6), top: 0, bottom: 4), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Text('$lgmzs级${lgmzs * 20}%', style: TextStyle(fontSize: 10)), + //SizedBox(height: 0), + Container( + width: ScreenUtil().setWidth(66), + height: ScreenUtil().setHeight(66), + decoration: BoxDecoration( + border: Border.all(color: Colors.grey), + color: Color.fromRGBO(_rgb, _rgb, _rgb, 1.0), + borderRadius: new BorderRadius.circular(0), + ), + ) + ], + ), + ), + Positioned( + top: ScreenUtil().setHeight(4), + child: Container( + width: ScreenUtil().setWidth(width), + height: ScreenUtil().setHeight(height - 8), + padding: EdgeInsets.only( + right: ScreenUtil().setWidth(6), left: ScreenUtil().setWidth(6), top: 0, bottom: 0), + decoration: BoxDecoration( + border: Border.all( + color: + (lgmzs == mapZpjl['lgmzs']) ? Colors.red : Color.fromRGBO(244, 244, 244, 1), + width: 2), + //color: Colors.lightBlue, + borderRadius: new BorderRadius.circular(3.0), + ), + ), + ) + ], + ); + } + + //得到tsjj页面组件 + //1、得到格林曼黑度标准和视频播放按钮组件 + Widget getHdAndPlay() { + return Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + getLgmzs(0), + getLgmzs(1), + getLgmzs(2), + getLgmzs(3), + getLgmzs(4), + getLgmzs(5, width: 153), + getIconBtnSizeX( + height: 104, + //getIconBtnSizeX 中已经使用ScreenUtil().setHeight(126),此处不能传 ScreenUtil().setHeight(126) ,否则严重错位 + width: 168, + text: "视频", + textSize: 12, + circular: 4, + color: Color.fromRGBO(52, 157, 237, 1), + onTop: () async { + if (Playing) { + //禁止同时启动两次播放器 + return; + } + + Playing = true; //禁止同时启动两次播放器 + urlnew = getMediaUrl(mapZpjl['video_url']); + + //获取视频地址失败 + if (!isVideoUrl(urlnew)) { + return; + } + + Navigator.of(_context).push(MaterialPageRoute( + builder: (context) => SuperPlayerPage( + loop: 0, //设置播放循环,默认播放器的循环次数是1, 即不循环播放。如果设置循环次数0,表示无限循环。 + url: urlnew, + title: + '${widget.text}视频${num}\n${mapZpjl[mapName['plate_id']]}(${getDwmc(mapZpjl['dwip'])})'))); + + // Navigator.of(_context).push(MaterialPageRoute( + // builder: (context) => PlayerProNew( + // loop: 0, //设置播放循环,默认播放器的循环次数是1, 即不循环播放。如果设置循环次数0,表示无限循环。 + // url: urlnew, + // title: + // '${widget.text}视频${num}\n${mapZpjl[mapName['plate_id']]}(${getDwmc(mapZpjl['dwip'])})'))); + }, + ), + SizedBox(width: ScreenUtil().setWidth(15)), + ], + ); + } + + Widget imageWztp; + + //2、得到违章图片组件 + Widget getWztp() { + //ratioList[index] = 0.5714285714285714 + return Stack( + children: [ + Container( + width: ScreenUtil().setWidth(1022), + //height: ScreenUtil().setHeight(639), + //height: ScreenUtil().setHeight(22 + 1022 * _radioImage), + height: ScreenUtil().setHeight(30 + 1022 * g_radioImage), + decoration: BoxDecoration( + //color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(12), + ), + ), + ), + Positioned( + //left: ScreenUtil().setWidth(_marginLeft), + top: ScreenUtil().setHeight(_marginLeft), + child: Container( + width: ScreenUtil().setWidth(1022), + // height: ScreenUtil().setHeight(30 + 1022 * _radioImage), + height: ScreenUtil().setHeight(30 + 1022 * g_radioImage), + child: getNetworkImage(getMediaUrl(mapZpjl['pic_url'])), + ), + ) + ], + ); + } + + // void printScreenInformation() { + // print('Device width dp:${1.sw}dp'); + // print('Device height dp:${1.sh}dp'); + // print('Device pixel density:${ScreenUtil().pixelRatio}'); + // print('Bottom safe zone distance dp:${ScreenUtil().bottomBarHeight}dp'); + // print('Status bar height dp:${ScreenUtil().statusBarHeight}dp'); + // print('The ratio of actual width to UI design:${ScreenUtil().scaleWidth}'); + // print( + // 'The ratio of actual height to UI design:${ScreenUtil().scaleHeight}'); + // print('System font scaling:${ScreenUtil().textScaleFactor}'); + // print('0.5 times the screen width:${0.5.sw}dp'); + // print('0.5 times the screen height:${0.5.sh}dp'); + // } + + void printScreenInformation() { + print('ScreenUtil().screenWidth = ${ScreenUtil().screenWidth}'); + print('设备宽度:${1.sw}dp'); + print('"1.w" = ${1.w}'); + print('"1.sw" = ${1.sw}'); + print('设备高度:${1.sh}dp'); + print('设备的像素密度:${ScreenUtil().pixelRatio}'); + print('底部安全区距离:${ScreenUtil().bottomBarHeight}dp'); + print('状态栏高度:${ScreenUtil().statusBarHeight}dp'); + print('实际宽度的dp与设计稿px的比例:${ScreenUtil().scaleWidth}'); + print('实际高度的dp与设计稿px的比例:${ScreenUtil().scaleHeight}'); + print('宽度和字体相对于设计稿放大的比例:${ScreenUtil().scaleWidth * ScreenUtil().pixelRatio}'); + print('高度相对于设计稿放大的比例:${ScreenUtil().scaleHeight * ScreenUtil().pixelRatio}'); + print('系统的字体缩放比例:${ScreenUtil().textScaleFactor}'); + print('屏幕宽度的0.5:${0.5.sw}dp'); + print('屏幕高度的0.5:${0.5.sh}dp'); + } + + //3、得到违章图片说明信息组件 + Widget getWztpSmxx() { + return Container( + width: ScreenUtil().setWidth(1022), + height: ScreenUtil().setHeight(390), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(12), + ), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + //违章信息组件1:车牌号码、车牌颜色 + getWzxxPart1(), + //违章信息组件2:抓拍时间组件 + getWzxxText('抓拍时间:' + mapZpjl['zpsj']), + //违章信息组件3:车牌类型 + 黑度 + getWzxxPart3(), + //违章信息组件4:抓拍地点(简称) + getWzxxText('抓拍地点:' + getDwmc(mapZpjl['dwip']) + ' (简称)'), + //违章信息组件5:抓拍地点 + getWzxxText('抓拍地点:' + mapZpjl['dwms']), + ], + ), + ); + } + + // I/flutter (22989): ScreenUtil().screenWidth = 360.0 + // I/flutter (22989): 设备宽度:360.0dp + // I/flutter (22989): "1.w" = 0.3333333333333333 + // I/flutter (22989): "1.sw" = 360.0 + // I/flutter (22989): 设备高度:640.0dp + // I/flutter (22989): 设备的像素密度:3.0 + // I/flutter (22989): 底部安全区距离:0.0dp + // I/flutter (22989): 状态栏高度:24.0dp + // I/flutter (22989): 实际宽度的dp与设计稿px的比例:0.3333333333333333 + // I/flutter (22989): 实际高度的dp与设计稿px的比例:0.3333333333333333 + // I/flutter (22989): 宽度和字体相对于设计稿放大的比例:1.0 + // I/flutter (22989): 高度相对于设计稿放大的比例:1.0 + // I/flutter (22989): 系统的字体缩放比例:1.0 + // I/flutter (22989): 屏幕宽度的0.5:180.0dp + // I/flutter (22989): 屏幕高度的0.5:320.0dp + + //3、得到违章信息组件1:车牌号码、车牌颜色 + //车牌颜色Map cpysMap = { + // '蓝色': cpysItem( + // cpysText: '蓝色', + // cpysBackground: Colors.blue, + // cpysFont: Colors.white, + // cpysBorder: Colors.orange), + // } + Widget getWzxxPart1() { + //printScreenInformation(); + return Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox(width: ScreenUtil().setWidth(_marginLeft)), + getTitleText('车牌号码:'), + getBoderText(mapZpjl[mapName['plate_id']].toString(), + width: ScreenUtil().setWidth(1022 / 3.2)), + Expanded(child: SizedBox.shrink()), + getTitleText('颜色:'), + getBoderText(mapZpjl[mapName['plate_color']], width: ScreenUtil().setWidth(1022 / 4.8)), + SizedBox(width: ScreenUtil().setWidth(_marginLeft)), + ], + ); + } + + Widget getTitleRichText(String text1, {String text2 = '', double fontSize = 16}) { + return RichText( + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.left, + text: TextSpan( + text: text1, + style: TextStyle(fontSize: fontSize, color: Colors.black), + children: [ + TextSpan( + text: text2, + style: TextStyle(fontSize: fontSize, color: Colors.blue, fontWeight: FontWeight.w500), + ), + ], + ), + ); + } + + Widget getTitleText(String text, {double fontSize = 16}) { + return Text(text, + style: TextStyle(fontSize: fontSize), + textAlign: TextAlign.left, + overflow: TextOverflow.ellipsis); + } + + Widget getTrailText(String text, {double fontSize = 16, double off = 0}) { + return Container( + width: _screenWidth - _widthLeft - off - (2 * ScreenUtil().setWidth(_marginLeft)), + child: Text(text, + style: TextStyle(fontSize: fontSize), + textAlign: TextAlign.left, + overflow: TextOverflow.ellipsis), + ); + } + + Widget getBoderText(String text, {double width = 40}) { + cpysItem _cpysItem = cpysMap[mapZpjl[mapName['plate_color']]]; + + return Container( + //color: _cpysItem.cpysBackground, + alignment: Alignment(0, -1), + width: width, + decoration: BoxDecoration( + border: Border.all(color: _cpysItem.cpysBorder, width: 2), + color: _cpysItem.cpysBackground, + borderRadius: BorderRadius.circular(3), + ), + child: Padding( + padding: EdgeInsets.only(bottom: 3), + child: Text(text, + style: TextStyle(fontSize: _fontSize, color: _cpysItem.cpysFont), + textAlign: TextAlign.left, + overflow: TextOverflow.ellipsis), + ), + ); + } + + //I/flutter (17555): mapZpjl = { + // id: 1222, plate_id: 川Q736X2, plate_color: 蓝色, zpsj: 1612857077, yjxx_id: 1399, workflow: 999, + // video_url: video/9_6063_20210209_155117_川Q736X2.mp4, + // pic_url: /wwwroot/admin/Api/wwwroot/public/uploads/9d2f45fd24b41f2b94abe42b30970d75.jpg, + // clfl: 集装箱卡车, dwip: 172.16.3.9, dwms: 宜长路出城方向, lgmzs: 3, jczxd: 994, sfhy: 黑烟车 + // } + + Widget getIcon(IconData _iconData) { + return Container( + width: _iconSize - 2, + height: _iconSize, + child: Padding( + padding: EdgeInsets.only(top: 2), + child: Icon(_iconData, size: _iconSize, color: _iconColor), + ), + ); + } + + Widget getWzxxText(String _text, {double fontSize = 16}) { + return Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox(width: ScreenUtil().setWidth(_marginLeft)), + Container( + alignment: Alignment(-1, 0), + width: ScreenUtil().setWidth(1022) - ScreenUtil().setWidth(_marginLeft), + child: Text(_text, + style: TextStyle(fontSize: fontSize), + textAlign: TextAlign.left, + overflow: TextOverflow.ellipsis), + ), + ], + ); + } + + Widget getWzxxPart3() { + return Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox(width: ScreenUtil().setWidth(_marginLeft)), + Container( + alignment: Alignment(-1, 0), + //width: ScreenUtil().setWidth(1022) - ScreenUtil().setWidth(_marginLeft), + child: getTitleText('车牌类型:' + mapZpjl['cplx']), + ), + Expanded(child: SizedBox.shrink()), + //getTitleText('黑度: ${mapZpjl['lgmzs']}'), + getTitleRichText('黑度:', text2: '${mapZpjl['lgmzs']} '), + SizedBox(width: ScreenUtil().setWidth(_marginLeft)), + ], + ); + } + + Widget getText(String text, {Color color}) { + return Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + alignment: Alignment(-1, 0), + width: ScreenUtil().setWidth(1022 - 2 * _marginLeft), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox(width: ScreenUtil().setWidth(_marginLeft)), + // Flutter 解决Text内容展示越界 + Expanded( + child: Text(text, + textAlign: TextAlign.left, + overflow: TextOverflow.ellipsis, + style: TextStyle(color: color))) + ], + ), + ), + ], + ); + } + + Widget getText2(String text1, String text2, String text3, {Color color}) { + return Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + alignment: Alignment(-1, 0), + width: ScreenUtil().setWidth(1022 - 2 * _marginLeft), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox(width: ScreenUtil().setWidth(_marginLeft)), + Text(text1, textAlign: TextAlign.left), + Text(text2, + textAlign: TextAlign.left, + overflow: TextOverflow.ellipsis, + style: TextStyle(color: color, fontWeight: FontWeight.w500)), + Text(text3, textAlign: TextAlign.left), + ], + ), + ), + ], + ); + } + + //5、得到黑烟初审'hycsInfo'、或者黑烟'hyfhInfo'複核信息组件 + //style: TextStyle(fontSize: _fontSize), + Widget getHyshInfo(String _hyshInfo) { + String _hyshLx = (_hyshInfo == 'hycsInfo' ? '初审' : '复审'); //黑烟审核类型 + String _hyshYh = (_hyshInfo == 'hycsInfo' ? 'cs_username' : 'fs_username'); //黑烟审核用户 + String _hyshSj = (_hyshInfo == 'hycsInfo' ? 'cs_time' : 'fs_time'); //黑烟审核时间 + String _hyshJg = (_hyshInfo == 'hycsInfo' ? 'cs_tile' : 'fs_tile'); //黑烟审核结果 + String _hyshYj = (_hyshInfo == 'hycsInfo' ? 'cs_shuoming' : 'fs_shuoming'); //黑烟审核意见 + + double _height = _hyshInfo == 'hyfhInfo' && widget.hyshlx == 'tsjj' ? 315 : 265; + return Column( + children: [ + Container( + width: ScreenUtil().setWidth(1022), + height: ScreenUtil().setHeight(_height), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(12), + ), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + alignment: Alignment(-1, 0), + width: ScreenUtil().setWidth(1022 - 2 * _marginLeft), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox(width: ScreenUtil().setWidth(_marginLeft)), + Text('${_hyshLx}结果:' + mapZpjl[_hyshJg], + textAlign: TextAlign.left, overflow: TextOverflow.ellipsis), + SizedBox(width: ScreenUtil().setWidth(20)), + Container( + width: my_iconSize, + height: my_iconSize, + decoration: mapZpjl[_hyshJg] == '' + ? null + : BoxDecoration( + //color: Colors.white, + image: DecorationImage( + image: AssetImage(mapZpjl[_hyshJg] == "黑烟车" + ? "assets/images/hyc.png" + : "assets/images/fhyc.png"), + fit: BoxFit.contain), + ), + alignment: Alignment.center, + //child: + ), + ], + ), + ), + ], + ), + getText('${_hyshLx}意见:' + mapZpjl[_hyshYj]), + getText('${_hyshLx}用户:' + mapZpjl[_hyshYh]), + getText('${_hyshLx}时间:' + mapZpjl[_hyshSj]), + _hyshInfo == 'hyfhInfo' && widget.hyshlx == 'tsjj' + ? (getText2('推送状态:', widget.tsztText, ' (${getDate(mapZpjl['ts_time'])})', + color: + widget.tsztText.indexOf('成功') >= 0 ? Colors.blueAccent : Colors.black26)) + : SizedBox.shrink(), + ], + ), + ), + SizedBox(height: ScreenUtil().setHeight(_marginVer)), + ], + ); + } + + //9、得到推送交警状态信息组件7:推送状态 + // tszt 整型 推送状态:0-未推送 | 1-推送失败 | 3-推送成功 + //_mapTsjjGetTsStatus['tszt'] + Widget getWzxxPart7() { + return Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox(width: ScreenUtil().setWidth(_marginLeft)), + Container( + alignment: Alignment(-1, 0), + width: _screenWidth - ScreenUtil().setWidth(_marginLeft), + child: getTitleText('推送状态:' + mapTsztText[_mapTsjjGetTsStatus['tszt']]), + ), + ], + ); + } + + //10、得到推送交警确认组件 + Widget getTsjjQr() { + return Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + getBtnSizeX( + text: "返回", + onPressedFun: () async { + Navigator.pop(context); + }, + width: 90.0), + preBtn, + nextBtn, + ], + ); + } + + //解决第一次进入报错问题。因为getPreBtn_NextBtn()还未执行,preBtn和nextBtn为空 + Widget preBtn = Container( + color: Colors.white12, //onPressedFun为null时无效 + width: 70.0, + height: 35.0, + child: RaisedButton( + padding: EdgeInsets.all(0), + textColor: Colors.black, + child: Text('上一条'), + onPressed: null, + ), + ); + + Widget nextBtn = Container( + color: Colors.white12, //onPressedFun为null时无效 + width: 70.0, + height: 35.0, + child: RaisedButton( + padding: EdgeInsets.all(0), + textColor: Colors.black, + child: Text('下一条'), + onPressed: null, + ), + ); + + getPreBtn_NextBtn() { + preBtn = getBtnSizeX( + text: "上一条", + onPressedFun: null, + ); + nextBtn = getBtnSizeX( + text: "下一条", + onPressedFun: null, + ); + + if (widget.index > 0 && listLen > 0) { + preBtn = getBtnSizeX( + text: "上一条", + onPressedFun: () async { + if (widget.index > 0) { + widget.index--; + getZpjlData(); + } + }, + ); + } + + if (widget.index < (listLen - 1) && listLen > 0) { + nextBtn = getBtnSizeX( + text: "下一条", + onPressedFun: () async { + if (widget.index < listLen - 1) { + widget.index++; + getZpjlData(); + } + }, + ); + } + } + + bool showMoreWidget = false; + + @override + Widget build(BuildContext context) { + return Scaffold( + //resizeToAvoidBottomPadding: false, + appBar: PreferredSize( + preferredSize: Size.fromHeight(ScreenUtil().setHeight(173)), // 设置appBar高度 + // 设置appBar高度 + child: AppBar( + automaticallyImplyLeading: false, + centerTitle: true, + titleSpacing: 0.0, + //设置title的左边距 + flexibleSpace: Container( + //SizedBox(height: ScreenUtil().statusBarHeight), //显示顶部状态栏 + // SizedBox(height: ScreenUtil().setHeight(10)), //显示顶部状态栏 + padding: EdgeInsets.only(top: ScreenUtil().statusBarHeight), //留出顶部状态栏高度 + child: Container( + //height: ScreenUtil().setHeight(173), + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.centerLeft, + end: Alignment.centerRight, + colors: [ + Color.fromRGBO(12, 186, 156, 1), + Color.fromRGBO(39, 127, 235, 1), + ], + ), + ), + // decoration: BoxDecoration( + // gradient: LinearGradient(colors: [ + // Color(0xFF0018EB), + // Color(0xFF01C1D9), + // ], begin: Alignment.bottomCenter, end: Alignment.topCenter), + // ), + ), + ), + title: Padding( + padding: EdgeInsets.only(left: 0, right: 0), + child: Row( + //mainAxisAlignment: MainAxisAlignment.start, + children: [ + getIconAndTextButton( + iconColor: Colors.white, + iconData: Icons.chevron_left_outlined, + onPress: showMoreWidget + ? null + : () { + Navigator.pop(context); + }, + ), + Expanded( + child: Text(widget.text + '记录' + num, + style: TextStyle(color: Colors.white, fontSize: 20), + textAlign: TextAlign.center, + overflow: TextOverflow.ellipsis), + ), + SizedBox(width: 30), + ], + ), + ), + ), + ), + body: null == imageWztp + // 显示加载中的圈圈 + ? getMoreWidget(color: Colors.black38, size: 20.0, strokeWidth: 2.0) + : Stack( + children: [ + //SizedBox.shrink() 创建父类允许最小尺寸的约束Box + showMoreWidget + ? Align( + alignment: Alignment(0, 0.8), + child: Container( + height: 200, + width: 200, + child: getMoreWidget2( + text: '加载中...', + color: Colors.red, + size: 40.0, + strokeWidth: 3.0), //显示加载中的圈圈, + ), + ) + : SizedBox.shrink(), + KeyboardAvoider( + autoScroll: true, + child: Container( + color: Color.fromRGBO(244, 244, 244, 1), + child: Column( + children: [ + //1、得到格林曼黑度标准和视频播放按钮组件 + getHdAndPlay(), + //2、得到违章图片组件 + imageWztp, + SizedBox(height: ScreenUtil().setHeight(_marginVer)), + //3、得到违章图片说明信息组件 + getWztpSmxx(), + SizedBox(height: ScreenUtil().setHeight(_marginVer)), + //7、得到黑烟初审信息组件 + widget.hyshlx == 'hycs' || + widget.hyshlx == 'hyfh' || + widget.hyshlx == 'tsjj' + ? getHyshInfo('hycsInfo') + : SizedBox.shrink(), + //8、得到黑烟复审信息组件 + widget.hyshlx == 'hyfh' || widget.hyshlx == 'tsjj' + ? getHyshInfo('hyfhInfo') + : SizedBox.shrink(), + SizedBox(height: widget.hyshlx == 'tsjj' ? 0 : 15), + //9、得到推送交警确认组件 + getTsjjQr(), + //SizedBox(height: 10), + ], + ), + ), + ), + widget.hyshlx == 'tsjj' + ? Positioned( + //alignment: Alignment(0.9, 0.35), + //alignment: Alignment(0.8, 0.45), + right: ScreenUtil().setWidth(50), + top: ScreenUtil().setHeight(1423), + child: Container( + //alignment: Alignment(0.5, -0.5), + width: _stampSize, + height: _stampSize, + //color: Colors.black12, + decoration: BoxDecoration( + //color: Colors.white, + image: DecorationImage( + //image: AssetImage("assets/images/jkzx_stamp.png"), fit: BoxFit.contain), + image: AssetImage(mapZpjl['fs_tile'] == '黑烟车' + ? "assets/images/hyc.png" + : "assets/images/fhyc.png"), + fit: BoxFit.contain), + ), + //child: + ), + ) + : SizedBox.shrink(), + ], + ), + ); + } + + Widget getBtnSizeX({@required text, width = 70.0, height = 35.0, onPressedFun}) { + return Container( + color: Colors.white12, //onPressedFun为null时无效 + width: width, + height: height, + child: RaisedButton( + padding: EdgeInsets.all(0), + textColor: Colors.black, + child: Text(text), + onPressed: onPressedFun, + ), + ); + } +} From 286e5db659b82ba65a3d5aa4505c8313161f3201 Mon Sep 17 00:00:00 2001 From: WinUser01 Date: Fri, 6 May 2022 17:20:33 +0800 Subject: [PATCH 11/13] =?UTF-8?q?hyzp=5Fybqx-Commit149=EF=BC=9A=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E4=BB=8A=E6=97=A5=E7=BB=9F=E8=AE=A1=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9A=84=E5=B8=83=E5=B1=80=EF=BC=8C=E5=9C=A8?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E9=A1=B5=E9=9D=A2=E4=B8=AD=E5=B0=B1=E8=83=BD?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=AE=8C=EF=BC=8C=E9=81=BF=E5=85=8D=E6=BB=9A?= =?UTF-8?q?=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/Works/TJXX/today_list_zpjl_content_new.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/pages/Works/TJXX/today_list_zpjl_content_new.dart b/lib/pages/Works/TJXX/today_list_zpjl_content_new.dart index 65a5701..fbec19a 100644 --- a/lib/pages/Works/TJXX/today_list_zpjl_content_new.dart +++ b/lib/pages/Works/TJXX/today_list_zpjl_content_new.dart @@ -636,8 +636,7 @@ class _TodayListZpjlPageState extends State { getText('${_hyshLx}意见:' + mapZpjl[_hyshYj]), // getText('${_hyshLx}用户:' + mapZpjl[_hyshYh]), // getText('${_hyshLx}时间:' + mapZpjl[_hyshSj]), - getUserAndTime( - '${_hyshLx}用户:' + mapZpjl[_hyshYh], '${_hyshLx}时间:' + mapZpjl[_hyshSj]), + getUserAndTime('${_hyshLx}用户:' + mapZpjl[_hyshYh], '时间:' + mapZpjl[_hyshSj]), _hyshInfo == 'hyfhInfo' && widget.hyshlx == 'tsjj' ? (getText2('推送状态:', widget.tsztText, ' (${getDate(mapZpjl['ts_time'])})', color: From 952a6144b2ec8be2e4af597d4b680d5260092f0e Mon Sep 17 00:00:00 2001 From: WinUser01 Date: Fri, 6 May 2022 17:28:21 +0800 Subject: [PATCH 12/13] =?UTF-8?q?hyzp=5Fybqx-Commit150=EF=BC=9A=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E3=80=82=E4=BC=98=E5=8C=96=E4=BB=8A=E6=97=A5=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=E7=9A=84=E5=B8=83?= =?UTF-8?q?=E5=B1=80=EF=BC=8C=E5=9C=A8=E4=B8=80=E4=B8=AA=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=B8=AD=E5=B0=B1=E8=83=BD=E6=98=BE=E7=A4=BA=E5=AE=8C=EF=BC=8C?= =?UTF-8?q?=E9=81=BF=E5=85=8D=E6=BB=9A=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/Works/TJXX/today_list_zpjl_content_new.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pages/Works/TJXX/today_list_zpjl_content_new.dart b/lib/pages/Works/TJXX/today_list_zpjl_content_new.dart index fbec19a..c037eea 100644 --- a/lib/pages/Works/TJXX/today_list_zpjl_content_new.dart +++ b/lib/pages/Works/TJXX/today_list_zpjl_content_new.dart @@ -539,7 +539,7 @@ class _TodayListZpjlPageState extends State { // Flutter 解决Text内容展示越界 Expanded( child: Text(time, - textAlign: TextAlign.left, + textAlign: TextAlign.right, overflow: TextOverflow.ellipsis, style: TextStyle(color: color))) ], From 8d8b8aff85b9b472341a8b356250543f1b1c111b Mon Sep 17 00:00:00 2001 From: WinUser01 Date: Fri, 6 May 2022 19:56:02 +0800 Subject: [PATCH 13/13] =?UTF-8?q?hyzp=5Fybqx-Commit151=EF=BC=9A=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8F=B7=E6=9B=B4=E6=96=B0=E4=B8=BAversion:=201.4.32+?= =?UTF-8?q?20220510=E3=80=82=E4=BC=98=E5=8C=96=E4=BB=8A=E6=97=A5=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=E7=9A=84=E5=B8=83?= =?UTF-8?q?=E5=B1=80=EF=BC=8C=E5=9C=A8=E4=B8=80=E4=B8=AA=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=B8=AD=E5=B0=B1=E8=83=BD=E6=98=BE=E7=A4=BA=E5=AE=8C=EF=BC=8C?= =?UTF-8?q?=E9=81=BF=E5=85=8D=E6=BB=9A=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pubspec.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 40cad69..7f3cdc6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -69,7 +69,8 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev #version: 1.4.28+20220426 #version: 1.4.29+20220502 #version: 1.4.30+20220504 -version: 1.4.31+20220506 +#version: 1.4.31+20220506 +version: 1.4.32+20220510 environment: sdk: ">=2.7.0 <3.0.0"