hyzp_ybqx-Commit139:reset到hyzp_ybqx-Commit138,在此次提交基础上进行修改,不依赖任何外部模块。修改包括:

1、修改IOS的点位地图文本图标元素的上下顺序,IOS版点位地图的文本图标定位基本准确;
    2、按公司要求合并初审、复审页面的车牌文字和颜色框到一行
master
WinUser01 4 years ago
parent 8c33cb05bf
commit 5c7475e7cc

@ -45,6 +45,8 @@ Future getListBMFMarker({List listDwinfo}) async {
for (int i = 0; i < len; i++) { for (int i = 0; i < len; i++) {
BMFMarker marker; BMFMarker marker;
if (Platform.isIOS) { if (Platform.isIOS) {
// if (true) {
//
marker = BMFMarker( marker = BMFMarker(
position: getBMFCoordinate(listDwinfo[i]["dwzb"]), position: getBMFCoordinate(listDwinfo[i]["dwzb"]),
// title: '${listDwinfo[i]["id"].toString()}${listDwinfo[i]["dwmc"]}', // title: '${listDwinfo[i]["id"].toString()}${listDwinfo[i]["dwmc"]}',
@ -98,7 +100,6 @@ Future getListBMFMarker({List listDwinfo}) async {
draggable: dragable); draggable: dragable);
} }
// FlutterBMFMarkerBMFMarkerID // FlutterBMFMarkerBMFMarkerID
// //
// //
@ -109,6 +110,8 @@ Future getListBMFMarker({List listDwinfo}) async {
// android // android
if (Platform.isAndroid) { if (Platform.isAndroid) {
// if (false) {
//
g_listBMFText.add(BMFText( g_listBMFText.add(BMFText(
// text: '${listDwinfo[i]["id"].toString()}${listDwinfo[i]["dwmc"]}', // text: '${listDwinfo[i]["id"].toString()}${listDwinfo[i]["dwmc"]}',
text: '${(i + 1).toString()}${listDwinfo[i]["dwmc"]}', text: '${(i + 1).toString()}${listDwinfo[i]["dwmc"]}',

@ -22,25 +22,6 @@ Future getIconWidget(String name) async {
color: Colors.transparent, color: Colors.transparent,
child: Column( child: Column(
children: [ 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( Container(
width: _widthBtn, width: _widthBtn,
height: _icon_height, 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))),
),
],
),
], ],
), ),
); );

@ -93,7 +93,8 @@ class _HyshGroupState extends State<HyshGroup> {
return Container( return Container(
width: ScreenUtil().setWidth(1022), width: ScreenUtil().setWidth(1022),
// height: ScreenUtil().setHeight(550), // height: ScreenUtil().setHeight(550),
height: ScreenUtil().setHeight(480), // height: ScreenUtil().setHeight(480),
height: ScreenUtil().setHeight(380),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(

@ -697,6 +697,8 @@ Future getAllSumCll(String field, List listStatis) async {
Future bmfInit() async { Future bmfInit() async {
// IOS // IOS
if (Platform.isIOS) { if (Platform.isIOS) {
// if (true) {
//
g_myIconPathPre = await createDir(g_myIconDir); g_myIconPathPre = await createDir(g_myIconDir);
print("g_myIconPathPre = $g_myIconPathPre"); print("g_myIconPathPre = $g_myIconPathPre");
// g_myIconPathPre = /data/user/0/com.example.hyzp_yibin_bmfmap/app_flutter/myIcons // g_myIconPathPre = /data/user/0/com.example.hyzp_yibin_bmfmap/app_flutter/myIcons

@ -85,104 +85,95 @@ class _CarNumberAndCpysItemsState extends State<CarNumberAndCpysItems> {
Widget getCarNumberAndCpys(int i) { Widget getCarNumberAndCpys(int i) {
return Container( return Container(
width: ScreenUtil().setWidth(1022), width: ScreenUtil().setWidth(1022),
height: ScreenUtil().setHeight(my_listTileHeight2 * 2 + 15), height: ScreenUtil().setHeight(my_listTileHeight2 + 15),
child: Column(children: [ child: Row(
//1 children: [
Row( SizedBox(width: ScreenUtil().setWidth(my_marginLeft2)),
mainAxisAlignment: MainAxisAlignment.start, //1
children: <Widget>[ // Text('${mapGetZpjlGetDataSpecial['car_number'].fieldText}: ',
SizedBox(width: ScreenUtil().setWidth(my_marginLeft2)), // style: TextStyle(fontSize: my_fontSize)),
Text('${mapGetZpjlGetDataSpecial['car_number'].fieldText}: ', Text('车牌号码\n及颜色: ', maxLines: 2),
style: TextStyle(fontSize: my_fontSize)), SizedBox(width: ScreenUtil().setWidth(my_marginLeft)),
Container( Container(
alignment: Alignment(-1, 0), alignment: Alignment(-1, 0),
//widthTrail = 400360300260 //widthTrail = 400360300260
height: ScreenUtil().setHeight(my_listTileHeight2), // height: ScreenUtil().setHeight(my_listTileHeight2), //
width: ScreenUtil().setWidth(400), width: ScreenUtil().setWidth(400),
child: TextField( child: TextField(
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: my_fontSize, fontSize: my_fontSize,
//color: cpysList[getIndexOfCpysList(colorText: listGetZpjl[i]['cpys'])].cpysFont, //color: cpysList[getIndexOfCpysList(colorText: listGetZpjl[i]['cpys'])].cpysFont,
//color: cpysList[getIndexOfCpysList(colorText: topTabs_map['cpysText_List'][i])].cpysFont, //color: cpysList[getIndexOfCpysList(colorText: topTabs_map['cpysText_List'][i])].cpysFont,
color: cpysList[getIndexOfCpysList(colorText: selectedValue)].cpysFont, color: cpysList[getIndexOfCpysList(colorText: selectedValue)].cpysFont,
), ),
// background: Paint() // background: Paint()
// ..color = cpysList[getIndexOfCpysList(colorText: listGetZpjl[i]['cpys'])] // ..color = cpysList[getIndexOfCpysList(colorText: listGetZpjl[i]['cpys'])]
// .cpysBackground), // .cpysBackground),
decoration: InputDecoration( decoration: InputDecoration(
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderSide: BorderSide(width: 2.0), borderRadius: BorderRadius.circular(3.0)), borderSide: BorderSide(width: 2.0), borderRadius: BorderRadius.circular(3.0)),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderSide: BorderSide(width: 2.0), borderRadius: BorderRadius.circular(3.0)), borderSide: BorderSide(width: 2.0), borderRadius: BorderRadius.circular(3.0)),
//prefixText: "pre", //prefixText: "pre",
filled: true, filled: true,
//fillColor: cpysList[getIndexOfCpysList(colorText: listGetZpjl[i]['cpys'])].cpysBackground, //fillColor: cpysList[getIndexOfCpysList(colorText: listGetZpjl[i]['cpys'])].cpysBackground,
//fillColor: cpysList[getIndexOfCpysList(colorText: topTabs_map['cpysText_List'][i])].cpysBackground, //fillColor: cpysList[getIndexOfCpysList(colorText: topTabs_map['cpysText_List'][i])].cpysBackground,
fillColor: cpysList[getIndexOfCpysList(colorText: selectedValue)].cpysBackground, fillColor: cpysList[getIndexOfCpysList(colorText: selectedValue)].cpysBackground,
hintText: '车牌号码', hintText: '车牌号码',
//border: InputBorder.none, //TextField线 //border: InputBorder.none, //TextField线
//contentPadding: EdgeInsets.only(right: 0), //contentPadding: EdgeInsets.only(right: 0),
//contentPadding: const EdgeInsets.symmetric(vertical: _textFieldHeight), //contentPadding: const EdgeInsets.symmetric(vertical: _textFieldHeight),
//contentPadding: EdgeInsets.symmetric(vertical: _textFieldHeight), //contentPadding: EdgeInsets.symmetric(vertical: _textFieldHeight),
contentPadding: EdgeInsets.all(0), contentPadding: EdgeInsets.all(0),
//contentPadding: EdgeInsets.only(top: 0), //contentPadding: EdgeInsets.only(top: 0),
// border: OutlineInputBorder( // border: OutlineInputBorder(
// //borderRadius: BorderRadius.circular(1.0), // //borderRadius: BorderRadius.circular(1.0),
// borderSide: BorderSide( // borderSide: BorderSide(
// //color: cpysList[getIndexOfCpysList(colorText: listGetZpjl[i]['cpys'])].cpysBorder, // //color: cpysList[getIndexOfCpysList(colorText: listGetZpjl[i]['cpys'])].cpysBorder,
// color: // color:
// cpysList[getIndexOfCpysList(colorText: topTabs_map['cpysText_List'][i])] // cpysList[getIndexOfCpysList(colorText: topTabs_map['cpysText_List'][i])]
// .cpysBorder, // .cpysBorder,
// width: 2.0)), // 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;
},
), ),
//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(width: ScreenUtil().setWidth(my_marginLeft)),
), //2
SizedBox(height: ScreenUtil().setHeight(15)), Container(
//2 alignment: Alignment(1, 0),
Row( //widthTrail = 400360300260
mainAxisAlignment: MainAxisAlignment.start, height: ScreenUtil().setHeight(my_listTileHeight2),
children: <Widget>[ //
SizedBox(width: ScreenUtil().setWidth(my_marginLeft2)), width: ScreenUtil().setWidth(400),
Text('车牌颜色: ', margin: EdgeInsets.only(bottom: 0),
style: TextStyle(fontSize: my_fontSize)), padding: EdgeInsets.only(left: 0, bottom: 2),
Container( decoration: BoxDecoration(
alignment: Alignment(1, 0), //color: cpysList[getIndexOfCpysList(colorText: listGetZpjl[i]['cpys'])].cpysBackground,
//widthTrail = 400360300260 //color: cpysList[getIndexOfCpysList(colorText: topTabs_map['cpysText_List'][i])].cpysBackground,
height: ScreenUtil().setHeight(my_listTileHeight2), // color: cpysList[getIndexOfCpysList(colorText: selectedValue)].cpysBackground,
width: ScreenUtil().setWidth(400), border: Border.all(color: Colors.black87, width: 2),
margin: EdgeInsets.only(bottom: 0), //
padding: EdgeInsets.only(left: 0, bottom: 2), borderRadius: BorderRadius.vertical(
decoration: BoxDecoration( top: Radius.elliptical(3, 3), bottom: Radius.elliptical(3, 3)),
//color: cpysList[getIndexOfCpysList(colorText: listGetZpjl[i]['cpys'])].cpysBackground, ),
//color: cpysList[getIndexOfCpysList(colorText: topTabs_map['cpysText_List'][i])].cpysBackground, child: getDropdownButton(),
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(),
)
],
),
],),
); );
} }

@ -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<CarNumberAndCpysItems> {
List<DropdownMenuItem<String>> _dropDownMenuItems;
String selectedValue;
@override
void initState() {
super.initState();
selectedValue = widget.initValue;
_dropDownMenuItems = getDropDownMenuItems();
}
List<DropdownMenuItem<String>> getDropDownMenuItems() {
List<DropdownMenuItem<String>> 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: <Widget>[
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: <Widget>[
SizedBox(width: ScreenUtil().setWidth(my_marginLeft2)),
Text('${mapGetZpjlGetDataSpecial['car_number'].fieldText}: ',
style: TextStyle(fontSize: my_fontSize)),
Container(
alignment: Alignment(-1, 0),
//widthTrail = 400360300260
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: <Widget>[
SizedBox(width: ScreenUtil().setWidth(my_marginLeft2)),
Text('车牌颜色: ',
style: TextStyle(fontSize: my_fontSize)),
Container(
alignment: Alignment(1, 0),
//widthTrail = 400360300260
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);
}
}
Loading…
Cancel
Save