master_become.dart 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423
  1. import 'package:flutter/material.dart';
  2. import 'package:liftmanager/net/api_service.dart';
  3. import 'package:liftmanager/utils/toast.dart';
  4. import 'package:liftmanager/widgets/app_bar.dart';
  5. import 'package:liftmanager/widgets/load_image.dart';
  6. import 'package:liftmanager/widgets/selected_image.dart';
  7. import 'dart:io';
  8. import 'package:liftmanager/widgets/bbs_content.dart';
  9. import 'package:flutter_screenutil/flutter_screenutil.dart';
  10. import 'package:image_picker/image_picker.dart';
  11. import 'package:keyboard_actions/keyboard_actions.dart';
  12. import 'package:liftmanager/res/resources.dart';
  13. import 'package:liftmanager/utils/number_text_input_formatter.dart';
  14. import 'package:flutter/foundation.dart';
  15. import 'package:flutter/services.dart';
  16. import 'package:liftmanager/common/common.dart';
  17. import 'package:flustars/flustars.dart' as flustars;
  18. import 'package:flutter/cupertino.dart';
  19. import 'package:liftmanager/routers/fluro_navigator.dart';
  20. import 'package:liftmanager/internal/wode/wode_router.dart';
  21. import 'package:liftmanager/widgets/click_item.dart';
  22. import 'package:liftmanager/internal/bbs/bbs_router.dart';
  23. import 'package:flutter_spinkit/flutter_spinkit.dart';
  24. import 'package:liftmanager/utils/fast_notification.dart';
  25. import 'package:liftmanager/utils/theme_utils.dart';
  26. class MasterBecome extends StatefulWidget {
  27. @override
  28. State<StatefulWidget> createState() {
  29. return MasterBecomeState();
  30. }
  31. }
  32. class MasterBecomeState extends State<MasterBecome> {
  33. ScrollController _scrollController = new ScrollController();
  34. TextEditingController _nameController = new TextEditingController();
  35. TextEditingController _idNumberController = new TextEditingController();
  36. TextEditingController _mobileController = new TextEditingController();
  37. TextEditingController _professionalController = new TextEditingController();
  38. TextEditingController _workDateController = new TextEditingController();
  39. TextEditingController _companyController = new TextEditingController();
  40. TextEditingController _jobController = new TextEditingController();
  41. TextEditingController _residentPlaceController = new TextEditingController();
  42. TextEditingController _workExperienceController = new TextEditingController();
  43. TextEditingController _projectExperienceController =
  44. new TextEditingController();
  45. TextEditingController _proficiencyBrandController =
  46. new TextEditingController();
  47. TextEditingController _goodElectricalController = new TextEditingController();
  48. TextEditingController _goodMechanicalController = new TextEditingController();
  49. String defaultValue = "请选择";
  50. String ids;
  51. List<String>idsList = [];
  52. List<String>defaultValueList = [];
  53. // 焦点控制
  54. FocusNode _focusNode1 = new FocusNode();
  55. GlobalKey _formKey = new GlobalKey<FormState>();
  56. int sexChiose = -1;
  57. String sexChioseString = "";
  58. String ageChiose = "";
  59. int learnChiose = -1;
  60. String learnChioseString = "";
  61. String addressName = "";
  62. List<String> sexListChiose = [];
  63. List<dynamic> sexList = [
  64. {"value": 1, "label": "男"},
  65. {"value": 2, "label": "女"}
  66. ];
  67. List<String> ageListChiose = [];
  68. List<String> learnListChiose = [];
  69. List<dynamic> learnList = [
  70. {"value": 1, "label": "小学"},
  71. {"value": 2, "label": "初中"},
  72. {"value": 3, "label": "中专"},
  73. {"value": 4, "label": "高中"},
  74. {"value": 5, "label": "大专"},
  75. {"value": 6, "label": "本科"},
  76. {"value": 7, "label": "硕士研究生"},
  77. {"value": 8, "label": "博士研究生"},
  78. ];
  79. String avatarPath = '';
  80. String cardPicture = '';
  81. String degreeCertificate = '';
  82. String skillsCertificate = '';
  83. String otherCertificates = '';
  84. dynamic detailObj;
  85. bool _protocol = false;
  86. bool sortBool = true;
  87. void submit(type) {
  88. if (!_protocol) {
  89. toasts("请勾选用户协议!");
  90. return;
  91. }
  92. if (avatarPath.isEmpty) {
  93. toasts("请上传头像!");
  94. return;
  95. } else if (sexChiose == -1) {
  96. toasts("请选择性别!");
  97. return;
  98. } else if (ageChiose.isEmpty) {
  99. toasts("请选择年龄!");
  100. return;
  101. } else if (learnChiose == -1) {
  102. toasts("请选择学历!");
  103. return;
  104. } else if (cardPicture.isEmpty) {
  105. toasts("请上传身份证人像面!");
  106. return;
  107. } else if (skillsCertificate.isEmpty) {
  108. toasts("请上传专业技能证书人像面!");
  109. return;
  110. }
  111. if(addressName == null || addressName == ""){
  112. toasts("请选择常驻工作地!");
  113. return;
  114. }
  115. if(_goodElectricalController.text.length>20){
  116. toasts("擅长电气最大不超过20字符!");
  117. return;
  118. }
  119. if(_goodMechanicalController.text.length>20){
  120. toasts("擅长机械最大不超过20字符!");
  121. return;
  122. }
  123. RegExp exp = RegExp(r'^1[34578]\d{9}$');
  124. RegExp expSfz = RegExp(r"\d{17}[\d|x]|\d{15}");
  125. if(!expSfz.hasMatch(_idNumberController.text)){
  126. toasts("请输入正确的身份证号");
  127. return;
  128. }
  129. if(!exp.hasMatch(_mobileController.text)){
  130. toasts("请输入正确的手机号");
  131. return;
  132. }
  133. if(idsList.length<=0){
  134. toasts("请选择品牌");
  135. return;
  136. }
  137. if(type == "add"){
  138. NewApiService().applyExperts({
  139. "age": ageChiose,
  140. "photo": avatarPath,
  141. "cardPicture": cardPicture,
  142. // "checkFlag": 0,
  143. "company": _companyController.text,
  144. "degreeCertificate": degreeCertificate,
  145. "eduLevel": learnChiose,
  146. "gender": sexChiose,
  147. "goodElectrical": _goodElectricalController.text,
  148. "goodMechanical": _goodMechanicalController.text,
  149. "idNumber": _idNumberController.text,
  150. "job": _jobController.text,
  151. "mobile": _mobileController.text,
  152. "name": _nameController.text,
  153. "otherCertificates": otherCertificates,
  154. "professional": _professionalController.text,
  155. "proficiencyBrand":ids,
  156. "proficiencyBrandName":defaultValue,
  157. "projectExperience": _projectExperienceController.text,
  158. "residentPlace": addressName,
  159. "skillsCertificate": skillsCertificate,
  160. "userId": int.parse(flustars.SpUtil.getString(Constant.userId)),
  161. "workDate": _workDateController.text,
  162. "workExperience": _workExperienceController.text
  163. }, onSuccess: (res) {
  164. toasts("申请成功,请等待审核");
  165. Navigator.pop(context);
  166. }, onError: (code, msg) {
  167. toasts(msg);
  168. });
  169. }else {
  170. NewApiService().updateBecomeMaster({
  171. "id": detailObj.id,
  172. "photo": avatarPath,
  173. "age": ageChiose,
  174. "cardPicture": cardPicture,
  175. // "checkFlag": 0,
  176. "company": _companyController.text,
  177. "degreeCertificate": degreeCertificate,
  178. "eduLevel": learnChiose,
  179. "gender": sexChiose,
  180. "goodElectrical": _goodElectricalController.text,
  181. "goodMechanical": _goodMechanicalController.text,
  182. "idNumber": _idNumberController.text,
  183. "job": _jobController.text,
  184. "mobile": _mobileController.text,
  185. "name": _nameController.text,
  186. "otherCertificates": otherCertificates,
  187. "professional": _professionalController.text,
  188. "proficiencyBrand":ids,
  189. "proficiencyBrandName":defaultValue,
  190. "projectExperience": _projectExperienceController.text,
  191. "residentPlace": addressName,
  192. "skillsCertificate": skillsCertificate,
  193. "userId": int.parse(flustars.SpUtil.getString(Constant.userId)),
  194. "workDate": _workDateController.text,
  195. "workExperience": _workExperienceController.text
  196. }, onSuccess: (res) {
  197. toasts("修改申请成功,请等待审核");
  198. Navigator.pop(context);
  199. }, onError: (code, msg) {
  200. toasts(msg);
  201. });
  202. }
  203. }
  204. @override
  205. initState() {
  206. getDetail();
  207. for (var i = 10; i < 100; i++) {
  208. ageListChiose.add(i.toString());
  209. }
  210. for (var i = 0; i < sexList.length; i++) {
  211. sexListChiose.add(sexList[i]['label']);
  212. }
  213. for (var i = 0; i < learnList.length; i++) {
  214. learnListChiose.add(learnList[i]['label']);
  215. }
  216. getBrandList();
  217. super.initState();
  218. FastNotification.addListener("set_address_master", (setAddressMaster) {
  219. setState(() {
  220. addressName = setAddressMaster;
  221. print(addressName);
  222. print(222222224);
  223. });
  224. });
  225. }
  226. bool _hasData = false;
  227. Future getDetail() async {
  228. await NewApiService().getBecomeMasterDetail(
  229. onSuccess: (res) {
  230. if (res != null) {
  231. detailObj = res;
  232. ageChiose = detailObj.age.toString();
  233. sexChiose = detailObj.gender;
  234. learnChiose = detailObj.eduLevel;
  235. if(sexChiose == 1){
  236. sexChioseString = "男";
  237. }else if (sexChiose == 2){
  238. sexChioseString = "女";
  239. }
  240. learnList.forEach((element) {
  241. if(learnChiose == element["value"]){
  242. print(learnChiose);
  243. print(element["value"]);
  244. print(123456);
  245. learnChioseString = element["label"];
  246. }
  247. });
  248. cardPicture = detailObj.cardPicture;
  249. _companyController.text = detailObj.company;
  250. degreeCertificate = detailObj.degreeCertificate;
  251. avatarPath = detailObj.photo;
  252. _goodElectricalController.text = detailObj.goodElectrical;
  253. _goodMechanicalController.text = detailObj.goodMechanical;
  254. _idNumberController.text = detailObj.idNumber;
  255. _jobController.text = detailObj.job;
  256. _mobileController.text = detailObj.mobile;
  257. _nameController.text = detailObj.name;
  258. otherCertificates = detailObj.otherCertificates;
  259. _professionalController.text = detailObj.professional;
  260. ids = detailObj.proficiencyBrand;
  261. defaultValue = detailObj.proficiencyBrandName;
  262. _projectExperienceController.text = detailObj.projectExperience;
  263. addressName = detailObj.residentPlace;
  264. skillsCertificate = detailObj.skillsCertificate;
  265. _workDateController.text = detailObj.workDate.toString();
  266. _workExperienceController.text = detailObj.workExperience;
  267. idsList = ids.split(",");
  268. defaultValueList = defaultValue.split(",");
  269. setState(() {});
  270. }
  271. _hasData = true;
  272. }, onError: (code, msg) {
  273. toasts(msg);
  274. });
  275. }
  276. List<dynamic> brandList;
  277. Future getBrandList() async {
  278. await NewApiService().getBrandListNoPage(
  279. onSuccess: (res) {
  280. if (res != null) {
  281. brandList = res;
  282. setState(() {});
  283. }
  284. }, onError: (code, msg) {
  285. toasts(msg);
  286. });
  287. }
  288. void selectPicker() {
  289. showDialog(
  290. context: context,
  291. builder: (BuildContext context) {
  292. return SimpleDialog(
  293. title: Text("修改头像"),
  294. children: ["拍照", '从手机相册选择'].map((String value) {
  295. return SimpleDialogOption(
  296. child: Text(
  297. value,
  298. style: TextStyle(fontSize: 16, fontWeight: FontWeight.w500),
  299. ),
  300. onPressed: () {
  301. _getImage(value == '拍照' ? 1 : 0);
  302. Navigator.of(context).pop();
  303. },
  304. );
  305. }).toList(),
  306. );
  307. },
  308. );
  309. }
  310. void _getImage(int key) async {
  311. try {
  312. var _imageFile = await ImagePicker.pickImage(
  313. source: key == 1 ? ImageSource.camera : ImageSource.gallery,
  314. maxWidth: 800,
  315. imageQuality: 95,
  316. );
  317. if (_imageFile != null) {
  318. upLoadFileOnce(_imageFile.path);
  319. }
  320. } catch (e) {
  321. toasts("没有权限,无法打开相册!");
  322. }
  323. }
  324. getCheckFlag(type){
  325. String str;
  326. if(type == 2){
  327. str = "待审核";
  328. }else if(type == 0) {
  329. str = "驳回";
  330. }else if (type == 1){
  331. str = "审核通过";
  332. }
  333. return "($str)";
  334. }
  335. void upLoadFileOnce(String path) {
  336. showLoading(context, "正在上传...");
  337. NewApiService().upload(path, onSuccess: (res) {
  338. dismissLoading(context);
  339. setState(() {
  340. avatarPath = res.pathUrl;
  341. setState(() {});
  342. });
  343. }, onError: (code, msg) {
  344. dismissLoading(context);
  345. toasts(msg);
  346. });
  347. }
  348. // 查看专家协议
  349. void openProtocol() {
  350. }
  351. FocusNode blankNode = FocusNode();
  352. @override
  353. Widget build(BuildContext context) {
  354. double width = MediaQuery.of(context).size.width;
  355. double height = MediaQuery.of(context).size.height;
  356. // 监听FocusNode
  357. _focusNode1.addListener(() {
  358. // _focusNode1.hasFocus 是否聚焦
  359. print(_focusNode1.hasFocus);
  360. });
  361. return Scaffold(
  362. resizeToAvoidBottomPadding: false, //不让键盘弹上去
  363. appBar: MyAppBar(
  364. centerTitle: "申请为专家",
  365. ),
  366. body: _hasData? GestureDetector(
  367. onTap: () {
  368. // 点击空白页面关闭键盘
  369. FocusScope.of(context).requestFocus(blankNode);
  370. },
  371. child: Stack(
  372. children: <Widget>[
  373. Container(
  374. padding: EdgeInsets.only(bottom: ScreenUtil().setWidth(80)),
  375. child: ListView(
  376. children: <Widget>[
  377. Form(
  378. key: _formKey, //设置globalKey,用于后面获取FormState
  379. // autovalidate: true, //开启自动校验
  380. child: Column(
  381. children: <Widget>[
  382. Stack(
  383. children: <Widget>[
  384. Container(
  385. width: width,
  386. height: 180,
  387. child: avatarPath.isEmpty
  388. ? LoadAssetImage(
  389. "wode/apply_expert_cover",
  390. format: "jpg",
  391. fit: BoxFit.fill,
  392. width: ScreenUtil().setWidth(width),
  393. height: ScreenUtil().setWidth(180),
  394. )
  395. : LoadNetworkImage(
  396. avatarPath,
  397. fit: BoxFit.fill,
  398. width: ScreenUtil().setWidth(width),
  399. height: ScreenUtil().setWidth(180),
  400. ),
  401. ),
  402. Positioned(
  403. left: width / 2 - 30,
  404. top: 180 / 2 - 40,
  405. width: 60,
  406. height: 60,
  407. child: GestureDetector(
  408. onTap: () {
  409. selectPicker();
  410. },
  411. child: LoadAssetImage(
  412. "wode/apply_expert_avatar",
  413. fit: BoxFit.fill,
  414. width: ScreenUtil().setWidth(60),
  415. height: ScreenUtil().setWidth(60),
  416. ),
  417. ),
  418. ),
  419. Positioned(
  420. left: width / 2 - ScreenUtil().setHeight(60),
  421. top: ScreenUtil().setHeight(180) / 2 + ScreenUtil().setHeight(30),
  422. width: ScreenUtil().setHeight(120),
  423. height: ScreenUtil().setHeight(30),
  424. child: GestureDetector(
  425. onTap: () {
  426. selectPicker();
  427. },
  428. child: Text(
  429. "上传照片",
  430. textAlign: TextAlign.center,
  431. style: TextStyle(
  432. color: Color(0xffffffff),
  433. fontSize: ScreenUtil().setSp(18),
  434. ),
  435. ),
  436. ),
  437. ),
  438. ],
  439. ),
  440. Container(
  441. height: ScreenUtil().setHeight(45),
  442. padding: EdgeInsets.only(
  443. left: ScreenUtil().setWidth(15),
  444. right: ScreenUtil().setWidth(15),
  445. ),
  446. alignment: Alignment.centerLeft,
  447. decoration: BoxDecoration(
  448. color: ThemeUtils.getDialogTextFieldColor(context),
  449. ),
  450. child: Row(
  451. children: <Widget>[
  452. Text(
  453. "基本信息",
  454. style: TextStyle(
  455. fontSize: ScreenUtil().setSp(15),
  456. fontWeight: FontWeight.bold,
  457. ),
  458. ),
  459. Text(
  460. detailObj?.checkFlag == null?"":getCheckFlag(detailObj.checkFlag),
  461. style: TextStyle(
  462. fontSize: ScreenUtil().setSp(15),
  463. fontWeight: FontWeight.bold,
  464. color: Color(0xFFff0000),
  465. ),
  466. )
  467. ],
  468. ),
  469. ),
  470. TextFieldItem(
  471. title: "姓名",
  472. isMust: true,
  473. content: "",
  474. controller: _nameController,
  475. hintText: "请输入您的姓名",
  476. validator: (val) {
  477. return val.trim().length > 0 ? null : "请输入姓名";
  478. },
  479. ),
  480. ChiosePicker(
  481. range: sexListChiose,
  482. label: "性别",
  483. isMust: true,
  484. value: sexChioseString,
  485. onConfirm: (value, index) {
  486. sexChiose = sexList[index]['value'];
  487. },
  488. ),
  489. ChiosePicker(
  490. range: ageListChiose,
  491. label: "年龄",
  492. isMust: true,
  493. value: ageChiose,
  494. onConfirm: (value, index) {
  495. ageChiose = value;
  496. },
  497. ),
  498. TextFieldItem(
  499. title: "身份证号",
  500. isMust: true,
  501. content: "",
  502. controller: _idNumberController,
  503. hintText: "请输入您的身份证号",
  504. validator: (val) {
  505. return val.trim().length > 0 ? null : "请输入身份证号";
  506. },
  507. ),
  508. TextFieldItem(
  509. title: "联系电话",
  510. isMust: true,
  511. content: "",
  512. controller: _mobileController,
  513. hintText: "请输入您的联系电话",
  514. validator: (val) {
  515. return val.trim().length > 0 ? null : "请输入联系电话";
  516. },
  517. ),
  518. ChiosePicker(
  519. range: learnListChiose,
  520. label: "学历",
  521. isMust: true,
  522. value: learnChioseString,
  523. onConfirm: (value, index) {
  524. learnChiose = learnList[index]['value'];
  525. },
  526. ),
  527. TextFieldItem(
  528. title: "专业",
  529. isMust: true,
  530. content: "",
  531. controller: _professionalController,
  532. hintText: "请输入您的专业",
  533. validator: (val) {
  534. return val.trim().length > 0 ? null : "请输入您的专业";
  535. },
  536. ),
  537. TextFieldItem(
  538. title: "从业时长",
  539. isMust: true,
  540. content: "",
  541. keyboardType: TextInputType.number,
  542. controller: _workDateController,
  543. hintText: "请输入您的从业时长",
  544. validator: (val) {
  545. return val.trim().length > 0 ? null : "请输入您的从业时长";
  546. },
  547. ),
  548. TextFieldItem(
  549. title: "所在公司",
  550. content: "",
  551. controller: _companyController,
  552. hintText: "请输入您的所在公司",
  553. ),
  554. TextFieldItem(
  555. title: "现任岗位",
  556. content: "",
  557. controller: _jobController,
  558. hintText: "请输入您的现任岗位",
  559. ),
  560. // TextFieldItem(
  561. // title: "常驻工作地",
  562. // content: "",
  563. // controller: _residentPlaceController,
  564. // hintText: "常驻工作地",
  565. // onChanged: (res) {
  566. // // setState(() {});
  567. // },
  568. // ),
  569. InkWell(
  570. onTap: () {
  571. NavigatorUtils.push(
  572. context, "${BbsRouter.mapChoicePoint}?type=2");
  573. },
  574. child: Container(
  575. padding: EdgeInsets.only(
  576. left: ScreenUtil().setWidth(15),
  577. right: ScreenUtil().setWidth(15),
  578. top: ScreenUtil().setWidth(10),
  579. bottom: ScreenUtil().setWidth(10)),
  580. decoration: BoxDecoration(
  581. border: Border(
  582. bottom:
  583. BorderSide(width: 0.5, color: Colours.line),
  584. ),
  585. ),
  586. child: Row(
  587. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  588. children: <Widget>[
  589. Row(
  590. children: <Widget>[
  591. Text(
  592. "常驻工作地",
  593. style: TextStyle(
  594. color: Color(0xff222222),
  595. // fontSize:ScreenUtil().setSp(14)
  596. ),
  597. textAlign: TextAlign.start,
  598. ),
  599. Text(
  600. "*",
  601. style: TextStyle(
  602. color: Color(0xffff0000),
  603. // fontSize:ScreenUtil().setSp(14)
  604. ),
  605. textAlign: TextAlign.start,
  606. ),
  607. ],
  608. ),
  609. Expanded(
  610. child: Text(
  611. addressName != null && addressName != ""
  612. ? addressName.split(",")[0]
  613. : "请选择",
  614. style: TextStyle(
  615. color: Color(0xff999999),
  616. // fontSize:ScreenUtil().setSp(14)
  617. ),
  618. textAlign: TextAlign.end,
  619. maxLines: 1,
  620. overflow: TextOverflow.ellipsis,
  621. ),
  622. )
  623. ]),
  624. ),
  625. ),
  626. Container(
  627. height: ScreenUtil().setHeight(45),
  628. padding: EdgeInsets.only(
  629. left: ScreenUtil().setWidth(15),
  630. right: ScreenUtil().setWidth(15),
  631. ),
  632. alignment: Alignment.centerLeft,
  633. decoration: BoxDecoration(
  634. color: ThemeUtils.getDialogTextFieldColor(context),
  635. ),
  636. child: Text(
  637. "工作经历",
  638. style: TextStyle(
  639. fontSize: ScreenUtil().setSp(15),
  640. fontWeight: FontWeight.bold,
  641. ),
  642. ),
  643. ),
  644. Row(
  645. crossAxisAlignment: CrossAxisAlignment.start,
  646. mainAxisAlignment: MainAxisAlignment.start,
  647. children: <Widget>[
  648. Container(
  649. padding: EdgeInsets.only(
  650. left: ScreenUtil().setWidth(15),
  651. top: ScreenUtil().setWidth(5),
  652. bottom: ScreenUtil().setWidth(5),
  653. ),
  654. child: Text(
  655. "工作经历",
  656. style: TextStyle(
  657. color: Color(0xff222222),
  658. // fontSize:ScreenUtil().setSp(14),
  659. ),
  660. textAlign: TextAlign.left,
  661. ),
  662. ),
  663. ],
  664. ),
  665. Container(
  666. height: 100,
  667. padding: EdgeInsets.only(
  668. left: ScreenUtil().setWidth(15),
  669. right: ScreenUtil().setWidth(15),
  670. bottom: ScreenUtil().setWidth(20),
  671. ),
  672. child: TextFormField(
  673. // autofocus: true,
  674. maxLength: 50,
  675. cursorColor: Color(0xffcccccc),
  676. controller: _workExperienceController,
  677. maxLines: 5,
  678. decoration: InputDecoration(
  679. contentPadding: EdgeInsets.all(0),
  680. hintText: '请输入工作时间+岗位+工作内容',
  681. hintStyle: TextStyle(
  682. color: Color(0xffcccccc),
  683. // fontSize: ScreenUtil().setSp(14)
  684. ),
  685. focusedBorder: InputBorder.none,
  686. border: InputBorder.none,
  687. // filled: true, // 背景色
  688. // fillColor: Colors.cyan.withAlpha(35),
  689. // icon: Icon(Icons.person)
  690. ),
  691. ),
  692. ),
  693. SizedBox(
  694. height: 6,
  695. child: Container(color: ThemeUtils.getDialogTextFieldColor(context)),
  696. ),
  697. Row(
  698. crossAxisAlignment: CrossAxisAlignment.start,
  699. mainAxisAlignment: MainAxisAlignment.start,
  700. children: <Widget>[
  701. Container(
  702. padding: EdgeInsets.only(
  703. left: ScreenUtil().setWidth(15),
  704. top: ScreenUtil().setWidth(5),
  705. bottom: ScreenUtil().setWidth(5)),
  706. child: Text(
  707. "项目经历",
  708. style: TextStyle(
  709. color: Color(0xff222222),
  710. // fontSize:ScreenUtil().setSp(14),
  711. ),
  712. textAlign: TextAlign.left,
  713. ),
  714. ),
  715. ],
  716. ),
  717. Container(
  718. height: 100,
  719. padding: EdgeInsets.only(
  720. left: ScreenUtil().setWidth(15),
  721. right: ScreenUtil().setWidth(15),
  722. bottom: ScreenUtil().setWidth(20)),
  723. child: TextFormField(
  724. // autofocus: true,
  725. maxLength: 50,
  726. cursorColor: Color(0xffcccccc),
  727. controller: _projectExperienceController,
  728. maxLines: 5,
  729. decoration: InputDecoration(
  730. contentPadding: EdgeInsets.all(0),
  731. hintText: '请输入项目时间+项目名称+主要职责',
  732. hintStyle: TextStyle(
  733. color: Color(0xffcccccc),
  734. ),
  735. focusedBorder: InputBorder.none,
  736. border: InputBorder.none,
  737. ),
  738. ),
  739. ),
  740. Container(
  741. height: ScreenUtil().setHeight(45),
  742. padding: EdgeInsets.only(
  743. left: ScreenUtil().setWidth(15),
  744. right: ScreenUtil().setWidth(15),
  745. ),
  746. alignment: Alignment.centerLeft,
  747. decoration: BoxDecoration(
  748. color: ThemeUtils.getDialogTextFieldColor(context),
  749. ),
  750. child: Text(
  751. "技术特点",
  752. style: TextStyle(
  753. fontSize: ScreenUtil().setSp(15),
  754. fontWeight: FontWeight.bold,
  755. ),
  756. ),
  757. ),
  758. // TextFieldItem(
  759. // title: "擅长品牌",
  760. // isMust: true,
  761. // content: "",
  762. // controller: _proficiencyBrandController,
  763. // hintText: "请输入电梯品牌",
  764. // validator: (val) {
  765. // return val.trim().length > 0 ? null : "请输入擅长品牌";
  766. // },
  767. // ),
  768. ClickItem(
  769. title: "擅长品牌",
  770. content: defaultValue,
  771. isMust:true,
  772. onTap: () {
  773. setState(() {
  774. sortBool = false;
  775. });
  776. },
  777. ),
  778. TextFieldItem(
  779. title: "擅长电气",
  780. isMust: true,
  781. content: "",
  782. controller: _goodElectricalController,
  783. hintText: "请输入电气类别",
  784. validator: (val) {
  785. return val.trim().length > 0 ? null : "请输入擅长电气";
  786. },
  787. ),
  788. TextFieldItem(
  789. title: "擅长机械",
  790. isMust: true,
  791. content: "",
  792. controller: _goodMechanicalController,
  793. hintText: "请输入机械类别",
  794. validator: (val) {
  795. return val.trim().length > 0 ? null : "请输入擅长机械";
  796. },
  797. ),
  798. Container(
  799. height: ScreenUtil().setHeight(45),
  800. padding: EdgeInsets.only(
  801. left: ScreenUtil().setWidth(15),
  802. right: ScreenUtil().setWidth(15),
  803. ),
  804. alignment: Alignment.centerLeft,
  805. decoration: BoxDecoration(
  806. color: ThemeUtils.getDialogTextFieldColor(context),
  807. ),
  808. child: Text(
  809. "上传证照",
  810. style: TextStyle(
  811. fontSize: ScreenUtil().setSp(15),
  812. fontWeight: FontWeight.bold,
  813. ),
  814. ),
  815. ),
  816. IdPhoto(
  817. title: "身份证上传",
  818. desc: "上传身份证人像面",
  819. cover: "apply_idcard",
  820. isMust: true,
  821. uploadFile:cardPicture,
  822. change: (value) {
  823. cardPicture = value;
  824. }),
  825. IdPhoto(
  826. title: "学历学位证书上传",
  827. desc: "上传学位学历证书人面像",
  828. cover: "apply_education",
  829. uploadFile:degreeCertificate,
  830. change: (value) {
  831. degreeCertificate = value;
  832. }),
  833. IdPhoto(
  834. title: "专业技能证书上传",
  835. desc: "上传专业技能证书人像面",
  836. cover: "apply_profession",
  837. uploadFile:skillsCertificate,
  838. isMust: true,
  839. change: (value) {
  840. skillsCertificate = value;
  841. }),
  842. IdPhoto(
  843. title: "其他证书上传",
  844. desc: "其他荣誉、培训证书等",
  845. cover: "apply_other",
  846. uploadFile:otherCertificates,
  847. change: (value) {
  848. otherCertificates = value;
  849. }),
  850. Container(
  851. height: ScreenUtil().setHeight(45),
  852. padding: EdgeInsets.only(
  853. left: ScreenUtil().setWidth(15),
  854. right: ScreenUtil().setWidth(15),
  855. ),
  856. alignment: Alignment.centerLeft,
  857. decoration: BoxDecoration(
  858. color: ThemeUtils.getDialogTextFieldColor(context),
  859. ),
  860. child: Row(
  861. children: <Widget>[
  862. Checkbox(
  863. value: _protocol,
  864. activeColor: Colors.red, //选中时的颜色
  865. onChanged: (value) {
  866. setState(() {
  867. _protocol = value;
  868. });
  869. print(_protocol);
  870. },
  871. ),
  872. GestureDetector(
  873. onTap: () {
  874. NavigatorUtils.push(
  875. context, "${WodeRouter.xieyiList}");
  876. },
  877. child: Row(
  878. children: <Widget>[
  879. Text("同意《"),
  880. Text(
  881. "专家协议",
  882. style: TextStyle(
  883. color:Color(0xFF0287FF),
  884. ),
  885. // textAlign:TextAlign.start,
  886. ),
  887. Text("》")
  888. ],
  889. )
  890. ),
  891. ],
  892. ),
  893. ),
  894. SizedBox(
  895. height: 6,
  896. child: Container(color: ThemeUtils.getDialogTextFieldColor(context)),
  897. ),
  898. ],
  899. ),
  900. )
  901. ],
  902. ),
  903. ),
  904. Positioned(
  905. bottom: 0,
  906. left: 0,
  907. child: Container(
  908. width: width,
  909. padding: EdgeInsets.only(
  910. top: ScreenUtil().setWidth(15),
  911. bottom: ScreenUtil().setWidth(15),
  912. left: ScreenUtil().setWidth(25),
  913. right: ScreenUtil().setWidth(25),
  914. ),
  915. color: ThemeUtils.getDialogTextFieldColor(context),
  916. child: ((detailObj == null) || (detailObj != null&&detailObj.checkFlag == 0))? Container(
  917. height: ScreenUtil().setWidth(44),
  918. decoration: BoxDecoration(
  919. borderRadius:
  920. BorderRadius.circular(ScreenUtil().setWidth(22)),
  921. gradient: const LinearGradient(
  922. colors: [Color(0xFF00D9FF), Color(0xFF0287FF)],
  923. ),
  924. ),
  925. child: FlatButton(
  926. // padding: EdgeInsets.all(15.0),
  927. child: Text("提交"),
  928. textColor: Colors.white,
  929. onPressed: () {
  930. if ((_formKey.currentState as FormState).validate()) {
  931. if(detailObj == null){
  932. submit("add");
  933. }else {
  934. submit("edit");
  935. }
  936. }
  937. },
  938. ),
  939. ):Container(
  940. height: ScreenUtil().setWidth(44),
  941. decoration: BoxDecoration(
  942. borderRadius:
  943. BorderRadius.circular(ScreenUtil().setWidth(22)),
  944. color:Color(0xffcccccc)
  945. ),
  946. child: FlatButton(
  947. // padding: EdgeInsets.all(15.0),
  948. child: Text("提交"),
  949. textColor: Colors.white,
  950. onPressed: () {
  951. toasts("审核中,请勿重复提交!");
  952. },
  953. ),
  954. ),
  955. ),
  956. ),
  957. !sortBool
  958. ? Positioned(
  959. top: 0,
  960. left: 0,
  961. child: GestureDetector(
  962. onTap: () {
  963. setState(() {
  964. sortBool = true;
  965. if(ids!=null&&ids!=""){
  966. defaultValueList = defaultValue.split(",");
  967. idsList = ids.split(",");
  968. }else {
  969. defaultValueList = [];
  970. idsList = [];
  971. }
  972. });
  973. },
  974. child: Container(
  975. width: width,
  976. height: height,
  977. color: Color.fromRGBO(0, 0, 0, 0.5)),
  978. ),
  979. )
  980. : Container(child: null),
  981. !sortBool?
  982. Positioned(
  983. top:0,
  984. right:0,
  985. child:Container(
  986. width: width/4*3,
  987. height:height,
  988. color: Colors.white,
  989. padding: EdgeInsets.only(top:ScreenUtil().setWidth(45)),
  990. child:ListView(
  991. children:<Widget>[
  992. brandList!=null&&brandList!=[]?Container(
  993. child: Wrap(
  994. alignment: WrapAlignment.start,
  995. crossAxisAlignment: WrapCrossAlignment.center,
  996. children: brandList.asMap().keys.map((index){
  997. return InkWell(
  998. onTap: (){
  999. print("666");
  1000. setState(() {
  1001. if(idsList.contains(brandList[index].id.toString())){
  1002. defaultValueList.remove(brandList[index].name);
  1003. idsList.remove(brandList[index].id.toString());
  1004. }else {
  1005. if(idsList.length>=3){
  1006. toasts("最多只能选择3个品牌");
  1007. }else {
  1008. defaultValueList.add(brandList[index].name);
  1009. idsList.add(brandList[index].id.toString());
  1010. }
  1011. }
  1012. print(idsList);
  1013. });
  1014. },
  1015. child: Container(
  1016. width: width/4-12,
  1017. padding: EdgeInsets.only(bottom:ScreenUtil().setWidth(10),top:ScreenUtil().setWidth(10)),
  1018. margin: EdgeInsets.only(left:5,right:5,bottom:5,top:5),
  1019. decoration: BoxDecoration(
  1020. // border: Border(
  1021. // bottom: BorderSide(width: 0.5, color: Colours.line),
  1022. // ),
  1023. color: Color(0xfff5f5f5)
  1024. ),
  1025. child:Text(
  1026. brandList[index].name??"",
  1027. style: TextStyle(
  1028. color:idsList.contains(brandList[index].id.toString())?Color(0xffff0000):Color(0xff666666),
  1029. fontSize:ScreenUtil().setSp(15)
  1030. ),
  1031. textAlign:TextAlign.center,
  1032. ),
  1033. ),
  1034. );
  1035. }).toList(),
  1036. )
  1037. ):loadCircle()
  1038. ],
  1039. )
  1040. )
  1041. ):
  1042. Container(
  1043. child:null
  1044. ),
  1045. !sortBool?
  1046. Positioned(
  1047. top:0,
  1048. right:0,
  1049. child:
  1050. Container(
  1051. width: width/4*3,
  1052. padding: EdgeInsets.only(left:10,top:10,bottom:10,right:10),
  1053. child:Row(
  1054. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  1055. children: <Widget>[
  1056. Text(
  1057. "品牌",
  1058. style: TextStyle(
  1059. color:Color(0xff666666),
  1060. fontSize:ScreenUtil().setSp(16)
  1061. ),
  1062. textAlign:TextAlign.start,
  1063. ),
  1064. GestureDetector(
  1065. onTap: (){
  1066. setState(() {
  1067. sortBool = true;
  1068. String str = "";
  1069. String strD = "";
  1070. idsList.forEach((item){
  1071. str += (item.toString() + ",");
  1072. });
  1073. ids = str.substring(0, str.length-1);
  1074. defaultValueList.forEach((item){
  1075. strD += (item.toString() + ",");
  1076. });
  1077. defaultValue = strD.substring(0, strD.length-1);
  1078. print(defaultValue);
  1079. print(ids);
  1080. });
  1081. },
  1082. child: Text(
  1083. "确定",
  1084. style: TextStyle(
  1085. color:Color(0xFF0287FF),
  1086. fontSize:ScreenUtil().setSp(16)
  1087. ),
  1088. textAlign:TextAlign.start,
  1089. ),
  1090. )
  1091. ],
  1092. )
  1093. ),
  1094. ):
  1095. Container(
  1096. child:null
  1097. ),
  1098. ],
  1099. ),
  1100. ):Center(
  1101. child: Text("正在加载..."),
  1102. ),
  1103. );
  1104. }
  1105. Widget loadCircle() {
  1106. return Container(
  1107. padding: EdgeInsets.only(top: 10, bottom: 10),
  1108. color: ThemeUtils.getTabsBg(context),
  1109. child: Center(
  1110. child: SpinKitFadingCircle(
  1111. color: Colors.blueAccent,
  1112. size: 30.0,
  1113. ),
  1114. ),
  1115. );
  1116. }
  1117. }
  1118. class IdPhoto extends StatefulWidget {
  1119. IdPhoto({
  1120. Key key,
  1121. this.title,
  1122. this.desc,
  1123. this.uploadFile = "",
  1124. this.cover,
  1125. this.isMust: false,
  1126. this.change,
  1127. }) : super(key: key);
  1128. final String title;
  1129. final String desc;
  1130. String uploadFile;
  1131. final String cover;
  1132. final bool isMust;
  1133. final Function(String) change;
  1134. @override
  1135. _IdPhotoState createState() => _IdPhotoState();
  1136. }
  1137. class _IdPhotoState extends State<IdPhoto> {
  1138. @override
  1139. initState() {
  1140. super.initState();
  1141. }
  1142. void selectPicker() {
  1143. showDialog(
  1144. context: context,
  1145. builder: (BuildContext context) {
  1146. return SimpleDialog(
  1147. title: Text(widget.title ?? "图片上传"),
  1148. children: ["拍照", '从手机相册选择'].map((String value) {
  1149. return SimpleDialogOption(
  1150. child: Text(
  1151. value,
  1152. style: TextStyle(fontSize: 16, fontWeight: FontWeight.w500),
  1153. ),
  1154. onPressed: () {
  1155. _getImage(value == '拍照' ? 1 : 0);
  1156. Navigator.of(context).pop();
  1157. },
  1158. );
  1159. }).toList(),
  1160. );
  1161. },
  1162. );
  1163. }
  1164. void _getImage(int key) async {
  1165. try {
  1166. var _imageFile = await ImagePicker.pickImage(
  1167. source: key == 1 ? ImageSource.camera : ImageSource.gallery,
  1168. maxWidth: 800,
  1169. imageQuality: 95,
  1170. );
  1171. if (_imageFile != null) {
  1172. upLoadFileOnce(_imageFile.path);
  1173. // setState(() {});
  1174. }
  1175. } catch (e) {
  1176. toasts("没有权限,无法打开相册!");
  1177. }
  1178. }
  1179. void upLoadFileOnce(String path) {
  1180. showLoading(context, "正在上传...");
  1181. NewApiService().upload(path, onSuccess: (res) {
  1182. dismissLoading(context);
  1183. setState(() {
  1184. widget.uploadFile = res.pathUrl;
  1185. widget.change != null ? widget.change(res.pathUrl) : null;
  1186. setState(() {});
  1187. });
  1188. }, onError: (code, msg) {
  1189. dismissLoading(context);
  1190. toasts(msg);
  1191. });
  1192. }
  1193. @override
  1194. Widget build(BuildContext context) {
  1195. double width = MediaQuery.of(context).size.width;
  1196. return Container(
  1197. child: Container(
  1198. // height: ScreenUtil().setWidth(200),
  1199. padding: EdgeInsets.only(
  1200. top: ScreenUtil().setWidth(30),
  1201. right: ScreenUtil().setWidth(10),
  1202. bottom: ScreenUtil().setWidth(30),
  1203. left: ScreenUtil().setWidth(10),
  1204. ),
  1205. decoration: BoxDecoration(
  1206. border: Border(
  1207. bottom: Divider.createBorderSide(context, width: 0.6),
  1208. ),
  1209. ),
  1210. child: Row(
  1211. children: <Widget>[
  1212. Offstage(
  1213. offstage: !widget.isMust,
  1214. child: Text(
  1215. "*",
  1216. style: TextStyle(color: Colors.red),
  1217. ),
  1218. ),
  1219. Container(
  1220. child: Column(
  1221. mainAxisAlignment: MainAxisAlignment.center,
  1222. crossAxisAlignment: CrossAxisAlignment.start,
  1223. children: <Widget>[
  1224. Container(
  1225. child: Text(
  1226. widget.title,
  1227. textAlign: TextAlign.left,
  1228. style: TextStyle(
  1229. fontSize: ScreenUtil().setSp(16),
  1230. ),
  1231. ),
  1232. ),
  1233. Container(
  1234. child: Text(
  1235. widget.desc,
  1236. textAlign: TextAlign.left,
  1237. style: TextStyle(
  1238. fontSize: ScreenUtil().setSp(14),
  1239. color: Color(0xFF999999),
  1240. ),
  1241. ),
  1242. ),
  1243. ],
  1244. ),
  1245. ),
  1246. Expanded(
  1247. flex: 1,
  1248. child: Container(),
  1249. ),
  1250. GestureDetector(
  1251. onTap: () {
  1252. selectPicker();
  1253. },
  1254. child: widget.uploadFile.isEmpty
  1255. ? LoadAssetImage(
  1256. "wode/" + widget.cover,
  1257. fit: BoxFit.fill,
  1258. width: ScreenUtil().setWidth(140),
  1259. height: ScreenUtil().setWidth(89),
  1260. )
  1261. : LoadNetworkImage(
  1262. widget.uploadFile,
  1263. fit: BoxFit.fill,
  1264. width: ScreenUtil().setWidth(140),
  1265. height: ScreenUtil().setWidth(89),
  1266. ),
  1267. ),
  1268. ],
  1269. ),
  1270. ),
  1271. );
  1272. }
  1273. }
  1274. /// 封装输入框
  1275. class TextFieldItem extends StatelessWidget {
  1276. const TextFieldItem({
  1277. Key key,
  1278. this.controller,
  1279. @required this.title,
  1280. this.keyboardType: TextInputType.text,
  1281. this.hintText: "",
  1282. this.isMust: false,
  1283. this.content: "",
  1284. this.maxLength,
  1285. this.focusNode,
  1286. this.onChanged,
  1287. this.config,
  1288. this.validator,
  1289. }) : super(key: key);
  1290. final TextEditingController controller;
  1291. final String title;
  1292. final String hintText;
  1293. final bool isMust;
  1294. final String content;
  1295. final TextInputType keyboardType;
  1296. final int maxLength;
  1297. final FocusNode focusNode;
  1298. final Function onChanged;
  1299. final KeyboardActionsConfig config;
  1300. final FormFieldValidator<String> validator;
  1301. @override
  1302. Widget build(BuildContext context) {
  1303. if (config != null && defaultTargetPlatform == TargetPlatform.iOS) {
  1304. // 因Android平台输入法兼容问题,所以只配置IOS平台
  1305. FormKeyboardActions.setKeyboardActions(context, config);
  1306. }
  1307. if (content.length > 0) {
  1308. controller.text = content;
  1309. }
  1310. return Container(
  1311. // height: 50.0,
  1312. margin: const EdgeInsets.only(left: 16.0),
  1313. width: double.infinity,
  1314. decoration: BoxDecoration(
  1315. border: Border(
  1316. bottom: Divider.createBorderSide(context, width: 0.6),
  1317. )),
  1318. child: Row(
  1319. crossAxisAlignment: CrossAxisAlignment.start,
  1320. children: <Widget>[
  1321. Padding(
  1322. padding: const EdgeInsets.only(top:15),
  1323. child: Text(title),
  1324. ),
  1325. Offstage(
  1326. offstage: !this.isMust,
  1327. child: Container(
  1328. padding: EdgeInsets.only(top:18),
  1329. child: Text(
  1330. "*",
  1331. style: TextStyle(color: Colors.red),
  1332. ),
  1333. )
  1334. ),
  1335. Expanded(
  1336. flex: 1,
  1337. child: TextFormField(
  1338. textAlign: TextAlign.right,
  1339. onChanged: onChanged,
  1340. maxLength: maxLength,
  1341. focusNode: focusNode,
  1342. keyboardType: keyboardType,
  1343. inputFormatters: _getInputFormatters(),
  1344. controller: controller,
  1345. //style: TextStyles.textDark14,
  1346. decoration: InputDecoration(
  1347. hintText: hintText,
  1348. hintStyle: TextStyle(color: Colours.text_gray_c),
  1349. border: InputBorder.none, //去掉下划线
  1350. //hintStyle: TextStyles.textGrayC14
  1351. ),
  1352. validator: validator,
  1353. ),
  1354. ),
  1355. Gaps.hGap16
  1356. ],
  1357. ),
  1358. );
  1359. }
  1360. _getInputFormatters() {
  1361. if (keyboardType == TextInputType.numberWithOptions(decimal: true)) {
  1362. return [UsNumberTextInputFormatter()];
  1363. }
  1364. if (keyboardType == TextInputType.number ||
  1365. keyboardType == TextInputType.phone) {
  1366. return [WhitelistingTextInputFormatter.digitsOnly];
  1367. }
  1368. return null;
  1369. }
  1370. }