|
|
|
@ -11,6 +11,7 @@ import 'package:keyboard_avoider/keyboard_avoider.dart';
|
|
|
|
import '../../../components/commonFun.dart';
|
|
|
|
import '../../../components/commonFun.dart';
|
|
|
|
import '../../../components/doJSON.dart';
|
|
|
|
import '../../../components/doJSON.dart';
|
|
|
|
import '../../../components/hyxx_data_handle.dart';
|
|
|
|
import '../../../components/hyxx_data_handle.dart';
|
|
|
|
|
|
|
|
import 'package:flustars/flustars.dart' as flustars; //该组件中有ScreenUtil
|
|
|
|
|
|
|
|
|
|
|
|
// "today": {
|
|
|
|
// "today": {
|
|
|
|
// "total": 4,
|
|
|
|
// "total": 4,
|
|
|
|
@ -28,30 +29,36 @@ import '../../../components/hyxx_data_handle.dart';
|
|
|
|
// "video_url": "video/3_6063_20210404_113111_川15A2563.mp4"
|
|
|
|
// "video_url": "video/3_6063_20210404_113111_川15A2563.mp4"
|
|
|
|
// },
|
|
|
|
// },
|
|
|
|
|
|
|
|
|
|
|
|
class TodayListZpjlContent extends StatefulWidget {
|
|
|
|
class TodayListZpjlContentNew extends StatefulWidget {
|
|
|
|
TodayListZpjlContent({
|
|
|
|
TodayListZpjlContentNew({
|
|
|
|
@required this.hyshlx,
|
|
|
|
@required this.hyshlx,
|
|
|
|
@required this.num,
|
|
|
|
@required this.index,
|
|
|
|
|
|
|
|
// @required this.num,
|
|
|
|
@required this.text,
|
|
|
|
@required this.text,
|
|
|
|
@required this.mapZpjl,
|
|
|
|
// @required this.mapZpjl,
|
|
|
|
this.tsztText = '',
|
|
|
|
this.tsztText = '',
|
|
|
|
Key key,
|
|
|
|
Key key,
|
|
|
|
}) : super(key: key);
|
|
|
|
}) : super(key: key);
|
|
|
|
String hyshlx;
|
|
|
|
String hyshlx;
|
|
|
|
String num;
|
|
|
|
|
|
|
|
|
|
|
|
// String num;
|
|
|
|
|
|
|
|
int index;
|
|
|
|
String text;
|
|
|
|
String text;
|
|
|
|
Map mapZpjl;
|
|
|
|
|
|
|
|
|
|
|
|
// Map mapZpjl;
|
|
|
|
String tsztText;
|
|
|
|
String tsztText;
|
|
|
|
|
|
|
|
|
|
|
|
_TodayListZpjlPageState createState() => _TodayListZpjlPageState();
|
|
|
|
_TodayListZpjlPageState createState() => _TodayListZpjlPageState();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//用TabController实现顶部tab切换
|
|
|
|
//用TabController实现顶部tab切换
|
|
|
|
class _TodayListZpjlPageState extends State<TodayListZpjlContent> {
|
|
|
|
class _TodayListZpjlPageState extends State<TodayListZpjlContentNew> {
|
|
|
|
//try_setState(); //避免如下异常报错
|
|
|
|
//try_setState(); //避免如下异常报错
|
|
|
|
try_setState() {
|
|
|
|
try_setState() {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
|
|
|
|
if (mounted) {
|
|
|
|
setState(() {});
|
|
|
|
setState(() {});
|
|
|
|
|
|
|
|
}
|
|
|
|
} catch (e) {
|
|
|
|
} catch (e) {
|
|
|
|
print('setState(() {})异常:${e}');
|
|
|
|
print('setState(() {})异常:${e}');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -80,6 +87,11 @@ class _TodayListZpjlPageState extends State<TodayListZpjlContent> {
|
|
|
|
|
|
|
|
|
|
|
|
Map mapName = {};
|
|
|
|
Map mapName = {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int listLen = 0;
|
|
|
|
|
|
|
|
String num;
|
|
|
|
|
|
|
|
Map mapZpjl;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
void initState() {
|
|
|
|
_context = context;
|
|
|
|
_context = context;
|
|
|
|
_widthLeft = _screenWidth / 2.6;
|
|
|
|
_widthLeft = _screenWidth / 2.6;
|
|
|
|
@ -89,10 +101,30 @@ class _TodayListZpjlPageState extends State<TodayListZpjlContent> {
|
|
|
|
mapName['plate_id'] = widget.hyshlx == 'jrzp' ? 'car_number' : 'plate_id';
|
|
|
|
mapName['plate_id'] = widget.hyshlx == 'jrzp' ? 'car_number' : 'plate_id';
|
|
|
|
mapName['plate_color'] = widget.hyshlx == 'jrzp' ? 'cpys' : 'plate_color';
|
|
|
|
mapName['plate_color'] = widget.hyshlx == 'jrzp' ? 'cpys' : 'plate_color';
|
|
|
|
|
|
|
|
|
|
|
|
imageWztp = getWztp(); //得到违章图片
|
|
|
|
getZpjlData(); // 得到 index 对应的今日抓拍记录数据
|
|
|
|
super.initState();
|
|
|
|
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;
|
|
|
|
double _radioImage = 9 / 16;
|
|
|
|
|
|
|
|
|
|
|
|
// 使用 cached_network_image 插件实现网络图片缓存
|
|
|
|
// 使用 cached_network_image 插件实现网络图片缓存
|
|
|
|
@ -102,7 +134,7 @@ class _TodayListZpjlPageState extends State<TodayListZpjlContent> {
|
|
|
|
imageUrl: url,
|
|
|
|
imageUrl: url,
|
|
|
|
alignment: Alignment.topCenter,
|
|
|
|
alignment: Alignment.topCenter,
|
|
|
|
imageBuilder: (context, imageProvider) => DragScaleContainer(
|
|
|
|
imageBuilder: (context, imageProvider) => DragScaleContainer(
|
|
|
|
doubleTapStillScale: true, child: Image(image: imageProvider)
|
|
|
|
doubleTapStillScale: true, child: Image(image: imageProvider, fit: BoxFit.fill)
|
|
|
|
// child: Image(
|
|
|
|
// child: Image(
|
|
|
|
// image: NetworkImage(
|
|
|
|
// image: NetworkImage(
|
|
|
|
// 'http://h.hiphotos.baidu.com/zhidao/wh%3D450%2C600/sign=0d023672312ac65c67506e77cec29e27/9f2f070828381f30dea167bbad014c086e06f06c.jpg'),
|
|
|
|
// 'http://h.hiphotos.baidu.com/zhidao/wh%3D450%2C600/sign=0d023672312ac65c67506e77cec29e27/9f2f070828381f30dea167bbad014c086e06f06c.jpg'),
|
|
|
|
@ -154,9 +186,8 @@ class _TodayListZpjlPageState extends State<TodayListZpjlContent> {
|
|
|
|
right: ScreenUtil().setWidth(6), left: ScreenUtil().setWidth(6), top: 0, bottom: 0),
|
|
|
|
right: ScreenUtil().setWidth(6), left: ScreenUtil().setWidth(6), top: 0, bottom: 0),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border.all(
|
|
|
|
border: Border.all(
|
|
|
|
color: (lgmzs == widget.mapZpjl['lgmzs'])
|
|
|
|
color:
|
|
|
|
? Colors.red
|
|
|
|
(lgmzs == mapZpjl['lgmzs']) ? Colors.red : Color.fromRGBO(244, 244, 244, 1),
|
|
|
|
: Color.fromRGBO(244, 244, 244, 1),
|
|
|
|
|
|
|
|
width: 2),
|
|
|
|
width: 2),
|
|
|
|
//color: Colors.lightBlue,
|
|
|
|
//color: Colors.lightBlue,
|
|
|
|
borderRadius: new BorderRadius.circular(3.0),
|
|
|
|
borderRadius: new BorderRadius.circular(3.0),
|
|
|
|
@ -194,7 +225,7 @@ class _TodayListZpjlPageState extends State<TodayListZpjlContent> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Playing = true; //禁止同时启动两次播放器
|
|
|
|
Playing = true; //禁止同时启动两次播放器
|
|
|
|
urlnew = getMediaUrl(widget.mapZpjl['video_url']);
|
|
|
|
urlnew = getMediaUrl(mapZpjl['video_url']);
|
|
|
|
|
|
|
|
|
|
|
|
//获取视频地址失败
|
|
|
|
//获取视频地址失败
|
|
|
|
if (!isVideoUrl(urlnew)) {
|
|
|
|
if (!isVideoUrl(urlnew)) {
|
|
|
|
@ -206,14 +237,14 @@ class _TodayListZpjlPageState extends State<TodayListZpjlContent> {
|
|
|
|
loop: 0, //设置播放循环,默认播放器的循环次数是1, 即不循环播放。如果设置循环次数0,表示无限循环。
|
|
|
|
loop: 0, //设置播放循环,默认播放器的循环次数是1, 即不循环播放。如果设置循环次数0,表示无限循环。
|
|
|
|
url: urlnew,
|
|
|
|
url: urlnew,
|
|
|
|
title:
|
|
|
|
title:
|
|
|
|
'${widget.text}视频${widget.num}\n${widget.mapZpjl[mapName['plate_id']]}(${getDwmc(widget.mapZpjl['dwip'])})')));
|
|
|
|
'${widget.text}视频${num}\n${mapZpjl[mapName['plate_id']]}(${getDwmc(mapZpjl['dwip'])})')));
|
|
|
|
|
|
|
|
|
|
|
|
// Navigator.of(_context).push(MaterialPageRoute(
|
|
|
|
// Navigator.of(_context).push(MaterialPageRoute(
|
|
|
|
// builder: (context) => PlayerProNew(
|
|
|
|
// builder: (context) => PlayerProNew(
|
|
|
|
// loop: 0, //设置播放循环,默认播放器的循环次数是1, 即不循环播放。如果设置循环次数0,表示无限循环。
|
|
|
|
// loop: 0, //设置播放循环,默认播放器的循环次数是1, 即不循环播放。如果设置循环次数0,表示无限循环。
|
|
|
|
// url: urlnew,
|
|
|
|
// url: urlnew,
|
|
|
|
// title:
|
|
|
|
// title:
|
|
|
|
// '${widget.text}视频${widget.num}\n${widget.mapZpjl[mapName['plate_id']]}(${getDwmc(widget.mapZpjl['dwip'])})')));
|
|
|
|
// '${widget.text}视频${num}\n${mapZpjl[mapName['plate_id']]}(${getDwmc(mapZpjl['dwip'])})')));
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(width: ScreenUtil().setWidth(15)),
|
|
|
|
SizedBox(width: ScreenUtil().setWidth(15)),
|
|
|
|
@ -232,7 +263,7 @@ class _TodayListZpjlPageState extends State<TodayListZpjlContent> {
|
|
|
|
width: ScreenUtil().setWidth(1022),
|
|
|
|
width: ScreenUtil().setWidth(1022),
|
|
|
|
//height: ScreenUtil().setHeight(639),
|
|
|
|
//height: ScreenUtil().setHeight(639),
|
|
|
|
//height: ScreenUtil().setHeight(22 + 1022 * _radioImage),
|
|
|
|
//height: ScreenUtil().setHeight(22 + 1022 * _radioImage),
|
|
|
|
height: ScreenUtil().setHeight(30 + 1022 * _radioImage),
|
|
|
|
height: ScreenUtil().setHeight(30 + 1022 * g_radioImage),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
//color: Colors.white,
|
|
|
|
//color: Colors.white,
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
@ -245,8 +276,9 @@ class _TodayListZpjlPageState extends State<TodayListZpjlContent> {
|
|
|
|
top: ScreenUtil().setHeight(_marginLeft),
|
|
|
|
top: ScreenUtil().setHeight(_marginLeft),
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
width: ScreenUtil().setWidth(1022),
|
|
|
|
width: ScreenUtil().setWidth(1022),
|
|
|
|
height: ScreenUtil().setHeight(30 + 1022 * _radioImage),
|
|
|
|
// height: ScreenUtil().setHeight(30 + 1022 * _radioImage),
|
|
|
|
child: getNetworkImage(getMediaUrl(widget.mapZpjl['pic_url'])),
|
|
|
|
height: ScreenUtil().setHeight(30 + 1022 * g_radioImage),
|
|
|
|
|
|
|
|
child: getNetworkImage(getMediaUrl(mapZpjl['pic_url'])),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -302,13 +334,13 @@ class _TodayListZpjlPageState extends State<TodayListZpjlContent> {
|
|
|
|
//违章信息组件1:车牌号码、车牌颜色
|
|
|
|
//违章信息组件1:车牌号码、车牌颜色
|
|
|
|
getWzxxPart1(),
|
|
|
|
getWzxxPart1(),
|
|
|
|
//违章信息组件2:抓拍时间组件
|
|
|
|
//违章信息组件2:抓拍时间组件
|
|
|
|
getWzxxText('抓拍时间:' + widget.mapZpjl['zpsj']),
|
|
|
|
getWzxxText('抓拍时间:' + mapZpjl['zpsj']),
|
|
|
|
//违章信息组件3:车牌类型 + 黑度
|
|
|
|
//违章信息组件3:车牌类型 + 黑度
|
|
|
|
getWzxxPart3(),
|
|
|
|
getWzxxPart3(),
|
|
|
|
//违章信息组件4:抓拍地点(简称)
|
|
|
|
//违章信息组件4:抓拍地点(简称)
|
|
|
|
getWzxxText('抓拍地点:' + getDwmc(widget.mapZpjl['dwip']) + ' (简称)'),
|
|
|
|
getWzxxText('抓拍地点:' + getDwmc(mapZpjl['dwip']) + ' (简称)'),
|
|
|
|
//违章信息组件5:抓拍地点
|
|
|
|
//违章信息组件5:抓拍地点
|
|
|
|
getWzxxText('抓拍地点:' + widget.mapZpjl['dwms']),
|
|
|
|
getWzxxText('抓拍地点:' + mapZpjl['dwms']),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -345,12 +377,11 @@ class _TodayListZpjlPageState extends State<TodayListZpjlContent> {
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
SizedBox(width: ScreenUtil().setWidth(_marginLeft)),
|
|
|
|
SizedBox(width: ScreenUtil().setWidth(_marginLeft)),
|
|
|
|
getTitleText('车牌号码:'),
|
|
|
|
getTitleText('车牌号码:'),
|
|
|
|
getBoderText(widget.mapZpjl[mapName['plate_id']].toString(),
|
|
|
|
getBoderText(mapZpjl[mapName['plate_id']].toString(),
|
|
|
|
width: ScreenUtil().setWidth(1022 / 3.2)),
|
|
|
|
width: ScreenUtil().setWidth(1022 / 3.2)),
|
|
|
|
Expanded(child: SizedBox.shrink()),
|
|
|
|
Expanded(child: SizedBox.shrink()),
|
|
|
|
getTitleText('颜色:'),
|
|
|
|
getTitleText('颜色:'),
|
|
|
|
getBoderText(widget.mapZpjl[mapName['plate_color']],
|
|
|
|
getBoderText(mapZpjl[mapName['plate_color']], width: ScreenUtil().setWidth(1022 / 4.8)),
|
|
|
|
width: ScreenUtil().setWidth(1022 / 4.8)),
|
|
|
|
|
|
|
|
SizedBox(width: ScreenUtil().setWidth(_marginLeft)),
|
|
|
|
SizedBox(width: ScreenUtil().setWidth(_marginLeft)),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -391,7 +422,7 @@ class _TodayListZpjlPageState extends State<TodayListZpjlContent> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Widget getBoderText(String text, {double width = 40}) {
|
|
|
|
Widget getBoderText(String text, {double width = 40}) {
|
|
|
|
cpysItem _cpysItem = cpysMap[widget.mapZpjl[mapName['plate_color']]];
|
|
|
|
cpysItem _cpysItem = cpysMap[mapZpjl[mapName['plate_color']]];
|
|
|
|
|
|
|
|
|
|
|
|
return Container(
|
|
|
|
return Container(
|
|
|
|
//color: _cpysItem.cpysBackground,
|
|
|
|
//color: _cpysItem.cpysBackground,
|
|
|
|
@ -455,11 +486,11 @@ class _TodayListZpjlPageState extends State<TodayListZpjlContent> {
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
alignment: Alignment(-1, 0),
|
|
|
|
alignment: Alignment(-1, 0),
|
|
|
|
//width: ScreenUtil().setWidth(1022) - ScreenUtil().setWidth(_marginLeft),
|
|
|
|
//width: ScreenUtil().setWidth(1022) - ScreenUtil().setWidth(_marginLeft),
|
|
|
|
child: getTitleText('车牌类型:' + widget.mapZpjl['cplx']),
|
|
|
|
child: getTitleText('车牌类型:' + mapZpjl['cplx']),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Expanded(child: SizedBox.shrink()),
|
|
|
|
Expanded(child: SizedBox.shrink()),
|
|
|
|
//getTitleText('黑度: ${widget.mapZpjl['lgmzs']}'),
|
|
|
|
//getTitleText('黑度: ${mapZpjl['lgmzs']}'),
|
|
|
|
getTitleRichText('黑度:', text2: '${widget.mapZpjl['lgmzs']} '),
|
|
|
|
getTitleRichText('黑度:', text2: '${mapZpjl['lgmzs']} '),
|
|
|
|
SizedBox(width: ScreenUtil().setWidth(_marginLeft)),
|
|
|
|
SizedBox(width: ScreenUtil().setWidth(_marginLeft)),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -476,10 +507,12 @@ class _TodayListZpjlPageState extends State<TodayListZpjlContent> {
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
SizedBox(width: ScreenUtil().setWidth(_marginLeft)),
|
|
|
|
SizedBox(width: ScreenUtil().setWidth(_marginLeft)),
|
|
|
|
Text(text,
|
|
|
|
// Flutter 解决Text内容展示越界
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
|
|
|
|
child: Text(text,
|
|
|
|
textAlign: TextAlign.left,
|
|
|
|
textAlign: TextAlign.left,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(color: color))
|
|
|
|
style: TextStyle(color: color)))
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -545,18 +578,18 @@ class _TodayListZpjlPageState extends State<TodayListZpjlContent> {
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
SizedBox(width: ScreenUtil().setWidth(_marginLeft)),
|
|
|
|
SizedBox(width: ScreenUtil().setWidth(_marginLeft)),
|
|
|
|
Text('${_hyshLx}结果:' + widget.mapZpjl[_hyshJg],
|
|
|
|
Text('${_hyshLx}结果:' + mapZpjl[_hyshJg],
|
|
|
|
textAlign: TextAlign.left, overflow: TextOverflow.ellipsis),
|
|
|
|
textAlign: TextAlign.left, overflow: TextOverflow.ellipsis),
|
|
|
|
SizedBox(width: ScreenUtil().setWidth(20)),
|
|
|
|
SizedBox(width: ScreenUtil().setWidth(20)),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
width: my_iconSize,
|
|
|
|
width: my_iconSize,
|
|
|
|
height: my_iconSize,
|
|
|
|
height: my_iconSize,
|
|
|
|
decoration: widget.mapZpjl[_hyshJg] == ''
|
|
|
|
decoration: mapZpjl[_hyshJg] == ''
|
|
|
|
? null
|
|
|
|
? null
|
|
|
|
: BoxDecoration(
|
|
|
|
: BoxDecoration(
|
|
|
|
//color: Colors.white,
|
|
|
|
//color: Colors.white,
|
|
|
|
image: DecorationImage(
|
|
|
|
image: DecorationImage(
|
|
|
|
image: AssetImage(widget.mapZpjl[_hyshJg] == "黑烟车"
|
|
|
|
image: AssetImage(mapZpjl[_hyshJg] == "黑烟车"
|
|
|
|
? "assets/images/hyc.png"
|
|
|
|
? "assets/images/hyc.png"
|
|
|
|
: "assets/images/fhyc.png"),
|
|
|
|
: "assets/images/fhyc.png"),
|
|
|
|
fit: BoxFit.contain),
|
|
|
|
fit: BoxFit.contain),
|
|
|
|
@ -569,11 +602,11 @@ class _TodayListZpjlPageState extends State<TodayListZpjlContent> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
getText('${_hyshLx}意见:' + widget.mapZpjl[_hyshYj]),
|
|
|
|
getText('${_hyshLx}意见:' + mapZpjl[_hyshYj]),
|
|
|
|
getText('${_hyshLx}用户:' + widget.mapZpjl[_hyshYh]),
|
|
|
|
getText('${_hyshLx}用户:' + mapZpjl[_hyshYh]),
|
|
|
|
getText('${_hyshLx}时间:' + widget.mapZpjl[_hyshSj]),
|
|
|
|
getText('${_hyshLx}时间:' + mapZpjl[_hyshSj]),
|
|
|
|
_hyshInfo == 'hyfhInfo' && widget.hyshlx == 'tsjj'
|
|
|
|
_hyshInfo == 'hyfhInfo' && widget.hyshlx == 'tsjj'
|
|
|
|
? (getText2('推送状态:', widget.tsztText, ' (${getDate(widget.mapZpjl['ts_time'])})',
|
|
|
|
? (getText2('推送状态:', widget.tsztText, ' (${getDate(mapZpjl['ts_time'])})',
|
|
|
|
color:
|
|
|
|
color:
|
|
|
|
widget.tsztText.indexOf('成功') >= 0 ? Colors.blueAccent : Colors.black26))
|
|
|
|
widget.tsztText.indexOf('成功') >= 0 ? Colors.blueAccent : Colors.black26))
|
|
|
|
: SizedBox.shrink(),
|
|
|
|
: SizedBox.shrink(),
|
|
|
|
@ -613,10 +646,72 @@ class _TodayListZpjlPageState extends State<TodayListZpjlContent> {
|
|
|
|
Navigator.pop(context);
|
|
|
|
Navigator.pop(context);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
width: 90.0),
|
|
|
|
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;
|
|
|
|
bool showMoreWidget = false;
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
@ -670,7 +765,7 @@ class _TodayListZpjlPageState extends State<TodayListZpjlContent> {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: Text(widget.text + '记录' + widget.num,
|
|
|
|
child: Text(widget.text + '记录' + num,
|
|
|
|
style: TextStyle(color: Colors.white, fontSize: 20),
|
|
|
|
style: TextStyle(color: Colors.white, fontSize: 20),
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
overflow: TextOverflow.ellipsis),
|
|
|
|
overflow: TextOverflow.ellipsis),
|
|
|
|
@ -748,7 +843,7 @@ class _TodayListZpjlPageState extends State<TodayListZpjlContent> {
|
|
|
|
//color: Colors.white,
|
|
|
|
//color: Colors.white,
|
|
|
|
image: DecorationImage(
|
|
|
|
image: DecorationImage(
|
|
|
|
//image: AssetImage("assets/images/jkzx_stamp.png"), fit: BoxFit.contain),
|
|
|
|
//image: AssetImage("assets/images/jkzx_stamp.png"), fit: BoxFit.contain),
|
|
|
|
image: AssetImage(widget.mapZpjl['fs_tile'] == '黑烟车'
|
|
|
|
image: AssetImage(mapZpjl['fs_tile'] == '黑烟车'
|
|
|
|
? "assets/images/hyc.png"
|
|
|
|
? "assets/images/hyc.png"
|
|
|
|
: "assets/images/fhyc.png"),
|
|
|
|
: "assets/images/fhyc.png"),
|
|
|
|
fit: BoxFit.contain),
|
|
|
|
fit: BoxFit.contain),
|