From fc40b171c57d66b344a9171c1527793502acc80d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=8F=E5=B0=91=E9=98=B3?= <786612630@qq.com> Date: Sat, 15 Jul 2023 15:11:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90SDK=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=88=B0=E6=9C=80=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../images/mine/icon_mine_main_addLock.png | Bin 1454 -> 376 bytes .../images/mine/icon_mine_main_gateway.png | Bin 1595 -> 1171 bytes .../images/mine/icon_mine_main_message.png | Bin 1635 -> 1487 bytes .../mine/icon_mine_main_moreServices.png | Bin 1542 -> 0 bytes star_lock/images/mine/icon_mine_main_set.png | Bin 1614 -> 1842 bytes .../mine/icon_mine_main_supportStaff.png | Bin 1651 -> 3118 bytes star_lock/ios/Podfile.lock | 4 +- .../ios/Runner.xcodeproj/project.pbxproj | 5 +- star_lock/lib/appRouters.dart | 2 +- star_lock/lib/app_settings/app_settings.dart | 4 +- star_lock/lib/app_settings/app_style.dart | 16 +- star_lock/lib/baseWidget.dart | 2 +- .../starLock_forgetPassword_page.dart | 20 +- .../lib/login/login/starLock_login_page.dart | 20 +- .../register/starLock_register_page.dart | 26 +- .../seletCountryRegion_page.dart | 4 +- star_lock/lib/main.dart | 6 +- .../authorizedAdminManage_page.dart | 4 +- .../authorizedAdminManage_tabbar.dart | 10 +- .../authorizedAdmin/authorizedAdmin_page.dart | 46 +- .../authorizedAdminDetail_page.dart | 24 +- .../authorizedAdminList_page.dart | 12 +- .../volumeAuthorizationLockManage_page.dart | 4 +- .../volumeAuthorizationLockManage_tabbar.dart | 10 +- .../volumeAuthorizationLock_page.dart | 45 +- .../checkingInAddHolidays_page.dart | 14 +- .../checkingInDetail_page.dart | 53 +- .../checkingInList/checkingInList_page.dart | 30 +- .../checkingInSet/checkingInSet_page.dart | 20 +- .../checkingInAddStaff_page.dart | 24 +- .../checkingInSetHolidays_page.dart | 18 +- .../checkingInStaffManage_page.dart | 6 +- .../checkingInSetWorkTime_page.dart | 10 +- .../checkingInSetWorkdaySet_page.dart | 30 +- .../electronicKeyDetail_page.dart | 28 +- .../electronicKeyDetailChangeDate_page.dart | 10 +- .../electronicKeyList_page.dart | 12 +- .../electronicKeyPeriodValidity_page.dart | 31 +- .../massSendElectronicKey_page.dart | 19 +- .../massSendElectronicKeyManage_page.dart | 4 +- .../massSendElectronicKeyManage_tabbar.dart | 12 +- .../sendElectronicKey_page.dart | 31 +- .../sendElectronicKeyManage_page.dart | 4 +- .../sendElectronicKeyManage_tabbar.dart | 14 +- .../sendEmailNotification_page.dart | 2 +- .../automaticBlocking_page.dart | 22 +- .../adminOpenLockPassword_page.dart | 10 +- .../basicInformation_page.dart | 16 +- .../editLockName/editLockName_page.dart | 8 +- .../lockSeletGrouping_page.dart | 6 +- .../uploadElectricQuantity_page.dart | 10 +- .../burglarAlarm/burglarAlarm_page.dart | 10 +- .../lcokSet/diagnose/diagnose_page.dart | 8 +- .../addDoorMagnetic/addDoorMagnetic_page.dart | 10 +- .../doorMagneticList/doorMagnetic_page.dart | 10 +- .../nearbyDoorMagnetic_page.dart | 6 +- .../ImportOtherLockData_page.dart | 12 +- .../lockEscalation/lockEscalation_page.dart | 12 +- .../lcokSet/lockSet/lockSet_page.dart | 42 +- .../lockSoundSet/lockSoundSet_page.dart | 22 +- .../lcokSet/lockTime/lockTime_page.dart | 8 +- .../markedHouseState_page.dart | 10 +- .../normallyOpenMode_page.dart | 35 +- .../remoteUnlocking/remoteUnlocking_page.dart | 10 +- .../lcokSet/resetButton/resetButton_page.dart | 10 +- .../unlockQRCode/unlockQRCode_page.dart | 6 +- .../lcokSet/uploadData/uploadData_page.dart | 8 +- .../addWirelessKeyboard_page.dart | 12 +- ...WirelessKeyboardScreenNotLightOn_page.dart | 12 +- .../seletWirelessKeyboard_page.dart | 6 +- .../wirelessKeyboard_page.dart | 10 +- .../lockDetail/lockDetail_page.dart | 26 +- .../lockOperatingRecord_page.dart | 10 +- .../otherTypeAddKey/otherTypeAddKey_page.dart | 27 +- .../otherTypeKeyDetail_page.dart | 34 +- .../otherTypeKeyList_page.dart | 20 +- .../otherTypeKeyManage_page.dart | 14 +- .../otherTypeKeyManage_tabbar.dart | 12 +- .../passwordKeyDetail_page.dart | 30 +- .../passwordKeyList/passwordKeyList_page.dart | 12 +- .../passwordKeyManage_page.dart | 4 +- .../passwordKeyManage_tabbar.dart | 18 +- .../passwordKey_perpetual_page.dart | 43 +- .../lib/main/lockMian/lockMain_page.dart | 8 +- .../mine/addLock/addLock/addLock_page.dart | 10 +- .../addLock/lockAddress/lockAddress_page.dart | 2 +- .../addLock/nearbyLock/nearbyLock_page.dart | 6 +- .../mine/addLock/saveLock/saveLock_page.dart | 8 +- .../seletLockType/seletLockType_page.dart | 26 +- .../mineMultiLanguage_page.dart | 4 +- .../mineMultiLanguage_state.dart | 6 +- star_lock/lib/mine/mineSet/mineSet_page.dart | 106 ++-- star_lock/lib/mine/mine_page.dart | 63 ++- star_lock/lib/navPages.dart | 2 +- star_lock/lib/starLockApplication.dart | 2 +- .../tools/CustomUnderlineTabIndicator.dart | 47 +- star_lock/lib/tools/app_manager.dart | 10 +- star_lock/lib/tools/commonItem.dart | 26 +- star_lock/lib/tools/device_info_service.dart | 5 +- star_lock/lib/tools/forgetPwdInput.dart | 16 +- star_lock/lib/tools/jh_pop_menus.dart | 11 +- star_lock/lib/tools/loginInput.dart | 24 +- star_lock/lib/tools/noData.dart | 2 +- .../lib/tools/platform_info_services.dart | 2 +- star_lock/lib/tools/showBottomSheetTool.dart | 48 +- star_lock/lib/tools/showCalendar.dart | 10 +- star_lock/lib/tools/showSeletDateTime.dart | 4 +- star_lock/lib/tools/showTFView.dart | 14 +- star_lock/lib/tools/store_service.dart | 16 +- star_lock/lib/tools/submitBtn.dart | 24 +- star_lock/lib/tools/titleAppBar.dart | 26 +- star_lock/lib/translations/app_dept.dart | 4 +- star_lock/lib/translations/lanKeyEntity.dart | 478 +++++++++--------- .../lib/translations/translation_loader.dart | 20 +- star_lock/pubspec.yaml | 4 +- 115 files changed, 1144 insertions(+), 1107 deletions(-) delete mode 100644 star_lock/images/mine/icon_mine_main_moreServices.png diff --git a/star_lock/images/mine/icon_mine_main_addLock.png b/star_lock/images/mine/icon_mine_main_addLock.png index 627bd8445e5aea6de101b94ce1261ba4cd28ca01..a37b9a685c5bac39f978ef3b6cc665bd1545331e 100644 GIT binary patch literal 376 zcmV-;0f+vHP)ZS4Q%`Q(cOa6Q1P8V_nw`H|FiX1AapWib591IR|45j4@r~noI)hgs14WU6qR2o|WS}TyfsW(svt?OST0FjP z)SPoH%W_&&RTb*G1^{@Thad<}I}}Ahk|aL|hGBSGOi5XmpRR9z1`qpS6h)Zl`Lw8M z8Z=D<0B~IwzVDxQsH%FncX-8rr6>yIc@6-G;}~h0QfTR3ao2VG{IOY6Ko+=d+qbhQ zxBp0FpeQm>6d5Rr3>1YdaGIul9>mSsm8^0000-+zm-vpfIu4wsJAsh{}e# zC5!Wh(_}cNuw@Bjvmhf591Pi($)y_trn0ixI^)^tvuw$>=kz=0ci!(k zPrv8uNx1>;dysBURi^?$0HomooD-f(DJ{$g$jE>d0KfuKSqL-|wm>ir0J55#uLM<7 zKISL65mKU7sd6$kTT|8PDPC)0T5B>D@g{qWRz5!J{KZ%g8&^_coJBx-eOA1 z%uMGU9$b0$$Qj@J_QhfYi+JDY0cU>KRgp2 z+L9j|-v&pv}XzfsBP92%?BEAY}w4Be)Jw zpbtZM^}v`QDVh-oS&`Te8*EY_35p_VieYGcZ-|$19%vb}Aar$-U}2V47`9IybMW{D zHaxlE+9FNwSVXMOd`Kh?2wWT#9Jy4vZ25|~_$St^UAJDfF(q|VntJoL?K_^{iShKg zdHIHd!WS*p{lz7vWd{ydy!u+@k)y}nI&t#U=`&Sl-+s5|y^EJ>>)!w1<4-Qz8k?>( zfBJcQ#}}Q~yT1IY&;IRq{Wk{&hnyon{CLOZzWdYY_%9Q`-t+u+fAV)e7Xj2KHbzcU`p9R&@>DDN8iinul9fwH7JN z|Gv?vuFnES6-(+lxV*J9+dru{Tau#-URqTJ|ZbHa_=ir`g)8yY9pyk28*O`dCbP)%>}K~a<F@7netuq8uz$*GwQ}dq9ZsD(Rn~7Pw~FKOIDLJ6 zx>s#034*}T&`?=O4WObZbaZs^`SWK0YHDh5xm+ALa6nh6Y&Of}`WvQs_k;QDh3D8 z(9pout5?hB-joLL$9Y#>U0orx?=qXss-4MXH2yum5B>%GQ*GNxc2YW>=EaK_ynXwY zWHQOh$_lb9Q&UsJp+ko_cI+5u&Ya=m#fv}9wTc6N`0#<@;bEqyr%@C|PTwh-&5C||nK2EXteSbHb&DiaBEEWrbAW$e2SX^9W zc6OF@I*p(}Y+?PdS|{rUoa`SJy?*Gnpu0!r=a+O=!6x3|;M(z4}y zb8~Zq!(pC0c|xI3ARG?!{{4Ff1_n5CL{|7z_rwy1MA>>{R3E1_-D@H#Ro7ckdokQ&Xx>6h&+{ z8@08yWV2Zki3It4p4HV=?%%)9n>TN`d-pCzqjA@8zYMskTrNj4nFLA=zq`AeOP4Mo zilRCupU)GCM0ou8G0V%#B$G*Uxg18L@t1P_7NE&wA`l1=3f^_c z3=9mYT_qF>(bUw$<;$1io15`^ zy)-m5U^1DIB#A3muILe3pE(HNcDr%A-Fk&nwdW74|35%M5L7#t%T*j8oldKExs6-{ zXtUW=`{~oCEG{lqh74Fec+f#=Vk?|AjGXD*NYem|#A zpVs)wE|QZcPx9cw1FTkS#o?@0D?>v=W#M3p3T{eK6k@R$i9~|0U%%=KR##Vt&1U25 l*|XbTU~UVz7qsX1!EbuHt1)jzc((um002ovPDHLkV1m2sGvojO literal 1595 zcmbW12~1OW9LIm}=s`EESA z@1JRW+Wx)h%0^=&+V4OJ1JOV9co=#DART0o4RT0=M36!T2*3|jWRL>!h((YF5_lC{ z5WB(aXt>jRi|$1-?wPTsm;>-iMt`D-v36tv;EF$hRh6;kxCCH{)_Pqn6U)V`e&~$N zlZpg)H^X;~+XBEiM^Uo}0a#lB^mi$0sfD8SH2}mgK>Iw^4tzFPgAIW>0M5qI6*R)EVc=UiyE4EfMW!KlLUi7qUQ$7Me{)N8SCs_{g~?`#4LxS=58lS zFR&f`8*W)d4(NpLvGS8997`)}8`~{TFTb*Nn}_EcJKpqqDI<@wJpUi!SIwyyq*tBu#1np?iP zexsvP^KDo6cRjtg2Y-ofnz+uXnOLc=W+NB2mbMXY>)V=43) z+cHB(GbHu%~X`O8Wi1Cs*XGQi>gNj6g>Q1Oo1lyc)zn_*6e6?!L(w$ zo0Bt2L41tl^xUkfD8r}7Qe_dls8EbQ8QHD5QF5)kU!r;TX=P?MhnRRbdN}$}^O=;= zEB4#9>lzu}6b@{ra)%|6AQIkjqKa;{yBF0bx|M%wr}~^*8{1|8xIf;E2m%##{|~Me^B4dC diff --git a/star_lock/images/mine/icon_mine_main_message.png b/star_lock/images/mine/icon_mine_main_message.png index 4d486df2358263d400059863c7af4ac3ef2ed07b..42e7f268095f02ebb8996aca57024884cc6e5a4a 100644 GIT binary patch literal 1487 zcmV;=1u*)FP)Y{E!hV5c9BBF?9g$kOsaH+wJ3{&=YF?N2wy_;^j zA9d09>OAK;=RBYHob#T4nnWTY^A}6{(*P^!AK+T0U2Vnj@o~c8Fp)@vv9U2GCnx#& z^CtiW1qB$5M#{^}*|TR4hYlTL`}XatilfQpCrKm{1Ofs4em}#*!#M@2s;a`_aA339 zkfiJfE^ENouU~WR+BH6Y{FoEi?22kj2GCRo%9>Haa>w&}cNP2V7iS#N~1^FfgFVHGfcy9F6OBd{zJ`Vd+-^5oZRTGgBcLqHxZQ60`};*+K|ulM z&!6Yy$&)$FBS_BQM~@zH>((vtGXYqwR$MMu#-7X=#qakk;7UqL@Or)2?e?7E03=Dm zZnxw0dMPO>5&8Z7{rLUNSRoS#%;q&Fn%e zb4syTOu+sAwTVQ6iHQkePfScG+F4q5etw= zva(Xx$B!TXuMtVYYPAa6YPBjB^QC1gD=Vp}s1Ww->}*=tlvG1(G#VKj8v|fuWP~F} zjwB0ewRk)pLZJ{_w{B(s{{4!2SFT*)=+UDRW*RaM28FJEYEY*g&MBO@as zU0PbYGGI+jjQ|XX!<;>PR`~RKJvN(7)d+w_qoJ{}F|7|!eNal_a9E^w?%b*JtA_aS z;lm<5JUq zzP>)ZUazptW-|_lBW>A?2iBpXA-cM{#NkqsBsw}eIDPu`ipTU!l4Y4YckXce_HB`; z)9JW*^CmSlHMs!-JbU&Gx7)2)KpPqwaJgKH^)eepA`x!fxWW7P??s*@Nw{1tnwpw2 z)?4;o+|<;BEX!QIdR3ec2L=ZC^yw2jcI*I>_m)g|is|WToI65D)Q&%=J0qtJbChjEnBuwT3RX&53{qgeE$5I>FMdTZJNzy zTrL;8cI{dze0DDj)z#GsI}{4>`0-=De*Fq054q_Mo4-r1*VES4Mr&&;>(;HyCUkZe z_wV1obK=B_tQt(G>gsBa9Xm#Ib2A$@Y{;qZs^4Z(I(YCP`}XZ47K`!Y#}5G3uV2r$ zZQCd>FK6%Gy^4iDSFIXw^XAQ5xNsrk-kdM33b47knXaxbHf`FJZyuGh0xT>n6gx{U p4?p=(PS0p#G?>K8Y{7nA6;j-dbm002ovPDHLkV1f!4;jI7w literal 1635 zcmbW12~bm46o$`RvH%$%EQz3Pkj1Tt%4SuDEv!}sj3O$c4FLiLVhmA0g^q%tZLOsg z0b3Vvq1ZBtY%VjPqJVbVLXdz&L`0A}P7PX+Rx+>mg-V=`ooV|g_r33(d-CW0H+Mqy zP!GU-Wl(4kU>HCMdI2>6zJVD@2>@YXumAwqfaNCvi3qiTEgAs$34FR@bAm81JxM*p zIiW(~mIzUJQ0S^ay)`x|mdjIUlT?{fAqw`lTfbqW9qTbLks}*c09!0cllw(PtfC!W z-)S~zT&-ULbS|X5WGcI#LcX!;bMi3T-=y>T?>UHS&6rfjFbmlnN$ zoOoH}8gyr)F$?W?0E9v4KlHfkdxWqR?%}!g{bkFA0f9lmA)zbRtc_e3h2lx# z;uEBaNgt&tx9>>L$lRHeyDu+)|A9}wEc~kIaB)fLk@AzLPM@jxw({(Sn%cVhhKrXj zUvIu~v!%7|)@@bioi25E&)wdEhl7uXh98go@?`Y+i{Hk^Urzk~2b~K8Vk#E8P9^(W zE-uQ2lO#d1=v)|{jt0Rc8MBu#E&Nuq#M>>3o?B503`@fP+2Q%c-fDmxK2plIE1VJ#E3?wF-NsDdF*30-War82!Wi~AenPA9+ zBuN%}o0}M!nEz){edwIpA(f{rpd!ax?1mm z1)szbe$+&tHoEzk{a%wM(@o)3F&a%wz2<{+78|02=M-}K{IKkf1$f2Fg73^q19x_) z8+|B{)|hcdwxm*!yIp4OQzz}&9k3~{#%F|r(P2Ir{_@t~56^txtr`gDO(eH^3#v!A zf&vAHt=@w+DQ6k3J8%7nW7zE1=qShjiuM{Bt*-vRIf&Hh^OwKpwTPpMiHmf;*v2}YFMuN`BZ=h?)VSg(aa-3nm9iSbJ6x9S#MFu7;%zTwn2EAAcozP}}&EIL(+W|q;glgbroD2^54 z(DXDp!*awX3bZK1c?`#{@p*=$*7%yPXHU2g^|T^3lEz77hNihggV%G_V3+RFOjhL?aeM5=dbi zI3jj|SI}@}_7**hq~9}rEp;Bi^AP$Gx%%4vhXB|805+BDYqnYdGql#GJh?<6S@T0@ zY=KOTadpw%V+M@?tYVse5&^(*09YBKX>B7-uT%pNqX4Z7bSv;FFb8u2vjLos5qym9 z1Of74VLClE#&CjUu{ji%XMh^&jR4080w)O;i$w1Y_BNUalFu@>cJ^g&43ltdQcPTO z3M(jEzq&Tl@IH;5Ym_3F%QM?#{=9|#=9jiOY;|*g)nmJ-m(V{TFi0d0-o0nH{Ke<}->5b2C);BbM z(e!0|N9V0?Z-3YIegD9nyMsf+Bcn>y_{8MHM~{D=nwfnvH@~pB^xN-DE)0mZSm?Z# z>@T_aC>KtW1j%7?VR$+k1fOJCJF|^_!#I+ZjW#Yhl!;$qMO_=$)-_yX8l~vtnc2B1 z?Pr*1x@7+@SnmHywjNBM>n9Kbt`mXd1dAXD7Mq2{rr3-q9;FlSPZ{d;9HR~EqLB%P zJV=t{ppTIO*TCpMi@t~cYH)fK3<(UqOavc%VC9Dy8uI4^C+-^zdS|LK?cNLSRbQG? zR_0fqjXEM4aGc)7t11$ij;po)!F9zxhFK}CJdf+`m>$7+?LrC-eW&+d zqk*3-D7Wm=G-u@AUNydZ!z-u1c}^R7vwO^=t6SalYeDuo?2wX%_p^4)xVBjcItARf z+z0bjmZIcDds*B_MQOT&EWvcU_wn8#$pNSA&dA#70!_ZC?M2IhSs(QWwKZ`B-Meyi zX-qS_sOo7?Hp%iFsJHL?WnSyxRMDJ~-PT^GlHYCdPwG;&fhi%R?uNEudGCR(J;Kz@*j zF}%dsO(VmSFsvj)Fe(Uy42--arqvKeHx083BG|>Oz)BJ|x|o)Zx71NP=lLM+*J;Mf z@IKG`zVN&Y4y?WQUTgpNUT3fUKgUj%WrhD?vHx!am`?r=@ZXhx4#48#VzgQ^XHPeAZLqn95lu%e$ z2*AUK51BRVU+!LBUPAZu^tA9laNqzVBO~Z^I$~mCm^*jwjOLy34vvnF3UB~9IXM6{ zG&E3FRz_uIrRaP9{5b}Lf%^J-6h)z|tc;P75df}VzfOOD|4gUF&Xz)5QBgrwR+eZl zT)2?WpFdCO(>kp4vMk;{r!}bln@;q zZDwmX!VR;)c2E?iK;!orlRSFb9+e*IFas;ZRW;9#>SH#b-5=;*NOFUzvh z-QBH}l$0nMjmFHcsHjMhWm&m*@1CO3Xq2?Hv`J%FO>sj*1N-*v6YT{H7V!1!SJ9q7 ze?F&ApJwUOrBfw9NM~m!M~@!m-Me?f=HugI_NruNW)d12YT;`&#eIE!xVyX4)zt-H z22QP3Q&3QVi;Ih}J$Ued>gsA*TU(K38E)x}MENEAgOFE5Wy?eLWA&H5J5#ZX|+Ss*g*QDS8 zzJLGD!Gj0I4dUeFL|R&!=y!5*A~`vEQgAR$nR);IJ$v`=746E(N+d}_Q51AK9qsMy zqEDyO5f~VVgM$Ngb#)XM7o#X+p(RP8yu4i8JP{EQ^!D}waO%`4)~{bbDZnXjl24yL z34P_tm7)|pe*D-BTux37Nl8hpS+jJi;F1GfBf;s^Z-** zQiOi{_HE9dJu4>D>2$zYTI=fS0JwblGGSq1ELyb4ERNA=4)`l$0czSvg7#K)Y zRFvR|0BLDy)YQ~i1(K4ILS$s5h21KfadmYy1Gi+!5>fk_o0~~WO5)_nlc?2dBuPTA z*Q3|#F_}!rvW%0HlUY2I$wXFGmKiu-UtgM&$BrGSR4S5_lPM}H zA~7*h^uKxYhUn;M?%utNEX%?!NsTa# z@L^$_j`G|5(KL~C+A7}O-jtS>+T>%?pM_`7o|%E0$;bD^41D?Wg|f0TTc(`(4h{?q zpw((cJ2W(u+7khsS($oySqCs1ehE!73_9F5dZ)H07*qoM6N<$f?wi^2LJ#7 literal 1614 zcmbW1c~BE)7{=c{l57Hngj3K_j8Kn4tDI_WB}9%`X%P=>$14N`B#MUxcxR%;&j@Xw$J9<{q6g``{aAR z?1Z_^^nq}Fh%5v!3?K|0z~~_`I4xlhKzKMT0{{xJyaXT-p%!pO0{}0gS^G_7P!l9ILR$j~6SZEwHh#v1}Ia-`r@pyUb-Es2QO zz&bp;vTTu|%e(?;_hP-0+uW{)6*=^J_}Lz=HTgAI`u>&#F|is2nlYl`uAtRg6vqv5 zM5>l%nMUlOMvFq6&2rof7qT2Z!(W+uHb+WPPaR^RB3>SY_y%In=;!Kj&vBA+AN#$m z*!{DPP2REzT`4r?q5WP5;UN2m9$#~h6jVS%I;bH5;vgQh;06*@p+O0;h-Hur3V0bj z5qraOGrbsfI0(H2OrC@l=H+X4&Ips zrPQLJih9S$n-lIn(dsO|z{z=zi>t?riAK*M&@kEhO`ErDjY9Dh zF|m8%;uH32wENyoO-q08{p_6Fyu%+H`S|E3pB_72_}Ph5r_Y=%D?j(e`HPpnzWhz) zw^ypZZ)p6Xsrl-)AKThHI=gP&?$+u12YwyAJ2X5pI{Dz?Z;uSWPd$FZ=E8uOiG|KH z$^Mc{gmU2|Nsv4?7lx;zL5N7s!WCRQ$wr<$#a`^4NjU@+lvdR97x_d^I7X{)3Y^@1 z^&XRKG;^|l7cA?4C7TUq$<+f=z|A6XoZt`y!Qpa{xD=NaC7{d_{3&a*Y*^XOia{nA z@*qi)hdx3pzLoGli|IvwH8`UKYXU~rE816jFq z7fea2=hb-S$@1#+8g;8jpX3Y<^o;taym3H97Vi!$S$Rw+8>mt&bI2^p=({j~zG`1n z=O$T_w9#vF@l(6jd(9J;`+Dmb_?yl(e|Ob?dhK9i zdH1EJmRhfa**62{jprI)Ii0q(-qSZR%*$SRFs{Iw=I>nD<#w+kXGc$jO%Xt!VEEjr IjI~VnADjyS@&Et; diff --git a/star_lock/images/mine/icon_mine_main_supportStaff.png b/star_lock/images/mine/icon_mine_main_supportStaff.png index 0a0f0b2b58c3604aab09e54be7834a289abed04e..06238db62988d50b3800d8fea5b298c6183091f6 100644 GIT binary patch literal 3118 zcmbVP`8(8$|9#J!G`0*QYZ&__+X!WyF_sxrBI_VS*}2HRWl}@Rma><)qGZi3OU76d zE^;kRSsI0GLo~$Tms$!+Fkmp7Yb|Imy?qV!1g)H~;|PHp3ZPpIqYq0m^p5 z6a%+G0O0&>W^8B^d1Kwh@ixCU?02`I7BVQo=g5I21RP>llP}VSFxdN^0U_WTobZCk zU?(K}4%Cwu(oOhrdM&EP=+u?AH&4q;@e|f2mlEIF;%^v~T9?~Q(lAkVrUc~bSPog0 zAG~!n0Yk(Phj>54?wPRggF_d==D@j5`_#>~HGl5oPJiL8EgFqh@Mh>sb0E)>aB=Gx zaF0CytM`#0U0GS#>cc9G0VJHe4-;R}!MI>w`-MhF?=P-S)g)oD*nY{C!Z5K8Il$}U zeIvI(G@3uwi-#I}PiuGU!b*MivKXY=rA@0P=v%imlpy4rcu?2p{a}VZ_nscNzmuH* z&qd2XXwdfJFc!9#v7#RwibeEn9PH9}`RGe6F#~X70v6SLJ#XE**!q0!Tsd6Q5p;fk zCys?}roNN?PCh~gc z@(^Uy`fjs3xBKl1ZH8*mjZ8`of62%T6zVcLM=b<|IRpEj!X}N>j%hB{H4W|Y(VOo7 ziVKy=P++JX6!Yh_KqHxQO(txO;vWHl9l6>ht2|Gd-z7M&k5F6G`xKMAW*!dKYY)o0 zd5Qq_%cRd!73h-rc;?>Q=lRH95C5pByf3zzyeV_@Z#f>INxJet9HXM5!sd_7Ax++v zY{}Dg4|-6`DIO6Z7-|l1#Cv%B$m$E^As?syvUwtnbmIHVo2%a?HMMJ-r0UxFm7dA^ zoVUwlFJs|4baucLM`T%0Awt(s0b*n0n(R8#z$A0(Vcy94*JyjY4xG9;Y3OQ_?%6TM zW0|gLdbEbZoklqL7k8&oB}vrfjUf^*ekyg{h>yv2&8MRJJVi|hf?$db#YXQ{@^I^` z#d|AHFMwV5!tZ*&0`v-5(uZ>?spbGzwijb()2wi|W;fHYF6Fkh9vgdjX_()ji8L{o z-f5atc_&Uye+AK46l!$?sht-5AoODPoU{mp-_%v>LVUi%Co#|uAjy6eK1Z<%*L=$0G6jl}ArCbDT{v)QKL|!voDI>OMk4nOp#%o= z*Lhq}tjs1X z&7e(tq+pp_ajBMhha0rV-VoLg20O_qj88y9)f{_M+~hbq;=$ta6{WZBsL>YbO?}H? zIpXNvBk@r+IzMc!wmrqr3&j0*{dLDmJ7;S^ET6=q5%pCg;v~HCHdQdKNsC@IqCS5a z2>s}Jcv`;!dfMyQm+xGi7-jMuOZ;drfYk=c+H_$=Hb*)I`{)=-+tyvl*V(W3PdSZxZ5{SYKU((( zlq)oA@&T>W8LN1Ho~A$Lp9S>SXfSIyI*94S)rEWZ=x)b}Ea1LI0xn1qA2Dp9Qd&sqMSUYth@Yu z{8pJGMhuyJA&=Ksc`w=RHJ{}}=zRW{8g?fYZkJa^7Pxz7b6HRs zS>ZK0uD@SxMK{Wk9(qbDUoRl;alNZ?9){Tq5J01gI^G%#y-L`mHLZC84 zMiQ5`6Sa>WEWBJXDOz7$wGfeVF7x~NE=RzbfgY8WPp^;Adny{F>V{~0HmY22mj zH)miT+U6)XRQScNLPztzOv%&w1;!HIEgdQ5AzH?@a}qc^m!JgQjjYOpEA`l-Q~xCi zzxDL3jJ{53P6L`mQMAVQp27shhCWVN?LAiin0Nw=drn8UA`Pf|6-ON}^WmG8dKkBw zt{Gx9AsWM^?sGygW_AwgcIa;3c!BXrS7?#RbbY%Wn!4EVTM+c-Whm90&1ljNI3xl1 z`}%`^r(OnJb&8iH3b>8@!b5xt{(qJTp<5Ove8aYRM!v%2yH_s9j)-YwQ4s6=+e$B( zZW+q>Ud^-Y!A3JxV+aRa&P``YOm&Y8oP~CeAr=7?-HD(voYI zqg%cgG*PeSpSKikS{PxPK@ zL&{i3`dq^ub-RbEAI01Un&c0=@WLn zTpchx)oaU|JIeO8Up@J8LkaVi-V@^hbBDat9zQnU2D03yh+;NrtEaniZj4qT*LCZ~ z&q-%IKL7Gft)n7{ZETj@#?DUY_idN9X9I|K;}s8F3@^g#TaUPIHp`-i2$j0kam@)z zFp6Z07yMd$ZkHpU0j%ohxG%kebqT+_q-tKhRFHkIWrPz#`!H5+N7@vOwT+)3V*q(8 zQoNaTY=gK`xt%0B((#SoQ}MilFx2wfC`lsT+08Wre=xz&X*k^oLsaVZHX`K+Cm&wH zy;LFco>1Jlm=den1A?4EH)?8&q9k{-SPcz77T!AjrAq&8sPd`d=wq(lmyYD0W-iTQ zYb`sfF`!VO-1asP6_630pZNM~%QqiaB$()J9c2PH(9O_JKW-M4NAHmca|SBaQM%6x2HS02eRm&!S!zV z;mt6K;sVpiviElhd5^2cGU7+BvP^FnB(mD$1yy^86dmNSV7uKV*O%&{ie8{s=nRzd$Y;-in-^xf0$57d|+qXftGn# z*~L@^U2Zf2(~^K3|Km96BI}rWzEBpDBCx5=Mg8Rb-u&tcT9jYOO078f%C|=WoC`aqG z*fuIUqaanQOzQy!tX2dCs~rnsIigM_s7Q5ys2pnI_HC%d>9jL#|C_h_+wXn*&-=gZ zgzBX30B^BaA_fcth(ZTY-4Gs`lbQ@5mBLH_U;|c=3M3-b0+Z1Izz^c%6}N-LIJ?r5 zlo97jM55I(vS_hnNu<>pGs`uablN0Ct<%aD2|ZTEf8fFD1txN2!vbK-6cRJHVwC1R{(9ZX)pD4k84r;oo@RCI~Ja|1UK6H{+8^LlvxTiV@6||LZj88I39>& zHs~}oYY;nW(V`IN)2tffJv1kdaiz6qxlDw5>Jjr4De@%5Er|URU#qKL{7 z`^QzPS1dzUHX2jVelG+mNdBQG$l4=b0THO8fpkzJmVg=*@D}(X z4g`NR1oYmbXOV1sW~*fl0nA^EengI~_Thbi6G8x&1Gbv?3jk-d*1CL+Tq_^*LuYK5 z%t{snTJJIY8UTi#qMpP7uzUe59TfGVhN3Ko0SE&?{V-Jzd^Wg(8-aNN&c_HoMqLDV z~1)KJX>93u#vBp3`5y*JoaG!G=7F~Kt+f;n-ioaMF7DKNLB zjO{Hvd0~>Qb#R&>QJcrHb9Qlco9y%E^clW0gMvfm&YK@9S{Nx_6eU@_Z25}VI22Ej zq)b+&q^4!*ve$3O*|=$2{`MUOg+;}?zWDMh{q8+`OUn;ce0})H(Ql5OI$c%$eNAoM znTE!TmztU{|8(Vg+l^n_J36}z-Nv4~_wM&T==c`Vsq za`90voFoa7Md!ls4QLR2lHnP^oDi{;C0{quD=?SsBrGXAd4c0CkPS{s)VA6=PYdey zG11Yi$^Koiy#JMKJeV!lO%MTY6@lXfgCGb7lYzu!GikBy*jCy7DXvv-&~h9Xg-kHy zL6Rg3eR%d9d)|K*bsPQF;FJNl1cqKFf)DS4rFnFliD;mJdv@059!Hmi;BOBk@jqI> zGpJ1}DD2K-f9|4Btx!hwgva0dm?_<2q+rU+(5v6|JvhzYv5pe;+C0OAKe+otnKPb z4gpiI4%Qg;xu$4g?Tx2L)w+k4kb9Nc?*v-NxrU5KX_dnr0eSWQu}CR*#qr+B;@Gf# ztNllXt0WYp4HRaU7jgY_G8ZV21@r0K}$mZ9pTIcA|?YJW&a+YO9rvHWc6 z&3${0X;#CTf;_V_G1y_cEc{ec{Gm0MFZAr1&pY1ir!MO$aSffvt>8K2xSMCpDLN7D z-ua_n!rZPzy`e*PwpI7=+@|(+g}!)pM2qhOW}k<)lQB{gJfw8OdJi~+x#g(3RRzC= u4;p{*t*g~Pe%#-$syln`hyC|geX{qKewVm@YH`_8y!_Z_qVi&(y8Zx1y$sF( diff --git a/star_lock/ios/Podfile.lock b/star_lock/ios/Podfile.lock index 9c90cf90..93e040b2 100644 --- a/star_lock/ios/Podfile.lock +++ b/star_lock/ios/Podfile.lock @@ -15,7 +15,7 @@ DEPENDENCIES: - Flutter (from `Flutter`) - flutter_native_contact_picker (from `.symlinks/plugins/flutter_native_contact_picker/ios`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/ios`) + - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) EXTERNAL SOURCES: device_info_plus: @@ -27,7 +27,7 @@ EXTERNAL SOURCES: package_info_plus: :path: ".symlinks/plugins/package_info_plus/ios" path_provider_foundation: - :path: ".symlinks/plugins/path_provider_foundation/ios" + :path: ".symlinks/plugins/path_provider_foundation/darwin" SPEC CHECKSUMS: device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed diff --git a/star_lock/ios/Runner.xcodeproj/project.pbxproj b/star_lock/ios/Runner.xcodeproj/project.pbxproj index 908be74a..e1f65647 100644 --- a/star_lock/ios/Runner.xcodeproj/project.pbxproj +++ b/star_lock/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -230,10 +230,12 @@ }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( @@ -244,6 +246,7 @@ }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); diff --git a/star_lock/lib/appRouters.dart b/star_lock/lib/appRouters.dart index f8bb22c6..c1d60edc 100644 --- a/star_lock/lib/appRouters.dart +++ b/star_lock/lib/appRouters.dart @@ -26,7 +26,7 @@ import 'main/lockDetail/lcokSet/diagnose/diagnose_page.dart'; import 'main/lockDetail/lcokSet/doorMagnetic/addDoorMagnetic/addDoorMagnetic_page.dart'; import 'main/lockDetail/lcokSet/doorMagnetic/doorMagneticList/doorMagnetic_page.dart'; import 'main/lockDetail/lcokSet/doorMagnetic/nearbyDoorMagnetic/nearbyDoorMagnetic_page.dart'; -import 'main/lockDetail/lcokSet/importOtherLockData/ImportOtherLockData_Page.dart'; +import 'main/lockDetail/lcokSet/importOtherLockData/ImportOtherLockData_page.dart'; import 'main/lockDetail/lcokSet/lockEscalation/lockEscalation_page.dart'; import 'main/lockDetail/lcokSet/lockSet/lockSet_page.dart'; import 'main/lockDetail/lcokSet/lockSoundSet/lockSoundSet_page.dart'; diff --git a/star_lock/lib/app_settings/app_settings.dart b/star_lock/lib/app_settings/app_settings.dart index c43555c5..473b0ed0 100644 --- a/star_lock/lib/app_settings/app_settings.dart +++ b/star_lock/lib/app_settings/app_settings.dart @@ -5,11 +5,11 @@ class AppLog { static bool _printLog = false; static bool _onlyError = false; - static showLog({@required bool printLog, bool onlyError}){ + static showLog({required bool printLog, bool? onlyError}){ _printLog = printLog ?? false; _onlyError = onlyError ?? false; } - static log(String msg,{bool error}){ + static log(String msg,{bool? error}){ if(!kDebugMode)return; error = error ?? false; if(!_printLog)return; diff --git a/star_lock/lib/app_settings/app_style.dart b/star_lock/lib/app_settings/app_style.dart index b76482e9..00b9f14f 100644 --- a/star_lock/lib/app_settings/app_style.dart +++ b/star_lock/lib/app_settings/app_style.dart @@ -17,7 +17,7 @@ class AppStyle { static Size get btnMinSize2 => Size(60.w, 44.h); static Size get btnMinSize3 => Size(60.w, 53.h); - static TextStyle textStyle({Color textColor,double fontSize,FontWeight fontWeight}) => TextStyle( + static TextStyle textStyle({Color? textColor, double? fontSize,FontWeight? fontWeight}) => TextStyle( fontSize: fontSize ?? 18.sp, color: textColor ?? AppColors.buttonEnableTextColor, fontWeight: fontWeight ?? FontWeight.normal, @@ -111,22 +111,22 @@ class AppStyle { }) ); - static ButtonStyle clearTextButtonStyle({Color textColor,Color bgColor,double fontSize,FontWeight fontWeight}) => ButtonStyle( + static ButtonStyle clearTextButtonStyle({Color? textColor, Color? bgColor, double? fontSize, FontWeight? fontWeight}) => ButtonStyle( minimumSize: MaterialStateProperty.resolveWith((states) => btnMinSize), shape: MaterialStateProperty.resolveWith((states) => buttonShape_16), backgroundColor: MaterialStateProperty.resolveWith((states){ bgColor ??= AppColors.normalTextColor; - if(states.contains(MaterialState.disabled)) return bgColor.withOpacity(0.6); + if(states.contains(MaterialState.disabled)) return bgColor?.withOpacity(0.6); return bgColor; }), overlayColor: MaterialStateProperty.resolveWith((states){ textColor ??= AppColors.buttonEnableColor; - if(states.contains(MaterialState.pressed)) return textColor.withOpacity(0.1); - return textColor.withOpacity(0.1); + if(states.contains(MaterialState.pressed)) return textColor?.withOpacity(0.1); + return textColor?.withOpacity(0.1); }), foregroundColor: MaterialStateProperty.resolveWith((states){ textColor ??= AppColors.buttonEnableColor; - if(states.contains(MaterialState.disabled)) return textColor.withOpacity(0.4); + if(states.contains(MaterialState.disabled)) return textColor?.withOpacity(0.4); return textColor; }), textStyle: MaterialStateProperty.resolveWith((states){ @@ -190,8 +190,8 @@ class AppStyle { ); static TextStyle appTextStyle({ - Color textColor, - double fontSize, + Color? textColor, + double? fontSize, }) => AppStyle.textStyle( textColor: textColor, fontSize: fontSize, diff --git a/star_lock/lib/baseWidget.dart b/star_lock/lib/baseWidget.dart index 36640388..d5234263 100644 --- a/star_lock/lib/baseWidget.dart +++ b/star_lock/lib/baseWidget.dart @@ -37,7 +37,7 @@ mixin BaseWidget{ ), Padding( padding: const EdgeInsets.only(top: 10), - child: Text(TranslationLoader.lanKeys.noData.tr, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w600)), + child: Text(TranslationLoader.lanKeys!.noData!.tr, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w600)), ) ], ), diff --git a/star_lock/lib/login/forgetPassword/starLock_forgetPassword_page.dart b/star_lock/lib/login/forgetPassword/starLock_forgetPassword_page.dart index 798d0d0f..0b3b6635 100644 --- a/star_lock/lib/login/forgetPassword/starLock_forgetPassword_page.dart +++ b/star_lock/lib/login/forgetPassword/starLock_forgetPassword_page.dart @@ -15,7 +15,7 @@ import '../../tools/titleAppBar.dart'; import '../../translations/trans_lib.dart'; class StarLockForgetPasswordPage extends StatefulWidget { - const StarLockForgetPasswordPage({Key key}) : super(key: key); + const StarLockForgetPasswordPage({Key? key}) : super(key: key); @override State createState() => _StarLockForgetPasswordPageState(); @@ -26,7 +26,7 @@ class _StarLockForgetPasswordPageState extends State final TextEditingController _pwdController = TextEditingController(); final TextEditingController _codeController = TextEditingController(); - Timer _timer; + late Timer _timer; int _seconds = 60; @@ -35,7 +35,7 @@ class _StarLockForgetPasswordPageState extends State return Scaffold( resizeToAvoidBottomInset: false, backgroundColor: const Color(0xFFFFFFFF), - appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.reset.tr} ${TranslationLoader.lanKeys.password.tr}", haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.reset!.tr} ${TranslationLoader.lanKeys!.password!.tr}", haveBack:true, backgroundColor: AppColors.mainColor), body:ListView( padding: EdgeInsets.only( top: 40.h, @@ -43,22 +43,22 @@ class _StarLockForgetPasswordPageState extends State right: 40.w ), children: [ - LoginInput(controller: _phoneController, leftImg:'images/main/icon_main_search.png', hintText: TranslationLoader.lanKeys.pleaseEnterNumberOrEmail.tr, keyboardType: TextInputType.number,inputFormatters: [ + LoginInput(controller: _phoneController, leftImg:'images/main/icon_main_search.png', hintText: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, keyboardType: TextInputType.number,inputFormatters: [ FilteringTextInputFormatter.allow(RegExp('[0-9]')), LengthLimitingTextInputFormatter(20), ]), SizedBox(height: 10.w), - LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys.pleaseEnter.tr} ${TranslationLoader.lanKeys.password.tr}",inputFormatters: [ + LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.password!.tr}",inputFormatters: [ LengthLimitingTextInputFormatter(20), ]), SizedBox(height: 15.w), - Text(TranslationLoader.lanKeys.registerPasswordTip.tr, style: TextStyle(color: const Color(0xFF999999), fontSize: 26.sp),), + Text(TranslationLoader.lanKeys!.registerPasswordTip!.tr, style: TextStyle(color: const Color(0xFF999999), fontSize: 26.sp),), SizedBox(height: 10.w), - LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys.sure.tr} ${TranslationLoader.lanKeys.password.tr}",inputFormatters: [ + LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys!.sure!.tr} ${TranslationLoader.lanKeys!.password!.tr}",inputFormatters: [ LengthLimitingTextInputFormatter(20), ]), SizedBox(height: 10.w), - ForgetPwdInput(controller: _codeController,hintText: '${TranslationLoader.lanKeys.pleaseEnter.tr} ${TranslationLoader.lanKeys.verificationCode.tr}',keyboardType: TextInputType.number,inputFormatters: [ + ForgetPwdInput(controller: _codeController,hintText: '${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}',keyboardType: TextInputType.number,inputFormatters: [ FilteringTextInputFormatter.allow(RegExp('[0-9]')), LengthLimitingTextInputFormatter(6), ],rightSlot: Container( @@ -73,7 +73,7 @@ class _StarLockForgetPasswordPageState extends State borderRadius: BorderRadius.circular(5) ), child: Center( - child: Text(_seconds==60?'${TranslationLoader.lanKeys.getTip.tr} ${TranslationLoader.lanKeys.verificationCode.tr}': (_seconds<10)?'0$_seconds s':'$_seconds s', textAlign:TextAlign.center, style: TextStyle( + child: Text(_seconds==60?'${TranslationLoader.lanKeys!.getTip!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}': (_seconds<10)?'0$_seconds s':'$_seconds s', textAlign:TextAlign.center, style: TextStyle( color: Colors.white, fontSize: 26.sp, )), @@ -89,7 +89,7 @@ class _StarLockForgetPasswordPageState extends State ), )), SizedBox(height: 50.w), - SubmitBtn(btnName: "${TranslationLoader.lanKeys.reset.tr} ${TranslationLoader.lanKeys.password.tr}", fontSize: 30.sp, borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){ + SubmitBtn(btnName: "${TranslationLoader.lanKeys!.reset!.tr} ${TranslationLoader.lanKeys!.password!.tr}", fontSize: 30.sp, borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){ }), ], diff --git a/star_lock/lib/login/login/starLock_login_page.dart b/star_lock/lib/login/login/starLock_login_page.dart index 985af277..260985a0 100644 --- a/star_lock/lib/login/login/starLock_login_page.dart +++ b/star_lock/lib/login/login/starLock_login_page.dart @@ -12,7 +12,7 @@ import '../../tools/titleAppBar.dart'; import '../../translations/trans_lib.dart'; class StarLockLoginPage extends StatefulWidget { - const StarLockLoginPage({Key key}) : super(key: key); + const StarLockLoginPage({Key? key}) : super(key: key); @override State createState() => _StarLockLoginPageState(); @@ -27,9 +27,9 @@ class _StarLockLoginPageState extends State { return Scaffold( resizeToAvoidBottomInset: false, backgroundColor: const Color(0xFFFFFFFF), - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.login.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.login!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ TextButton( - child: Text(TranslationLoader.lanKeys.register.tr, style: TextStyle(color: Colors.white),), + child: Text(TranslationLoader.lanKeys!.register!.tr, style: const TextStyle(color: Colors.white),), onPressed: (){ Navigator.pushNamed(context, Routers.starLockRegisterPage); },), @@ -48,12 +48,12 @@ class _StarLockLoginPageState extends State { ) ), SizedBox(height: 50.w), - LoginInput(controller: _phoneController, leftImg:'images/main/icon_main_search.png', hintText: TranslationLoader.lanKeys.pleaseEnterNumberOrEmail.tr, keyboardType: TextInputType.number,inputFormatters: [ + LoginInput(controller: _phoneController, leftImg:'images/main/icon_main_search.png', hintText: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, keyboardType: TextInputType.number,inputFormatters: [ FilteringTextInputFormatter.allow(RegExp('[0-9]')), LengthLimitingTextInputFormatter(20), ]), SizedBox(height: 50.w), - LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys.pleaseEnter.tr} ${TranslationLoader.lanKeys.password.tr}",inputFormatters: [ + LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.password!.tr}",inputFormatters: [ LengthLimitingTextInputFormatter(20), ]), SizedBox(height: 20.h), @@ -71,7 +71,7 @@ class _StarLockLoginPageState extends State { Flexible( child: RichText( text: TextSpan( - text: TranslationLoader.lanKeys.readAndAgree.tr, + text: TranslationLoader.lanKeys!.readAndAgree!.tr, style: TextStyle( color: const Color(0xff333333), fontSize: 26.sp @@ -80,7 +80,7 @@ class _StarLockLoginPageState extends State { WidgetSpan( alignment: PlaceholderAlignment.middle, child: GestureDetector( - child: Text('《${TranslationLoader.lanKeys.userAgreement.tr}》',style: TextStyle( + child: Text('《${TranslationLoader.lanKeys!.userAgreement!.tr}》',style: TextStyle( color: AppColors.mainColor, fontSize: 26.sp )), @@ -92,7 +92,7 @@ class _StarLockLoginPageState extends State { WidgetSpan( alignment: PlaceholderAlignment.middle, child: GestureDetector( - child: Text('《${TranslationLoader.lanKeys.privacyPolicy.tr}》',style: TextStyle( + child: Text('《${TranslationLoader.lanKeys!.privacyPolicy!.tr}》',style: TextStyle( color: AppColors.mainColor, fontSize: 26.sp )), @@ -108,7 +108,7 @@ class _StarLockLoginPageState extends State { ], ), SizedBox(height: 50.w), - SubmitBtn(btnName: TranslationLoader.lanKeys.login.tr, fontSize: 28.sp, borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){ + SubmitBtn(btnName: TranslationLoader.lanKeys!.login!.tr, fontSize: 28.sp, borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){ }), SizedBox(height: 50.w), @@ -121,7 +121,7 @@ class _StarLockLoginPageState extends State { height: 50.h, // color: Colors.red, child: Center( - child: Text('${TranslationLoader.lanKeys.forgetPassword.tr}?',style: TextStyle(fontSize: 24.sp)), + child: Text('${TranslationLoader.lanKeys!.forgetPassword!.tr}?',style: TextStyle(fontSize: 24.sp)), ), ), onTap: (){ diff --git a/star_lock/lib/login/register/starLock_register_page.dart b/star_lock/lib/login/register/starLock_register_page.dart index 572c19a4..deb33226 100644 --- a/star_lock/lib/login/register/starLock_register_page.dart +++ b/star_lock/lib/login/register/starLock_register_page.dart @@ -15,7 +15,7 @@ import '../../tools/titleAppBar.dart'; import '../../translations/trans_lib.dart'; class StarLockRegisterPage extends StatefulWidget { - const StarLockRegisterPage({Key key}) : super(key: key); + const StarLockRegisterPage({Key? key}) : super(key: key); @override State createState() => _StarLockRegisterPageState(); @@ -26,7 +26,7 @@ class _StarLockRegisterPageState extends State { final TextEditingController _pwdController = TextEditingController(); final TextEditingController _codeController = TextEditingController(); - Timer _timer; + late Timer _timer; int _seconds = 60; @@ -35,7 +35,7 @@ class _StarLockRegisterPageState extends State { return Scaffold( resizeToAvoidBottomInset: false, backgroundColor: const Color(0xFFFFFFFF), - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.register.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.register!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body:ListView( padding: EdgeInsets.only( top: 40.h, @@ -45,7 +45,7 @@ class _StarLockRegisterPageState extends State { children: [ topSeletCountryAndRegionWidget (), middleTFWidget (), - SubmitBtn(btnName: "${TranslationLoader.lanKeys.reset.tr} ${TranslationLoader.lanKeys.password.tr}", fontSize: 30.sp, borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){ + SubmitBtn(btnName: "${TranslationLoader.lanKeys!.reset!.tr} ${TranslationLoader.lanKeys!.password!.tr}", fontSize: 30.sp, borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){ }), ], @@ -93,7 +93,7 @@ class _StarLockRegisterPageState extends State { bottom: BorderSide(width: 1.0, color: Color(0xffC0C0C0)), ) ), - child: Center(child: Text(TranslationLoader.lanKeys.iphone.tr, style: TextStyle(color: Colors.white),)) + child: Center(child: Text(TranslationLoader.lanKeys!.iphone!.tr, style: TextStyle(color: Colors.white),)) ), ), Expanded( @@ -113,7 +113,7 @@ class _StarLockRegisterPageState extends State { // bottom: BorderSide(width: 1.0, color: Color(0xffC0C0C0)), // ) // ), - child: Center(child: Text(TranslationLoader.lanKeys.email.tr, style: const TextStyle(color: Colors.black),)) + child: Center(child: Text(TranslationLoader.lanKeys!.email!.tr, style: const TextStyle(color: Colors.black),)) ), ), ), @@ -135,7 +135,7 @@ class _StarLockRegisterPageState extends State { child: Row( children: [ SizedBox(width:5.w), - Expanded(child: Text(TranslationLoader.lanKeys.countryAndRegion.tr, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w500))), + Expanded(child: Text(TranslationLoader.lanKeys!.countryAndRegion!.tr, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w500))), SizedBox(width:20.w), Row( mainAxisAlignment: MainAxisAlignment.end, @@ -157,22 +157,22 @@ class _StarLockRegisterPageState extends State { Widget middleTFWidget (){ return Column( children: [ - LoginInput(controller: _phoneController, leftImg:'images/main/icon_main_search.png', hintText: TranslationLoader.lanKeys.pleaseEnterNumberOrEmail.tr, keyboardType: TextInputType.number,inputFormatters: [ + LoginInput(controller: _phoneController, leftImg:'images/main/icon_main_search.png', hintText: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, keyboardType: TextInputType.number,inputFormatters: [ FilteringTextInputFormatter.allow(RegExp('[0-9]')), LengthLimitingTextInputFormatter(20), ]), SizedBox(height: 10.w), - LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys.pleaseEnter.tr} ${TranslationLoader.lanKeys.password.tr}",inputFormatters: [ + LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.password!.tr}",inputFormatters: [ LengthLimitingTextInputFormatter(20), ]), SizedBox(height: 15.w), - Text(TranslationLoader.lanKeys.registerPasswordTip.tr, style: TextStyle(color: const Color(0xFF999999), fontSize: 26.sp),), + Text(TranslationLoader.lanKeys!.registerPasswordTip!.tr, style: TextStyle(color: const Color(0xFF999999), fontSize: 26.sp),), SizedBox(height: 10.w), - LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys.sure.tr} ${TranslationLoader.lanKeys.password.tr}",inputFormatters: [ + LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys!.sure!.tr} ${TranslationLoader.lanKeys!.password!.tr}",inputFormatters: [ LengthLimitingTextInputFormatter(20), ]), SizedBox(height: 10.w), - ForgetPwdInput(controller: _codeController,hintText: '${TranslationLoader.lanKeys.pleaseEnter.tr} ${TranslationLoader.lanKeys.verificationCode.tr}',keyboardType: TextInputType.number,inputFormatters: [ + ForgetPwdInput(controller: _codeController,hintText: '${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}',keyboardType: TextInputType.number,inputFormatters: [ FilteringTextInputFormatter.allow(RegExp('[0-9]')), LengthLimitingTextInputFormatter(6), ],rightSlot: Container( @@ -187,7 +187,7 @@ class _StarLockRegisterPageState extends State { borderRadius: BorderRadius.circular(5) ), child: Center( - child: Text(_seconds==60?'${TranslationLoader.lanKeys.getTip.tr} ${TranslationLoader.lanKeys.verificationCode.tr}': (_seconds<10)?'0$_seconds s':'$_seconds s',textAlign:TextAlign.center, style: TextStyle( + child: Text(_seconds==60?'${TranslationLoader.lanKeys!.getTip!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}': (_seconds<10)?'0$_seconds s':'$_seconds s',textAlign:TextAlign.center, style: TextStyle( color: Colors.white, fontSize: 26.sp )), diff --git a/star_lock/lib/login/seletCountryRegion/seletCountryRegion_page.dart b/star_lock/lib/login/seletCountryRegion/seletCountryRegion_page.dart index 0054b485..fe26f120 100644 --- a/star_lock/lib/login/seletCountryRegion/seletCountryRegion_page.dart +++ b/star_lock/lib/login/seletCountryRegion/seletCountryRegion_page.dart @@ -7,7 +7,7 @@ import '../../tools/titleAppBar.dart'; import '../../translations/trans_lib.dart'; class SeletCountryRegionPage extends StatefulWidget { - const SeletCountryRegionPage({Key key}) : super(key: key); + const SeletCountryRegionPage({Key? key}) : super(key: key); @override State createState() => _SeletCountryRegionPageState(); @@ -19,7 +19,7 @@ class _SeletCountryRegionPageState extends State { return Scaffold( resizeToAvoidBottomInset: false, backgroundColor: const Color(0xFFFFFFFF), - appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.selet.tr} ${TranslationLoader.lanKeys.countryAndRegion.tr}", haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.selet!.tr} ${TranslationLoader.lanKeys!.countryAndRegion!.tr}", haveBack:true, backgroundColor: AppColors.mainColor), body:ListView( padding: EdgeInsets.only(top: 40.h, left: 40.w, right: 40.w), children: [ diff --git a/star_lock/lib/main.dart b/star_lock/lib/main.dart index b0f37178..5e81342f 100644 --- a/star_lock/lib/main.dart +++ b/star_lock/lib/main.dart @@ -23,7 +23,7 @@ void main() async { } class MyApp extends StatefulWidget { - const MyApp({GlobalKey key}):super(key: key); + const MyApp({GlobalKey? key}):super(key: key); @override State createState() => _MyAppState(); @@ -49,7 +49,7 @@ class _MyAppState extends State with WidgetsBindingObserver, BaseWidget { ], localeResolutionCallback: (locale,supportedLocales){ if(!supportedLocales.contains(locale)) { - int idx = appSupportedLocales.indexWhere((element) => element.languageCode == locale.languageCode); + int idx = appSupportedLocales.indexWhere((element) => element.languageCode == locale!.languageCode); if(idx != -1) { locale = appSupportedLocales[idx]; }else { @@ -57,7 +57,7 @@ class _MyAppState extends State with WidgetsBindingObserver, BaseWidget { } } // print("localelocalelocalelocalelocale locale:${locale} locale.languageCode:${locale.languageCode} locale.countryCode:${locale.countryCode} supportedLocales:${supportedLocales}"); - AppManager().setLanCode(code: '${locale.languageCode}_${locale.countryCode}'); + AppManager().setLanCode(code: '${locale!.languageCode}_${locale.countryCode}'); return locale; }, // locale: StoreService.to.getLanguageCode().isNotEmpty ? appDept.deptSupportedLocales.where((element) => element.languageCode == StoreService.to.getLanguageCode()).first : Get.deviceLocale, diff --git a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdminManage/authorizedAdminManage_page.dart b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdminManage/authorizedAdminManage_page.dart index 5d46c307..9ccf59bc 100644 --- a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdminManage/authorizedAdminManage_page.dart +++ b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdminManage/authorizedAdminManage_page.dart @@ -8,7 +8,7 @@ import '../../../../../translations/trans_lib.dart'; import 'authorizedAdminManage_tabbar.dart'; class AuthorizedAdminManagePage extends StatefulWidget { - const AuthorizedAdminManagePage({Key key}) : super(key: key); + const AuthorizedAdminManagePage({Key? key}) : super(key: key); @override State createState() => _AuthorizedAdminManagePageState(); @@ -21,7 +21,7 @@ class _AuthorizedAdminManagePageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.authorizedAdmin.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.authorizedAdmin!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body: Column( children: [ AuthorizedAdminManageTabbar(initialIndex: index,), diff --git a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdminManage/authorizedAdminManage_tabbar.dart b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdminManage/authorizedAdminManage_tabbar.dart index 08394bd9..5e007536 100644 --- a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdminManage/authorizedAdminManage_tabbar.dart +++ b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdminManage/authorizedAdminManage_tabbar.dart @@ -11,18 +11,18 @@ import '../authorizedAdmin_page.dart'; class AuthorizedAdminManageTabbar extends StatefulWidget { var initialIndex=1; - AuthorizedAdminManageTabbar({Key key, @required this.initialIndex}) : super(key: key); + AuthorizedAdminManageTabbar({Key? key, required this.initialIndex}) : super(key: key); @override State createState() => _AuthorizedAdminManageTabbarState(); } class _AuthorizedAdminManageTabbarState extends State with SingleTickerProviderStateMixin { - TabController _tabController; + late TabController _tabController; final List _itemTabs= [ - ItemView(title: TranslationLoader.lanKeys.timeLimit.tr, type: "0"), - ItemView(title: TranslationLoader.lanKeys.permanent.tr, type: "1"), + ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: "0"), + ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: "1"), ]; @override @@ -82,7 +82,7 @@ class _AuthorizedAdminManageTabbarState extends State createState() => _AuthorizedAdminPageState(); @@ -19,7 +19,7 @@ class AuthorizedAdminPage extends StatefulWidget { class _AuthorizedAdminPageState extends State { final FlutterContactPicker _contactPicker = FlutterContactPicker(); - Contact _contact; + late Contact _contact; @override Widget build(BuildContext context) { @@ -44,25 +44,19 @@ class _AuthorizedAdminPageState extends State { keyInfoWidget(), keyTimeWidget(), keyRealNameWidget(), - keyBottomWidget(TranslationLoader.lanKeys.authorizedAdminTip.tr) + keyBottomWidget(TranslationLoader.lanKeys!.authorizedAdminTip!.tr) ], ); } - break; - case 1: - { - // 永久 - return Column( - children: [ - keyInfoWidget(), - keyRealNameWidget(), - keyBottomWidget(TranslationLoader.lanKeys.authorizedAdminTip.tr) - ], - ); - } - break; default: - break; + // 永久 + return Column( + children: [ + keyInfoWidget(), + keyRealNameWidget(), + keyBottomWidget(TranslationLoader.lanKeys!.authorizedAdminTip!.tr) + ], + ); } } @@ -71,8 +65,8 @@ class _AuthorizedAdminPageState extends State { return Column( children: [ Container(height: 10.h), - CommonItem(leftTitel:TranslationLoader.lanKeys.receiver.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(true, TranslationLoader.lanKeys.pleaseEnterNumberOrEmail.tr)), - CommonItem(leftTitel:TranslationLoader.lanKeys.name.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: getTFWidget(false, TranslationLoader.lanKeys.pleaseEnter.tr)), + CommonItem(leftTitel:TranslationLoader.lanKeys!.receiver!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(true, TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr)), + CommonItem(leftTitel:TranslationLoader.lanKeys!.name!.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: getTFWidget(false, TranslationLoader.lanKeys!.pleaseEnter!.tr)), Container(height: 10.h), ], ); @@ -82,10 +76,10 @@ class _AuthorizedAdminPageState extends State { Widget keyTimeWidget(){ return Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true, isHaveDirection: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true, isHaveDirection: true, action:(){ // _showDatePicker(); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.failureTime.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, action:(){ // _showDatePicker(); }), Container(height: 10.h), @@ -97,7 +91,7 @@ class _AuthorizedAdminPageState extends State { Widget keyRealNameWidget(){ return Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.realNameAuthentication.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch()), action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.realNameAuthentication!.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch()), action:(){ }), Container(height: 10.h), @@ -117,7 +111,7 @@ class _AuthorizedAdminPageState extends State { ], ), ), - SubmitBtn(btnName: TranslationLoader.lanKeys.sender.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), + SubmitBtn(btnName: TranslationLoader.lanKeys!.sender!.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){ } @@ -130,7 +124,7 @@ class _AuthorizedAdminPageState extends State { children: [ TextButton(onPressed: (){ Navigator.pushNamed(context, Routers.volumeAuthorizationLockManagePage); - }, child: Text(TranslationLoader.lanKeys.volumeAuthorizationLock.tr, style: TextStyle(color: AppColors.mainColor, fontWeight: FontWeight.w500),)), + }, child: Text(TranslationLoader.lanKeys!.volumeAuthorizationLock!.tr, style: TextStyle(color: AppColors.mainColor, fontWeight: FontWeight.w500),)), ], ), ), @@ -214,9 +208,9 @@ class _AuthorizedAdminPageState extends State { alignment: Alignment.center, child: InkWell( onTap: () async { - Contact contact = await _contactPicker.selectContact(); + Contact? contact = await _contactPicker.selectContact(); setState(() { - _contact = contact; + _contact = contact!; // print("object111111111111 ${_contact.fullName} ${_contact.phoneNumbers}"); }); }, diff --git a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdminDetail/authorizedAdminDetail_page.dart b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdminDetail/authorizedAdminDetail_page.dart index bb170c8f..4fa80c62 100644 --- a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdminDetail/authorizedAdminDetail_page.dart +++ b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdminDetail/authorizedAdminDetail_page.dart @@ -12,7 +12,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class AuthorizedAdminDetailPage extends StatefulWidget { - const AuthorizedAdminDetailPage({Key key}) : super(key: key); + const AuthorizedAdminDetailPage({Key? key}) : super(key: key); @override State createState() => _AuthorizedAdminDetailPageState(); @@ -23,38 +23,38 @@ class _AuthorizedAdminDetailPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.authorizedAdmin.tr}${TranslationLoader.lanKeys.detail.tr}", haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ + appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.authorizedAdmin!.tr}${TranslationLoader.lanKeys!.detail!.tr}", haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ TextButton( - child: Text(TranslationLoader.lanKeys.share.tr, style: TextStyle(color: Colors.white),), + child: Text(TranslationLoader.lanKeys!.share!.tr, style: TextStyle(color: Colors.white),), onPressed: (){ },), ],), body: Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.password.tr, rightTitle:"98765432", isHaveDirection: true, isHaveLine: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.password!.tr, rightTitle:"98765432", isHaveDirection: true, isHaveLine: true, action:(){ showCupertinoAlertDialog(context); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.name.tr, rightTitle:"你好", isHaveDirection: true, isHaveLine: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.name!.tr, rightTitle:"你好", isHaveDirection: true, isHaveLine: true, action:(){ showCupertinoAlertDialog(context); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"永久", isHaveDirection: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"永久", isHaveDirection: true, action:(){ Navigator.pushNamed(context, Routers.electronicKeyDetailChangeDate); }), Container(height: 10.h), - CommonItem(leftTitel:TranslationLoader.lanKeys.sender.tr, rightTitle:"15080825640", action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.sender!.tr, rightTitle:"15080825640", action:(){ }), - CommonItem(leftTitel:TranslationLoader.lanKeys.senderTime.tr, rightTitle:"2020.06.21 11:49", action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.senderTime!.tr, rightTitle:"2020.06.21 11:49", action:(){ }), Container(height: 10.h), - CommonItem(leftTitel:TranslationLoader.lanKeys.operatingRecord.tr, rightTitle:"", isHaveDirection: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.operatingRecord!.tr, rightTitle:"", isHaveDirection: true, action:(){ }), Container(height: 40.h), SubmitBtn( - btnName: TranslationLoader.lanKeys.delete.tr, + btnName: TranslationLoader.lanKeys!.delete!.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), @@ -67,7 +67,7 @@ class _AuthorizedAdminDetailPageState extends State { ); } - Widget commonItem(String leftTitle, String rightTitle, {bool isHaveDirection = false, bool isHaveLine = false, bool isHaveRightWidget = false, Widget rightWidget,Function action}){ + Widget commonItem(String leftTitle, String rightTitle, {bool isHaveDirection = false, bool isHaveLine = false, bool isHaveRightWidget = false, Widget? rightWidget, Function()? action}){ return GestureDetector( onTap: action, child: Column( @@ -86,7 +86,7 @@ class _AuthorizedAdminDetailPageState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.end, children: [ - isHaveRightWidget?rightWidget:Text(rightTitle, textAlign: TextAlign.end,style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),) + isHaveRightWidget?rightWidget!:Text(rightTitle, textAlign: TextAlign.end,style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),) ], ), ), diff --git a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdminList/authorizedAdminList_page.dart b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdminList/authorizedAdminList_page.dart index 5f9c7f97..19b2d66f 100644 --- a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdminList/authorizedAdminList_page.dart +++ b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdminList/authorizedAdminList_page.dart @@ -10,7 +10,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class AuthorizedAdminListPage extends StatefulWidget { - const AuthorizedAdminListPage({Key key}) : super(key: key); + const AuthorizedAdminListPage({Key? key}) : super(key: key); @override State createState() => _AuthorizedAdminListPageState(); @@ -21,9 +21,9 @@ class _AuthorizedAdminListPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.authorizedAdmin.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.authorizedAdmin!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ TextButton( - child: Text(TranslationLoader.lanKeys.reset.tr, style: TextStyle(color: Colors.white),), + child: Text(TranslationLoader.lanKeys!.reset!.tr, style: const TextStyle(color: Colors.white),), onPressed: (){ },), @@ -33,7 +33,7 @@ class _AuthorizedAdminListPageState extends State { _searchWidget(), Expanded(child: _buildMainUI()), SubmitBtn( - btnName: TranslationLoader.lanKeys.authorizedAdmin.tr, + btnName: TranslationLoader.lanKeys!.authorizedAdmin!.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), @@ -62,7 +62,7 @@ class _AuthorizedAdminListPageState extends State { //输入里面输入文字内边距设置 contentPadding: const EdgeInsets.only( top: 12.0, left: -19.0, right: -15.0, bottom: 8.0), - hintText: TranslationLoader.lanKeys.pleaseEnter.tr, + hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr, //不需要输入框下划线 border: InputBorder.none, //左边图标设置 @@ -86,7 +86,7 @@ class _AuthorizedAdminListPageState extends State { ); } - Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function action){ + Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function() action){ return GestureDetector( onTap: action, child: Container( diff --git a/star_lock/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLockManage/volumeAuthorizationLockManage_page.dart b/star_lock/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLockManage/volumeAuthorizationLockManage_page.dart index 625033a0..45dea31a 100644 --- a/star_lock/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLockManage/volumeAuthorizationLockManage_page.dart +++ b/star_lock/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLockManage/volumeAuthorizationLockManage_page.dart @@ -7,7 +7,7 @@ import '../../../../../tools/titleAppBar.dart'; import '../../../../../translations/trans_lib.dart'; class VolumeAuthorizationLockManagePage extends StatefulWidget { - const VolumeAuthorizationLockManagePage({Key key}):super(key:key); + const VolumeAuthorizationLockManagePage({Key? key}):super(key:key); @override State createState() => _VolumeAuthorizationLockManagePageState(); @@ -20,7 +20,7 @@ class _VolumeAuthorizationLockManagePageState extends State createState() => _VolumeAuthorizationLockManageTabbarState(); } class _VolumeAuthorizationLockManageTabbarState extends State with SingleTickerProviderStateMixin { - TabController _tabController; + late TabController _tabController; final List _itemTabs= [ - ItemView(title: TranslationLoader.lanKeys.permanent.tr, type: "0"), - ItemView(title: TranslationLoader.lanKeys.timeLimit.tr, type: "1"), + ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: "0"), + ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: "1"), ]; @override @@ -81,7 +81,7 @@ class _VolumeAuthorizationLockManageTabbarState extends State createState() => _VolumeAuthorizationLockPageState(); @@ -20,7 +20,7 @@ class VolumeAuthorizationLockPage extends StatefulWidget { class _VolumeAuthorizationLockPageState extends State { final FlutterContactPicker _contactPicker = FlutterContactPicker(); - Contact _contact; + late Contact _contact; @override Widget build(BuildContext context) { @@ -47,21 +47,16 @@ class _VolumeAuthorizationLockPageState extends State createState() => _CheckingInAddHolidaysPageState(); @@ -22,11 +22,11 @@ class _CheckingInAddHolidaysPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle:TranslationLoader.lanKeys.addedHoliday.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle:TranslationLoader.lanKeys!.addedHoliday!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body: Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.name.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget("(${TranslationLoader.lanKeys.mustFillIn.tr})")), - CommonItem(leftTitel:TranslationLoader.lanKeys.startDate.tr, rightTitle:"(${TranslationLoader.lanKeys.mustFillIn.tr})", isHaveLine: true, isHaveDirection: false, action: () async { + CommonItem(leftTitel:TranslationLoader.lanKeys!.name!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget("(${TranslationLoader.lanKeys!.mustFillIn!.tr})")), + CommonItem(leftTitel:TranslationLoader.lanKeys!.startDate!.tr, rightTitle:"(${TranslationLoader.lanKeys!.mustFillIn!.tr})", isHaveLine: true, isHaveDirection: false, action: () async { await showDialog(context: context, builder: (context) { return ShowCalendar(datePickerMode: DatePickerMode.day, seletAction: (dateTime){ @@ -35,7 +35,7 @@ class _CheckingInAddHolidaysPageState extends State { }); }); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.endDate.tr, rightTitle:"(${TranslationLoader.lanKeys.mustFillIn.tr})", isHaveLine: true, isHaveDirection: false, action: () async { + CommonItem(leftTitel:TranslationLoader.lanKeys!.endDate!.tr, rightTitle:"(${TranslationLoader.lanKeys!.mustFillIn!.tr})", isHaveLine: true, isHaveDirection: false, action: () async { await showDialog(context: context, builder: (context) { return ShowCalendar(datePickerMode: DatePickerMode.day, seletAction: (dateTime){ @@ -43,7 +43,7 @@ class _CheckingInAddHolidaysPageState extends State { }); }); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.coverDate.tr, rightTitle:"", isHaveLine: false, isHaveDirection: false, action: () async { + CommonItem(leftTitel:TranslationLoader.lanKeys!.coverDate!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: false, action: () async { await showDialog(context: context, builder: (context) { return ShowCalendar(datePickerMode: DatePickerMode.day, seletAction: (dateTime){ @@ -52,7 +52,7 @@ class _CheckingInAddHolidaysPageState extends State { }); }), SizedBox(height: 50.w,), - SubmitBtn(btnName: TranslationLoader.lanKeys.sure.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), + SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){ } diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInDetail/checkingInDetail_page.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInDetail/checkingInDetail_page.dart index 0c427c2b..af85fa6e 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInDetail/checkingInDetail_page.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInDetail/checkingInDetail_page.dart @@ -7,7 +7,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class CheckingInDetailPage extends StatefulWidget { - const CheckingInDetailPage({Key key}) : super(key: key); + const CheckingInDetailPage({Key? key}) : super(key: key); @override _CheckingInDetailPageState createState() => _CheckingInDetailPageState(); @@ -114,8 +114,8 @@ class _CheckingInDetailPageState extends State { child: Container( // margin: EdgeInsets.only(left: 20.w), child: Image( - width: 30.w, - height: 30.w, + width: 40.w, + height: 40.w, image: const AssetImage("images/icon_left_black.png"), ), ), @@ -130,8 +130,8 @@ class _CheckingInDetailPageState extends State { child: Container( // margin: EdgeInsets.only(right: 20.sp), child: Image( - width: 30.w, - height: 30.h, + width: 40.w, + height: 40.h, image: const AssetImage("images/icon_right_black.png"), ), ), @@ -143,7 +143,14 @@ class _CheckingInDetailPageState extends State { //中部周 Widget _weekHeader() { - var array = ["一", "二", "三", "四", "五", "六", "日"]; + var array = [ + TranslationLoader.lanKeys!.mondayShort!.tr, + TranslationLoader.lanKeys!.tuesdayShort!.tr, + TranslationLoader.lanKeys!.wednesdayShort!.tr, + TranslationLoader.lanKeys!.thursdayShort!.tr, + TranslationLoader.lanKeys!.fridayShort!.tr, + TranslationLoader.lanKeys!.saturdayShort!.tr, + TranslationLoader.lanKeys!.sundayShort!.tr]; return Container( height: 50.h, child: GridView.builder( @@ -202,7 +209,7 @@ class _CheckingInDetailPageState extends State { for (int i = 0; i < _datas.length; i++) { if (i == index) { //切换至选中的日期 - _day = _datas[i].day; + _day = _datas[i].day!; _datas[i].isSelect = true; //加载选中的日期事件 @@ -224,7 +231,7 @@ class _CheckingInDetailPageState extends State { width: 40.w, height: 40.w, //设置底部背景 - decoration: _datas[index].isSelect + decoration: _datas[index].isSelect! ? const BoxDecoration( color: Color(0xFF2C91F6), shape: BoxShape.circle, @@ -238,7 +245,7 @@ class _CheckingInDetailPageState extends State { : "", textAlign: TextAlign.center, //设置选中字体颜色,以及周末和工作日颜色 - style: _datas[index].isSelect + style: _datas[index].isSelect! ? TextStyle( fontSize: 32.sp, color: const Color(0xFFFFFFFF)) : (index % 7 == 5 || index % 7 == 6 @@ -325,7 +332,7 @@ class _CheckingInDetailPageState extends State { } // 获取行数 - int _getRowsForMonthYear({int year, int month}) { + int _getRowsForMonthYear({int? year, int? month}) { //当前月天数 var currentMonthDays = _getCurrentMonthDays(year: year, month: month); // @@ -341,15 +348,15 @@ class _CheckingInDetailPageState extends State { } // 得到这个月的第一天是星期几 - int _getPlaceholderDays({int year, int month}) { - return DateTime(year, month).weekday - 1 % 7; + int _getPlaceholderDays({int? year, int? month}) { + return DateTime(year!, month!).weekday - 1 % 7; } // 获取当前月份天数 - int _getCurrentMonthDays({int year, int month}) { + int _getCurrentMonthDays({int? year, int? month}) { if (month == 2) { //判断2月份是闰年月还是平年 - if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) { + if (((year! % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) { return 29; } else { return 28; @@ -368,12 +375,12 @@ class _CheckingInDetailPageState extends State { } /// 获取展示信息 - _setDatas({int year, int month}) { + _setDatas({int? year, int? month}) { /// 上个月占位 var lastYear = year; - var lastMonth = month - 1; + var lastMonth = month! - 1; if (month == 1) { - lastYear = year - 1; + lastYear = (year! - 1)!; lastMonth = 12; } @@ -413,7 +420,7 @@ class _CheckingInDetailPageState extends State { var nextYear = year; var nextMonth = month + 1; if (month == 12) { - nextYear = year + 1; + nextYear = (year! + 1)!; nextMonth = 1; } var nextPlaceholderDays = @@ -489,11 +496,11 @@ class _CheckingInDetailPageState extends State { //日历bean class CalendarModel { - int year; - int month; - int day; - String workType = "";//日期事件,0,休息,1,异常,2,正常 - bool isSelect = false; + int? year; + int? month; + int? day; + String? workType = "";//日期事件,0,休息,1,异常,2,正常 + bool? isSelect = false; CalendarModel( {this.year, this.month, this.day, this.isSelect, this.workType}); diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart index 964bda7e..e7a5bac7 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart @@ -11,7 +11,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class CheckingInListPage extends StatefulWidget { - const CheckingInListPage({Key key}) : super(key: key); + const CheckingInListPage({Key? key}) : super(key: key); @override State createState() => _CheckingInListPageState(); @@ -53,7 +53,7 @@ class _CheckingInListPageState extends State { SizedBox(height: 30.h,), Image.asset('images/main/icon_checkInRankingListTop.png', width: 145.w, height: 145.w), SizedBox(height: 10.h,), - Text(TranslationLoader.lanKeys.noAttendanceRecord.tr, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500)), + Text(TranslationLoader.lanKeys!.noAttendanceRecord!.tr, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500)), SizedBox(height: 30.h,), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -69,7 +69,7 @@ class _CheckingInListPageState extends State { child: Column( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - Text(TranslationLoader.lanKeys.dailyCharts.tr, style: TextStyle(color: AppColors.mainColor)), + Text(TranslationLoader.lanKeys!.dailyCharts!.tr, style: TextStyle(color: AppColors.mainColor)), Container(width: 20.w, height: 2.h, color: AppColors.mainColor) ], ), @@ -82,7 +82,7 @@ class _CheckingInListPageState extends State { child: Column( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - Text(TranslationLoader.lanKeys.monthlyLeaderboard.tr, style: TextStyle(color: Colors.black)), + Text(TranslationLoader.lanKeys!.monthlyLeaderboard!.tr, style: const TextStyle(color: Colors.black)), Container(width: 20.w, height: 2.h, color: Colors.black) ], ), @@ -132,8 +132,8 @@ class _CheckingInListPageState extends State { mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ SizedBox(height: 5.h,), - Text("0", style: TextStyle(color: Colors.black)), - Text(TranslationLoader.lanKeys.beLate.tr, style: TextStyle(color: Colors.black)), + const Text("0", style: TextStyle(color: Colors.black)), + Text(TranslationLoader.lanKeys!.beLate!.tr, style: const TextStyle(color: Colors.black)), SizedBox(height: 5.h,), ], ), @@ -147,7 +147,7 @@ class _CheckingInListPageState extends State { children: [ SizedBox(height: 5.h,), Text("0", style: TextStyle(color: Colors.black)), - Text(TranslationLoader.lanKeys.leaveEarly.tr, style: TextStyle(color: Colors.black)), + Text(TranslationLoader.lanKeys!.leaveEarly!.tr, style: const TextStyle(color: Colors.black)), SizedBox(height: 5.h,), ], ), @@ -161,7 +161,7 @@ class _CheckingInListPageState extends State { children: [ SizedBox(height: 5.h,), Text("0", style: TextStyle(color: Colors.black)), - Text(TranslationLoader.lanKeys.noCardPunched.tr, style: TextStyle(color: Colors.black)), + Text(TranslationLoader.lanKeys!.noCardPunched!.tr, style: const TextStyle(color: Colors.black)), SizedBox(height: 5.h,), ], ), @@ -186,7 +186,7 @@ class _CheckingInListPageState extends State { ); } - Widget _checkingInListItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function action){ + Widget _checkingInListItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function() action){ return GestureDetector( onTap: action, child: Container( @@ -232,7 +232,7 @@ class _CheckingInListPageState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Text(TranslationLoader.lanKeys.earlyArrivalList.tr, style: const TextStyle(color: Colors.white),), + Text(TranslationLoader.lanKeys!.earlyArrivalList!.tr, style: const TextStyle(color: Colors.white),), SizedBox(width: 5.w,), Image.asset('images/main/icon_lockDetail_checkIn_topTitle.png', width: 30.w, height: 16.w,) ], @@ -240,16 +240,16 @@ class _CheckingInListPageState extends State { ); } - Widget showListType(){ - var list = [TranslationLoader.lanKeys.earlyArrivalList.tr, TranslationLoader.lanKeys.lateList.tr, TranslationLoader.lanKeys.hardWorkingList.tr]; + void showListType(){ + var list = [TranslationLoader.lanKeys!.earlyArrivalList!.tr, TranslationLoader.lanKeys!.lateList!.tr, TranslationLoader.lanKeys!.hardWorkingList!.tr]; ShowBottomSheetTool().showSingleRowPicker( //上下文 context, //默认的索引 normalIndex: 0, - title: TranslationLoader.lanKeys.rankingList.tr, - cancelTitle: TranslationLoader.lanKeys.cancel.tr, - sureTitle: TranslationLoader.lanKeys.sure.tr, + title: TranslationLoader.lanKeys!.rankingList!.tr, + cancelTitle: TranslationLoader.lanKeys!.cancel!.tr, + sureTitle: TranslationLoader.lanKeys!.sure!.tr, //要显示的列表 //可自定义数据适配器 //adapter: PickerAdapter(), diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart index 1da92b2b..5d374e40 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart @@ -12,39 +12,39 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class CheckingInSetPage extends StatefulWidget { - const CheckingInSetPage({Key key}) : super(key: key); + const CheckingInSetPage({Key? key}) : super(key: key); @override State createState() => _CheckingInSetPageState(); } class _CheckingInSetPageState extends State { - TextEditingController _changeNameController; + late TextEditingController _changeNameController; @override Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.checkingIn.tr} ${TranslationLoader.lanKeys.set.tr}", haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.checkingIn!.tr} ${TranslationLoader.lanKeys!.set!.tr}", haveBack:true, backgroundColor: AppColors.mainColor), body: Column( children: [ - CommonItem(leftTitel:"${TranslationLoader.lanKeys.company.tr} ${TranslationLoader.lanKeys.name.tr}", rightTitle:"深圳市志超科技", isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:"${TranslationLoader.lanKeys!.company!.tr} ${TranslationLoader.lanKeys!.name!.tr}", rightTitle:"深圳市志超科技", isHaveLine: true, isHaveDirection: true, action: (){ showCupertinoAlertDialog(context); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.staff.tr, rightTitle:"0", isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.staff!.tr, rightTitle:"0", isHaveLine: true, isHaveDirection: true, action: (){ Navigator.pushNamed(context, Routers.checkingInStaffManagePage); }), - CommonItem(leftTitel:"${TranslationLoader.lanKeys.work.tr} ${TranslationLoader.lanKeys.time.tr}", rightTitle:"9:00 - 18:00", isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:"${TranslationLoader.lanKeys!.work!.tr} ${TranslationLoader.lanKeys!.time!.tr}", rightTitle:"9:00 - 18:00", isHaveLine: true, isHaveDirection: true, action: (){ Navigator.pushNamed(context, Routers.checkingInSetWorkTimePage); }), - CommonItem(leftTitel:"${TranslationLoader.lanKeys.workday.tr} ${TranslationLoader.lanKeys.set.tr}", rightTitle:"1,2,3,4,5", isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:"${TranslationLoader.lanKeys!.workday!.tr} ${TranslationLoader.lanKeys!.set!.tr}", rightTitle:"1,2,3,4,5", isHaveLine: true, isHaveDirection: true, action: (){ Navigator.pushNamed(context, Routers.checkingInSetWorkdaySet); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.holidays.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.holidays!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){ Navigator.pushNamed(context, Routers.checkingInSetHolidaysPage); }), SizedBox(height: 30.h,), - SubmitBtn(btnName: "${TranslationLoader.lanKeys.delete.tr} ${TranslationLoader.lanKeys.company.tr}", + SubmitBtn(btnName: "${TranslationLoader.lanKeys!.delete!.tr} ${TranslationLoader.lanKeys!.company!.tr}", borderRadius: 20.w, fontSize: 32.sp, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w), @@ -62,7 +62,7 @@ class _CheckingInSetPageState extends State { showDialog( context: context, builder: (BuildContext context) { - return ShowTFView(title:"${TranslationLoader.lanKeys.amend.tr} ${TranslationLoader.lanKeys.name.tr}", tipTitle:"", controller: _changeNameController); + return ShowTFView(title:"${TranslationLoader.lanKeys!.amend!.tr} ${TranslationLoader.lanKeys!.name!.tr}", tipTitle:"", controller: _changeNameController); }); } } diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInSetAddStaff/checkingInAddStaff_page.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInSetAddStaff/checkingInAddStaff_page.dart index be93a7a7..dd81a4c3 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInSetAddStaff/checkingInAddStaff_page.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInSetAddStaff/checkingInAddStaff_page.dart @@ -11,7 +11,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class CheckingInAddStaffPage extends StatefulWidget { - const CheckingInAddStaffPage({Key key}) : super(key: key); + const CheckingInAddStaffPage({Key? key}) : super(key: key); @override State createState() => _CheckingInAddStaffPageState(); @@ -22,15 +22,15 @@ class _CheckingInAddStaffPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle:"${TranslationLoader.lanKeys.add.tr} ${TranslationLoader.lanKeys.staff.tr}", haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle:"${TranslationLoader.lanKeys!.add!.tr} ${TranslationLoader.lanKeys!.staff!.tr}", haveBack:true, backgroundColor: AppColors.mainColor), body: Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.name.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(TranslationLoader.lanKeys.pleaseEnter.tr)), - CommonItem(leftTitel:TranslationLoader.lanKeys.punchingMode.tr, rightTitle:"APP", isHaveLine: false, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.name!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(TranslationLoader.lanKeys!.pleaseEnter!.tr)), + CommonItem(leftTitel:TranslationLoader.lanKeys!.punchingMode!.tr, rightTitle:"APP", isHaveLine: false, isHaveDirection: true, action: (){ _showSeletClockInType(); }), SizedBox(height: 10.h,), - CommonItem(leftTitel:TranslationLoader.lanKeys.whetherTheEmployeeHasAKey.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: Row( + CommonItem(leftTitel:TranslationLoader.lanKeys!.whetherTheEmployeeHasAKey!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: Row( children: [ whetherTheEmployeeHasAKeyWidget("有", (){ @@ -43,16 +43,16 @@ class _CheckingInAddStaffPageState extends State { )), Visibility( visible:true, - child: CommonItem(leftTitel:TranslationLoader.lanKeys.accountNumber.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(TranslationLoader.lanKeys.pleaseEnter.tr)), + child: CommonItem(leftTitel:TranslationLoader.lanKeys!.accountNumber!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(TranslationLoader.lanKeys!.pleaseEnter!.tr)), ), Visibility( visible:true, - child: CommonItem(leftTitel:TranslationLoader.lanKeys.selectKey.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){ + child: CommonItem(leftTitel:TranslationLoader.lanKeys!.selectKey!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){ _showSeletClockInType(); }), ), SizedBox(height: 50.w,), - SubmitBtn(btnName: TranslationLoader.lanKeys.sure.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), + SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){ } @@ -91,16 +91,16 @@ class _CheckingInAddStaffPageState extends State { ); } - Widget _showSeletClockInType(){ + void _showSeletClockInType(){ var list = ["15080825640",]; - ShowBottomSheetTool().showSingleRowPicker( + ShowBottomSheetTool().showSingleRowPicker( //上下文 context, //默认的索引 normalIndex: 0, title: "选择钥匙", - cancelTitle: TranslationLoader.lanKeys.cancel.tr, - sureTitle: TranslationLoader.lanKeys.sure.tr, + cancelTitle: TranslationLoader.lanKeys!.cancel!.tr, + sureTitle: TranslationLoader.lanKeys!.sure!.tr, //要显示的列表 //可自定义数据适配器 //adapter: PickerAdapter(), diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInSetHolidays/checkingInSetHolidays_page.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInSetHolidays/checkingInSetHolidays_page.dart index e716a219..f1b8b4e1 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInSetHolidays/checkingInSetHolidays_page.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInSetHolidays/checkingInSetHolidays_page.dart @@ -16,7 +16,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class CheckingInSetHolidaysPage extends StatefulWidget { - const CheckingInSetHolidaysPage({Key key}) : super(key: key); + const CheckingInSetHolidaysPage({Key? key}) : super(key: key); @override State createState() => _CheckingInSetHolidaysPageState(); @@ -48,7 +48,7 @@ class _CheckingInSetHolidaysPageState extends State { ); } - Widget _checkingInListItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function action){ + Widget _checkingInListItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function() action){ return GestureDetector( onTap: action, child: Container( @@ -64,7 +64,7 @@ class _CheckingInSetHolidaysPageState extends State { color: const Color(0xFFAFB5D7), width: 100.w, height: 140.h, - child: Center(child: Text("7\n${TranslationLoader.lanKeys.month.tr}", textAlign: TextAlign.center, style: TextStyle(fontSize: 32.sp, color: Colors.white),)) + child: Center(child: Text("7\n${TranslationLoader.lanKeys!.month!.tr}", textAlign: TextAlign.center, style: TextStyle(fontSize: 32.sp, color: Colors.white),)) ), SizedBox(width: 30.w,), Expanded( @@ -85,7 +85,7 @@ class _CheckingInSetHolidaysPageState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Text("${TranslationLoader.lanKeys.libertyDay.tr}:2023.6.21 11.15-2023.6.21 11.15", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ), + Text("${TranslationLoader.lanKeys!.libertyDay!.tr}:2023.6.21 11.15-2023.6.21 11.15", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ), ], ), ), @@ -94,7 +94,7 @@ class _CheckingInSetHolidaysPageState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Text("${TranslationLoader.lanKeys.coverDate.tr}:2023.6.21 11.15", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ), + Text("${TranslationLoader.lanKeys!.coverDate!.tr}:2023.6.21 11.15", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ), ], ), ), @@ -116,7 +116,7 @@ class _CheckingInSetHolidaysPageState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Text("${DateTime.now().year}${TranslationLoader.lanKeys.year.tr}", style: const TextStyle(color: Colors.white),), + Text("${DateTime.now().year}${TranslationLoader.lanKeys!.year!.tr}", style: const TextStyle(color: Colors.white),), SizedBox(width: 5.w,), Image.asset('images/main/icon_lockDetail_checkIn_topTitle.png', width: 30.w, height: 16.w,) ], @@ -124,7 +124,7 @@ class _CheckingInSetHolidaysPageState extends State { ); } - Widget showListType(){ + void showListType(){ Pickers.showDatePicker( context, // 模式,详见下方 @@ -140,7 +140,7 @@ class _CheckingInSetHolidaysPageState extends State { child: Container( alignment: Alignment.center, padding: const EdgeInsets.only(left: 22, right: 12), - child: Text(TranslationLoader.lanKeys.cancel.tr, style: const TextStyle(color: Colors.black, fontSize: 16.0)), + child: Text(TranslationLoader.lanKeys!.cancel!.tr, style: const TextStyle(color: Colors.black, fontSize: 16.0)), ), ), commitButton: GestureDetector( @@ -150,7 +150,7 @@ class _CheckingInSetHolidaysPageState extends State { child: Container( alignment: Alignment.center, padding: const EdgeInsets.only(left: 22, right: 12), - child: Text(TranslationLoader.lanKeys.sure.tr, + child: Text(TranslationLoader.lanKeys!.sure!.tr, style: const TextStyle(color: Colors.black, fontSize: 16.0)), ), ), diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInSetStaffManage/checkingInStaffManage_page.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInSetStaffManage/checkingInStaffManage_page.dart index 10dda49e..2120c6a0 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInSetStaffManage/checkingInStaffManage_page.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInSetStaffManage/checkingInStaffManage_page.dart @@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class CheckingInStaffManagePage extends StatefulWidget { - const CheckingInStaffManagePage({Key key}) : super(key: key); + const CheckingInStaffManagePage({Key? key}) : super(key: key); @override State createState() => _CheckingInStaffManagePageState(); @@ -20,7 +20,7 @@ class _CheckingInStaffManagePageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.staff.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.staff!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ GestureDetector( onTap: (){ Navigator.pushNamed(context, Routers.checkingInAddStaffPage); @@ -44,7 +44,7 @@ class _CheckingInStaffManagePageState extends State { ); } - Widget _checkingInStaffManageItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function action){ + Widget _checkingInStaffManageItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function() action){ return GestureDetector( onTap: action, child: Container( diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInSetWorkTime/checkingInSetWorkTime_page.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInSetWorkTime/checkingInSetWorkTime_page.dart index 4a2b1e3e..b5ceefb0 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInSetWorkTime/checkingInSetWorkTime_page.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInSetWorkTime/checkingInSetWorkTime_page.dart @@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class CheckingInSetWorkTimePage extends StatefulWidget { - const CheckingInSetWorkTimePage({Key key}) : super(key: key); + const CheckingInSetWorkTimePage({Key? key}) : super(key: key); @override State createState() => _CheckingInSetWorkTimePageState(); @@ -21,7 +21,7 @@ class _CheckingInSetWorkTimePageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.work.tr} ${TranslationLoader.lanKeys.time.tr} ${TranslationLoader.lanKeys.set.tr}", haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.work!.tr} ${TranslationLoader.lanKeys!.time!.tr} ${TranslationLoader.lanKeys!.set!.tr}", haveBack:true, backgroundColor: AppColors.mainColor), body: buildMainUI(), ); } @@ -29,18 +29,18 @@ class _CheckingInSetWorkTimePageState extends State { Widget buildMainUI(){ return Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.officeHours.tr, rightTitle:"11:49", isHaveDirection: true, isHaveLine: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.officeHours!.tr, rightTitle:"11:49", isHaveDirection: true, isHaveLine: true, action:(){ // ShowSeletDateTime().showDatePicker(context, '2100-01-01 00:00', '1900-01-01 00:00', getNowDate(),'yyyy-MMMM-dd HH:mm', (dateTime, List index) { // // }); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.closingTime.tr, rightTitle:"11:49", isHaveDirection: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.closingTime!.tr, rightTitle:"11:49", isHaveDirection: true, action:(){ // ShowSeletDateTime().showDatePicker(context, '00:00', '00:00', getNowDate(),'HH:mm', (dateTime, List index) { // // }); }), SizedBox(height: 30.h,), - SubmitBtn(btnName: TranslationLoader.lanKeys.sure.tr, + SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr, borderRadius: 20.w, fontSize: 32.sp, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w), diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInSetWorkdaySet/checkingInSetWorkdaySet_page.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInSetWorkdaySet/checkingInSetWorkdaySet_page.dart index 3181fad0..5419696d 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInSetWorkdaySet/checkingInSetWorkdaySet_page.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInSetWorkdaySet/checkingInSetWorkdaySet_page.dart @@ -10,7 +10,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class CheckingInSetWorkdaySet extends StatefulWidget { - const CheckingInSetWorkdaySet({Key key}) : super(key: key); + const CheckingInSetWorkdaySet({Key? key}) : super(key: key); @override State createState() => _CheckingInSetWorkdaySetState(); @@ -21,7 +21,7 @@ class _CheckingInSetWorkdaySetState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.workday.tr} ${TranslationLoader.lanKeys.set.tr}", haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.workday!.tr} ${TranslationLoader.lanKeys!.set!.tr}", haveBack:true, backgroundColor: AppColors.mainColor), body: ListView( children: [ topBtnWidget(), @@ -34,7 +34,7 @@ class _CheckingInSetWorkdaySetState extends State { child: bottomOddOrEvenDaysOffSeletBtn() ), SizedBox(height: 50.h,), - SubmitBtn(btnName:TranslationLoader.lanKeys.sure.tr, + SubmitBtn(btnName:TranslationLoader.lanKeys!.sure!.tr, borderRadius: 20.w, fontSize: 32.sp, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w), @@ -63,7 +63,7 @@ class _CheckingInSetWorkdaySetState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Center(child: Text(TranslationLoader.lanKeys.custom.tr, style: TextStyle(fontSize: 32.sp, color: Colors.white))), + Center(child: Text(TranslationLoader.lanKeys!.custom!.tr, style: TextStyle(fontSize: 32.sp, color: Colors.white))), ], ), ), @@ -76,7 +76,7 @@ class _CheckingInSetWorkdaySetState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Expanded(child: Center(child: Text(TranslationLoader.lanKeys.oddOrEvenDaysOff.tr, style: TextStyle(fontSize: 32.sp, color: Colors.white), textAlign: TextAlign.center,))), + Expanded(child: Center(child: Text(TranslationLoader.lanKeys!.oddOrEvenDaysOff!.tr, style: TextStyle(fontSize: 32.sp, color: Colors.white), textAlign: TextAlign.center,))), ], ), ), @@ -90,15 +90,15 @@ class _CheckingInSetWorkdaySetState extends State { padding: EdgeInsets.only(left:10.w, right: 10.w), child: Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.thisWeek.tr, rightTitle:"", allHeight:70.h, isHaveLine: true), - CommonItem(leftTitel:TranslationLoader.lanKeys.singleDayWeekend.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true, + CommonItem(leftTitel:TranslationLoader.lanKeys!.thisWeek!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true), + CommonItem(leftTitel:TranslationLoader.lanKeys!.singleDayWeekend!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true, rightWidget: GestureDetector( onTap: (){ }, child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) ), - CommonItem(leftTitel:TranslationLoader.lanKeys.twoDaysOff.tr, rightTitle:"", allHeight:70.h, isHaveLine: false, isHaveRightWidget: true, + CommonItem(leftTitel:TranslationLoader.lanKeys!.twoDaysOff!.tr, rightTitle:"", allHeight:70.h, isHaveLine: false, isHaveRightWidget: true, rightWidget: GestureDetector( onTap: (){ @@ -116,49 +116,49 @@ class _CheckingInSetWorkdaySetState extends State { padding: EdgeInsets.only(left:10.w, right: 10.w), child: Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.monday.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true, + CommonItem(leftTitel:TranslationLoader.lanKeys!.monday!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true, rightWidget: GestureDetector( onTap: (){ }, child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) ), - CommonItem(leftTitel:TranslationLoader.lanKeys.tuesday.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true, + CommonItem(leftTitel:TranslationLoader.lanKeys!.tuesday!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true, rightWidget: GestureDetector( onTap: (){ }, child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) ), - CommonItem(leftTitel:TranslationLoader.lanKeys.wednesday.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true, + CommonItem(leftTitel:TranslationLoader.lanKeys!.wednesday!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true, rightWidget: GestureDetector( onTap: (){ }, child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) ), - CommonItem(leftTitel:TranslationLoader.lanKeys.thursday.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true, + CommonItem(leftTitel:TranslationLoader.lanKeys!.thursday!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true, rightWidget: GestureDetector( onTap: (){ }, child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) ), - CommonItem(leftTitel:TranslationLoader.lanKeys.friday.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true, + CommonItem(leftTitel:TranslationLoader.lanKeys!.friday!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true, rightWidget: GestureDetector( onTap: (){ }, child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) ), - CommonItem(leftTitel:TranslationLoader.lanKeys.saturday.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true, + CommonItem(leftTitel:TranslationLoader.lanKeys!.saturday!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true, rightWidget: GestureDetector( onTap: (){ }, child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) ), - CommonItem(leftTitel:TranslationLoader.lanKeys.sunday.tr, rightTitle:"", allHeight:70.h, isHaveLine: false, isHaveRightWidget: true, + CommonItem(leftTitel:TranslationLoader.lanKeys!.sunday!.tr, rightTitle:"", allHeight:70.h, isHaveLine: false, isHaveRightWidget: true, rightWidget: GestureDetector( onTap: (){ diff --git a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart index 4c429aa9..2cf40566 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart @@ -12,50 +12,50 @@ import '../../../../../tools/titleAppBar.dart'; import '../../../../../translations/trans_lib.dart'; class ElectronicKeyDetailPage extends StatefulWidget { - const ElectronicKeyDetailPage({Key key}) : super(key: key); + const ElectronicKeyDetailPage({Key? key}) : super(key: key); @override State createState() => _ElectronicKeyDetailPageState(); } class _ElectronicKeyDetailPageState extends State { - TextEditingController _changeNameController; + late TextEditingController _changeNameController; @override Widget build(BuildContext context) { return Scaffold( resizeToAvoidBottomInset: false, backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.keyDetail.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.keyDetail!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body: Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.name.tr, rightTitle:"魏", isHaveDirection: true, isHaveLine: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.name!.tr, rightTitle:"魏", isHaveDirection: true, isHaveLine: true, action:(){ showCupertinoAlertDialog(context); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, allHeight: 90.h,rightTitle:"2020.06.20 11:49\n2020.06.21 11:49", isHaveDirection: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, allHeight: 90.h,rightTitle:"2020.06.20 11:49\n2020.06.21 11:49", isHaveDirection: true, action:(){ Navigator.pushNamed(context, Routers.electronicKeyDetailChangeDate); }), Container(height: 10.h), - CommonItem(leftTitel:TranslationLoader.lanKeys.receiver.tr, rightTitle:"786612630@qq.com",action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.receiver!.tr, rightTitle:"786612630@qq.com",action:(){ }), - CommonItem(leftTitel:TranslationLoader.lanKeys.sender.tr, rightTitle:"15080825640", action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.sender!.tr, rightTitle:"15080825640", action:(){ }), - CommonItem(leftTitel:TranslationLoader.lanKeys.senderTime.tr, rightTitle:"2020.06.21 11:49", action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.senderTime!.tr, rightTitle:"2020.06.21 11:49", action:(){ }), Container(height: 10.h), - CommonItem(leftTitel:TranslationLoader.lanKeys.realNameAuthentication.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w,child: _switch()), action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.realNameAuthentication!.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w,child: _switch()), action:(){ }), Container(height: 10.h), - CommonItem(leftTitel:TranslationLoader.lanKeys.operatingRecord.tr, rightTitle:"", isHaveDirection: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.operatingRecord!.tr, rightTitle:"", isHaveDirection: true, action:(){ }), Container(height: 40.h), SubmitBtn( - btnName: TranslationLoader.lanKeys.delete, + btnName: TranslationLoader.lanKeys!.delete!.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), @@ -68,7 +68,7 @@ class _ElectronicKeyDetailPageState extends State { ); } - Widget commonItem(String leftTitle, String rightTitle, {bool isHaveDirection = false, bool isHaveLine = false, bool isHaveRightWidget = false, Widget rightWidget,Function action}){ + Widget commonItem(String leftTitle, String rightTitle, {bool isHaveDirection = false, bool isHaveLine = false, bool isHaveRightWidget = false, Widget? rightWidget, Function()? action}){ return GestureDetector( onTap: action, child: Column( @@ -87,7 +87,7 @@ class _ElectronicKeyDetailPageState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.end, children: [ - isHaveRightWidget?rightWidget:Text(rightTitle, textAlign: TextAlign.end,style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),) + isHaveRightWidget?rightWidget!:Text(rightTitle, textAlign: TextAlign.end,style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),) ], ), ), @@ -119,7 +119,7 @@ class _ElectronicKeyDetailPageState extends State { showDialog( context: context, builder: (BuildContext context) { - return ShowTFView(title:"${TranslationLoader.lanKeys.amend.tr} ${TranslationLoader.lanKeys.name.tr}", tipTitle:"", controller: _changeNameController); + return ShowTFView(title:"${TranslationLoader.lanKeys!.amend!.tr} ${TranslationLoader.lanKeys!.name!.tr}", tipTitle:"", controller: _changeNameController); }); } diff --git a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetailChangeDate/electronicKeyDetailChangeDate_page.dart b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetailChangeDate/electronicKeyDetailChangeDate_page.dart index 80a77cb4..7763a1fe 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetailChangeDate/electronicKeyDetailChangeDate_page.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetailChangeDate/electronicKeyDetailChangeDate_page.dart @@ -10,7 +10,7 @@ import '../../../../../tools/titleAppBar.dart'; import '../../../../../translations/trans_lib.dart'; class ElectronicKeyDetailChangeDate extends StatefulWidget { - const ElectronicKeyDetailChangeDate({Key key}) : super(key: key); + const ElectronicKeyDetailChangeDate({Key? key}) : super(key: key); @override State createState() => _ElectronicKeyDetailChangeDateState(); @@ -22,8 +22,8 @@ class _ElectronicKeyDetailChangeDateState extends State index) { }); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.failureTime.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, action:(){ ShowSeletDateTime().showDatePicker(context, '00:00', '00:00', getNowDate(),'HH:mm', (dateTime, List index) { }); diff --git a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_page.dart b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_page.dart index 5314256b..57f9120c 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_page.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_page.dart @@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class ElectronicKeyListPage extends StatefulWidget { - const ElectronicKeyListPage({Key key}) : super(key: key); + const ElectronicKeyListPage({Key? key}) : super(key: key); @override State createState() => _ElectronicKeyListPageState(); @@ -20,9 +20,9 @@ class _ElectronicKeyListPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.electronicKey.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.electronicKey!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ TextButton( - child: Text(TranslationLoader.lanKeys.reset.tr, style: const TextStyle(color: Colors.white),), + child: Text(TranslationLoader.lanKeys!.reset!.tr, style: const TextStyle(color: Colors.white),), onPressed: (){ },), @@ -32,7 +32,7 @@ class _ElectronicKeyListPageState extends State { _searchWidget(), Expanded(child: _buildMainUI()), SubmitBtn( - btnName: TranslationLoader.lanKeys.sendKey.tr, + btnName: TranslationLoader.lanKeys!.sendKey!.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), @@ -61,7 +61,7 @@ class _ElectronicKeyListPageState extends State { //输入里面输入文字内边距设置 contentPadding: const EdgeInsets.only( top: 12.0, left: -19.0, right: -15.0, bottom: 8.0), - hintText: TranslationLoader.lanKeys.pleaseEnter.tr, + hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr, //不需要输入框下划线 border: InputBorder.none, //左边图标设置 @@ -85,7 +85,7 @@ class _ElectronicKeyListPageState extends State { ); } - Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function action){ + Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function() action){ return GestureDetector( onTap: action, child: Container( diff --git a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyPeriodValidity/electronicKeyPeriodValidity_page.dart b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyPeriodValidity/electronicKeyPeriodValidity_page.dart index 729b209f..7f8bcb87 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyPeriodValidity/electronicKeyPeriodValidity_page.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyPeriodValidity/electronicKeyPeriodValidity_page.dart @@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class ElectronicKeyPeriodValidityPage extends StatefulWidget { - const ElectronicKeyPeriodValidityPage({Key key}) : super(key: key); + const ElectronicKeyPeriodValidityPage({Key? key}) : super(key: key); @override State createState() => _ElectronicKeyPeriodValidityPageState(); @@ -20,7 +20,7 @@ class _ElectronicKeyPeriodValidityPageState extends State createState() => _MassSendElectronicKeyPageState(); @@ -21,7 +21,7 @@ class MassSendElectronicKeyPage extends StatefulWidget { class _MassSendElectronicKeyPageState extends State { final FlutterContactPicker _contactPicker = FlutterContactPicker(); - Contact _contact; + late Contact _contact; @override Widget build(BuildContext context) { @@ -76,6 +76,7 @@ class _MassSendElectronicKeyPageState extends State { } break; default: + return Container(); break; } } @@ -85,10 +86,10 @@ class _MassSendElectronicKeyPageState extends State { return Column( children: [ Container(height: 10.h), - CommonItem(leftTitel:TranslationLoader.lanKeys.receiver.tr, rightTitle:TranslationLoader.lanKeys.pleaseAdd.tr, isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.receiver!.tr, rightTitle:TranslationLoader.lanKeys!.pleaseAdd!.tr, isHaveLine: true, isHaveDirection: true, action: (){ }), - CommonItem(leftTitel:TranslationLoader.lanKeys.lock.tr, rightTitle:TranslationLoader.lanKeys.pleaseSelet.tr, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.lock!.tr, rightTitle:TranslationLoader.lanKeys!.pleaseSelet!.tr, isHaveDirection: true, action: (){ }), Container(height: 10.h), @@ -100,8 +101,8 @@ class _MassSendElectronicKeyPageState extends State { Widget keyTimeWidget(){ return Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true), - CommonItem(leftTitel:TranslationLoader.lanKeys.failureTime.tr, rightTitle:"2020.06.20 11:49", ), + CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true), + CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"2020.06.20 11:49", ), Container(height: 10.h), ], ); @@ -111,7 +112,7 @@ class _MassSendElectronicKeyPageState extends State { Widget remoteUnlockingWidget(){ return Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.remoteUnlockingAllowed.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch()), action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.remoteUnlockingAllowed!.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch()), action:(){ }), Container(height: 10.h), @@ -123,7 +124,7 @@ class _MassSendElectronicKeyPageState extends State { Widget periodValidityWidget(){ return Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.periodValidity.tr, rightTitle:"", isHaveDirection: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.periodValidity!.tr, rightTitle:"", isHaveDirection: true, action:(){ Navigator.pushNamed(context, Routers.electronicKeyPeriodValidityPage); }), Container(height: 10.h), @@ -135,7 +136,7 @@ class _MassSendElectronicKeyPageState extends State { return Column( children: [ SubmitBtn( - btnName: TranslationLoader.lanKeys.send.tr, + btnName: TranslationLoader.lanKeys!.send!.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), diff --git a/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicManageKey/massSendElectronicKeyManage_page.dart b/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicManageKey/massSendElectronicKeyManage_page.dart index e69fcc33..ee26b80a 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicManageKey/massSendElectronicKeyManage_page.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicManageKey/massSendElectronicKeyManage_page.dart @@ -7,7 +7,7 @@ import '../../../../../translations/trans_lib.dart'; import 'massSendElectronicKeyManage_tabbar.dart'; class MassSendElectronicKeyManagePage extends StatefulWidget { - const MassSendElectronicKeyManagePage({Key key}) : super(key: key); + const MassSendElectronicKeyManagePage({Key? key}) : super(key: key); @override State createState() => _MassSendElectronicKeyManagePageState(); @@ -20,7 +20,7 @@ class _MassSendElectronicKeyManagePageState extends State createState() => _MassSendElectronicKeyManageTabbarState(); } class _MassSendElectronicKeyManageTabbarState extends State with SingleTickerProviderStateMixin { - TabController _tabController; + late TabController _tabController; final List _itemTabs = [ - ItemView(title: TranslationLoader.lanKeys.timeLimit.tr, type: "0"), - ItemView(title: TranslationLoader.lanKeys.permanent.tr, type: "1"), - ItemView(title: TranslationLoader.lanKeys.circulation.tr, type: "2"), + ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: "0"), + ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: "1"), + ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, type: "2"), ]; @override @@ -82,7 +82,7 @@ class _MassSendElectronicKeyManageTabbarState extends State createState() => _SendElectronicKeyPageState(); @@ -21,7 +21,7 @@ class SendElectronicKeyPage extends StatefulWidget { class _SendElectronicKeyPageState extends State { final FlutterContactPicker _contactPicker = FlutterContactPicker(); - Contact _contact; + late Contact _contact; @override Widget build(BuildContext context) { @@ -62,7 +62,6 @@ class _SendElectronicKeyPageState extends State { ], ); } - break; case 2: { // 单次 @@ -74,7 +73,6 @@ class _SendElectronicKeyPageState extends State { ], ); } - break; case 3: { // 循环 @@ -87,9 +85,8 @@ class _SendElectronicKeyPageState extends State { ], ); } - break; default: - break; + return Container(); } } @@ -98,8 +95,8 @@ class _SendElectronicKeyPageState extends State { return Column( children: [ Container(height: 10.h), - CommonItem(leftTitel:TranslationLoader.lanKeys.receiver.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(true, TranslationLoader.lanKeys.pleaseEnterNumberOrEmail.tr)), - CommonItem(leftTitel:TranslationLoader.lanKeys.name.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: getTFWidget(false, TranslationLoader.lanKeys.enterYourName.tr)), + CommonItem(leftTitel:TranslationLoader.lanKeys!.receiver!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(true, TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr)), + CommonItem(leftTitel:TranslationLoader.lanKeys!.name!.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: getTFWidget(false, TranslationLoader.lanKeys!.enterYourName!.tr)), Container(height: 10.h), ], ); @@ -109,10 +106,10 @@ class _SendElectronicKeyPageState extends State { Widget keyTimeWidget(){ return Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true, isHaveDirection: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true, isHaveDirection: true, action:(){ // _showDatePicker(); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.failureTime.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, action:(){ // _showDatePicker(); }), Container(height: 10.h), @@ -124,7 +121,7 @@ class _SendElectronicKeyPageState extends State { Widget keyRealNameWidget(){ return Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.realNameAuthentication.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch()), action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.realNameAuthentication!.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch()), action:(){ }), Container(height: 10.h), @@ -136,7 +133,7 @@ class _SendElectronicKeyPageState extends State { Widget keyPeriodValidityWidget(){ return Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.periodValidity.tr, rightTitle:"", isHaveDirection: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.periodValidity!.tr, rightTitle:"", isHaveDirection: true, action:(){ Navigator.pushNamed(context, Routers.electronicKeyPeriodValidityPage); }), ], @@ -151,11 +148,11 @@ class _SendElectronicKeyPageState extends State { child: Row( // crossAxisAlignment: CrossAxisAlignment.start, children: [ - Expanded(child: Text(TranslationLoader.lanKeys.sendKeyBottomTip.tr, textAlign: TextAlign.start,)), + Expanded(child: Text(TranslationLoader.lanKeys!.sendKeyBottomTip!.tr, textAlign: TextAlign.start,)), ], ), ), - SubmitBtn(btnName: TranslationLoader.lanKeys.send.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), + SubmitBtn(btnName: TranslationLoader.lanKeys!.send!.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){ } @@ -168,7 +165,7 @@ class _SendElectronicKeyPageState extends State { children: [ TextButton(onPressed: (){ Navigator.pushNamed(context, Routers.massSendElectronicKeyManagePage); - }, child: Text(TranslationLoader.lanKeys.sendGroupKey.tr, style: TextStyle(color: AppColors.mainColor, fontWeight: FontWeight.w500),)), + }, child: Text(TranslationLoader.lanKeys!.sendGroupKey!.tr, style: TextStyle(color: AppColors.mainColor, fontWeight: FontWeight.w500),)), ], ), ), @@ -252,9 +249,9 @@ class _SendElectronicKeyPageState extends State { alignment: Alignment.center, child: InkWell( onTap: () async { - Contact contact = await _contactPicker.selectContact(); + Contact? contact = await _contactPicker.selectContact(); setState(() { - _contact = contact; + _contact = contact!; // print("object111111111111 ${_contact.fullName} ${_contact.phoneNumbers}"); }); }, diff --git a/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicManageKey/sendElectronicKeyManage_page.dart b/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicManageKey/sendElectronicKeyManage_page.dart index 8a924585..17dbad60 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicManageKey/sendElectronicKeyManage_page.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicManageKey/sendElectronicKeyManage_page.dart @@ -7,7 +7,7 @@ import '../../../../../translations/trans_lib.dart'; import 'sendElectronicKeyManage_tabbar.dart'; class SendElectronicKeyManagePage extends StatefulWidget { - const SendElectronicKeyManagePage({Key key}) : super(key: key); + const SendElectronicKeyManagePage({Key? key}) : super(key: key); @override State createState() => _SendElectronicKeyManagePageState(); @@ -20,7 +20,7 @@ class _SendElectronicKeyManagePageState extends State createState() => _SendElectronicKeyManageTabbarState(); } class _SendElectronicKeyManageTabbarState extends State with SingleTickerProviderStateMixin { - TabController _tabController; + late TabController _tabController; final List _itemTabs = [ - ItemView(title: TranslationLoader.lanKeys.timeLimit.tr, type: "0"), - ItemView(title: TranslationLoader.lanKeys.permanent.tr, type: "1"), - ItemView(title: TranslationLoader.lanKeys.once.tr, type: "2"), - ItemView(title: TranslationLoader.lanKeys.circulation.tr, type: "3"), + ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: "0"), + ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: "1"), + ItemView(title: TranslationLoader.lanKeys!.once!.tr, type: "2"), + ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, type: "3"), ]; @override @@ -83,7 +83,7 @@ class _SendElectronicKeyManageTabbarState extends State createState() => _SendEmailNotificationPageState(); diff --git a/star_lock/lib/main/lockDetail/lcokSet/automaticBlocking/automaticBlocking_page.dart b/star_lock/lib/main/lockDetail/lcokSet/automaticBlocking/automaticBlocking_page.dart index 4f7dd08f..f3d743dc 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/automaticBlocking/automaticBlocking_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/automaticBlocking/automaticBlocking_page.dart @@ -12,7 +12,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class AutomaticBlockingPage extends StatefulWidget { - const AutomaticBlockingPage({Key key}) : super(key: key); + const AutomaticBlockingPage({Key? key}) : super(key: key); @override State createState() => _AutomaticBlockingPageState(); @@ -25,23 +25,23 @@ class _AutomaticBlockingPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.automaticBlocking.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.automaticBlocking!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body:ListView( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.automaticBlocking.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())), + CommonItem(leftTitel:TranslationLoader.lanKeys!.automaticBlocking!.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())), Container(height: 10.h,), Builder( builder: (context) { - return CommonItem(leftTitel:TranslationLoader.lanKeys.delayTime.tr, rightTitle:"5s", isHaveLine: false, isHaveDirection: true, action: (){ - var list = ["5S", "10S", "15S", "30S", "60S", TranslationLoader.lanKeys.custom.tr]; + return CommonItem(leftTitel:TranslationLoader.lanKeys!.delayTime!.tr, rightTitle:"5s", isHaveLine: false, isHaveDirection: true, action: (){ + var list = ["5S", "10S", "15S", "30S", "60S", TranslationLoader.lanKeys!.custom!.tr]; ShowBottomSheetTool().showSingleRowPicker( //上下文 context, //默认的索引 normalIndex: 2, - title: TranslationLoader.lanKeys.time.tr, - cancelTitle: TranslationLoader.lanKeys.cancel.tr, - sureTitle: TranslationLoader.lanKeys.sure.tr, + title: TranslationLoader.lanKeys!.time!.tr, + cancelTitle: TranslationLoader.lanKeys!.cancel!.tr, + sureTitle: TranslationLoader.lanKeys!.sure!.tr, //要显示的列表 //可自定义数据适配器 //adapter: PickerAdapter(), @@ -62,7 +62,7 @@ class _AutomaticBlockingPageState extends State { child: Column( children: [ Row( - children: [Text("${TranslationLoader.lanKeys.pleaseEnter.tr}${TranslationLoader.lanKeys.time.tr}(S)"),], + children: [Text("${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.time!.tr}(S)"),], ), TextField( //输入框一行 @@ -73,7 +73,7 @@ class _AutomaticBlockingPageState extends State { //输入里面输入文字内边距设置 contentPadding: const EdgeInsets.only( top: 12.0, bottom: 8.0), - hintText: "${TranslationLoader.lanKeys.pleaseEnter.tr}${TranslationLoader.lanKeys.time.tr}(S)", + hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.time!.tr}(S)", hintStyle: TextStyle(fontSize: 30.sp), //不需要输入框下划线 border: InputBorder.none, @@ -89,7 +89,7 @@ class _AutomaticBlockingPageState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text(TranslationLoader.lanKeys.automaticBlockingTip.tr)), + Expanded(child: Text(TranslationLoader.lanKeys!.automaticBlockingTip!.tr)), ], ), ) diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/adminOpenLockPassword/adminOpenLockPassword_page.dart b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/adminOpenLockPassword/adminOpenLockPassword_page.dart index 9048d5f3..f02fbe5d 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/adminOpenLockPassword/adminOpenLockPassword_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/adminOpenLockPassword/adminOpenLockPassword_page.dart @@ -9,7 +9,7 @@ import '../../../../../tools/titleAppBar.dart'; import '../../../../../translations/trans_lib.dart'; class AdminOpenLockPasswordPage extends StatefulWidget { - const AdminOpenLockPasswordPage({Key key}) : super(key: key); + const AdminOpenLockPasswordPage({Key? key}) : super(key: key); @override State createState() => _AdminOpenLockPasswordPageState(); @@ -20,10 +20,10 @@ class _AdminOpenLockPasswordPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.adminOpenLockPassword.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.adminOpenLockPassword!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body:Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.password.tr, rightTitle:"189934", isHaveLine: false, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.password!.tr, rightTitle:"189934", isHaveLine: false, isHaveDirection: true, action: (){ }), Container( @@ -33,7 +33,7 @@ class _AdminOpenLockPasswordPageState extends State { Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text(TranslationLoader.lanKeys.adminOpenLockPasswordTip.tr)), + Expanded(child: Text(TranslationLoader.lanKeys!.adminOpenLockPasswordTip!.tr)), ], ), SizedBox(height:10.h,), @@ -44,7 +44,7 @@ class _AdminOpenLockPasswordPageState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text(TranslationLoader.lanKeys.updateLockAdminPassword.tr, style: TextStyle(color: AppColors.mainColor),)), + Expanded(child: Text(TranslationLoader.lanKeys!.updateLockAdminPassword!.tr, style: TextStyle(color: AppColors.mainColor),)), ], ), ), diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_page.dart b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_page.dart index 623ddfc7..717ffeb5 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_page.dart @@ -11,7 +11,7 @@ import '../../../../../tools/titleAppBar.dart'; import '../../../../../translations/trans_lib.dart'; class BasicInformationPage extends StatefulWidget { - const BasicInformationPage({Key key}) : super(key: key); + const BasicInformationPage({Key? key}) : super(key: key); @override State createState() => _BasicInformationPageState(); @@ -22,27 +22,27 @@ class _BasicInformationPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.basicInformation.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.basicInformation!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body:Column( children: [ Expanded( child: ListView( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.lockNumber.tr, rightTitle:"MCBN0c_8f3106", allHeight:70.h, isHaveLine: false), + CommonItem(leftTitel:TranslationLoader.lanKeys!.lockNumber!.tr, rightTitle:"MCBN0c_8f3106", allHeight:70.h, isHaveLine: false), CommonItem(leftTitel:"MAC/ID", rightTitle:"53:66:9F:06:31:8F/9418481", allHeight:70.h, isHaveLine: false), SizedBox(height: 10.h,), - CommonItem(leftTitel:TranslationLoader.lanKeys.electricQuantity.tr, rightTitle:"100%", isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.electricQuantity!.tr, rightTitle:"100%", isHaveLine: true, isHaveDirection: true, action: (){ Navigator.pushNamed(context, Routers.uploadElectricQuantityPage); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.periodValidity.tr, rightTitle:"永久", allHeight:70.h, isHaveLine: false), + CommonItem(leftTitel:TranslationLoader.lanKeys!.periodValidity!.tr, rightTitle:"永久", allHeight:70.h, isHaveLine: false), SizedBox(height: 10.h,), - CommonItem(leftTitel:TranslationLoader.lanKeys.lockName.tr, rightTitle:"MCBN0c_8f3106", isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.lockName!.tr, rightTitle:"MCBN0c_8f3106", isHaveLine: true, isHaveDirection: true, action: (){ Navigator.pushNamed(context, Routers.editLockNamePage); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.lockGrouping.tr, rightTitle:"202307", isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.lockGrouping!.tr, rightTitle:"202307", isHaveLine: true, isHaveDirection: true, action: (){ Navigator.pushNamed(context, Routers.lockSeletGroupingPage); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.adminOpenLockPassword.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.adminOpenLockPassword!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){ Navigator.pushNamed(context, Routers.adminOpenLockPasswordPage); }), ], diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/editLockName/editLockName_page.dart b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/editLockName/editLockName_page.dart index 27ac0aad..d8ff960b 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/editLockName/editLockName_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/editLockName/editLockName_page.dart @@ -9,7 +9,7 @@ import '../../../../../tools/titleAppBar.dart'; import '../../../../../translations/trans_lib.dart'; class EditLockNamePage extends StatefulWidget { - const EditLockNamePage({Key key}) : super(key: key); + const EditLockNamePage({Key? key}) : super(key: key); @override State createState() => _EditLockNamePageState(); @@ -28,15 +28,15 @@ class _EditLockNamePageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.basicInformation.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.basicInformation!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ TextButton( - child: Text(TranslationLoader.lanKeys.sure.tr, style: const TextStyle(color: Colors.white),), + child: Text(TranslationLoader.lanKeys!.sure!.tr, style: const TextStyle(color: Colors.white),), onPressed: (){ },), ],), body:Container( - child: LoginInput(controller: _changeLockNameController, leftImg:'', hintText: TranslationLoader.lanKeys.pleaseEnterNumberOrEmail.tr, inputFormatters: [ + child: LoginInput(controller: _changeLockNameController, leftImg:'', hintText: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, inputFormatters: [ LengthLimitingTextInputFormatter(20), ]), ) diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/lockSeletGrouping/lockSeletGrouping_page.dart b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/lockSeletGrouping/lockSeletGrouping_page.dart index 6d3aeb78..a581e353 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/lockSeletGrouping/lockSeletGrouping_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/lockSeletGrouping/lockSeletGrouping_page.dart @@ -11,7 +11,7 @@ import '../../../../../tools/titleAppBar.dart'; import '../../../../../translations/trans_lib.dart'; class LockSeletGroupingPage extends StatefulWidget { - const LockSeletGroupingPage({Key key}) : super(key: key); + const LockSeletGroupingPage({Key? key}) : super(key: key); @override State createState() => _LockSeletGroupingPageState(); @@ -22,12 +22,12 @@ class _LockSeletGroupingPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.basicInformation.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.basicInformation!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body:Column( children: [ Expanded(child: _buildMainUI()), SubmitBtn( - btnName: TranslationLoader.lanKeys.sure.tr, + btnName: TranslationLoader.lanKeys!.sure!.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_page.dart b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_page.dart index 0e259402..dc316f7c 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_page.dart @@ -8,7 +8,7 @@ import '../../../../../tools/titleAppBar.dart'; import '../../../../../translations/trans_lib.dart'; class UploadElectricQuantityPage extends StatefulWidget { - const UploadElectricQuantityPage({Key key}) : super(key: key); + const UploadElectricQuantityPage({Key? key}) : super(key: key); @override State createState() => _UploadElectricQuantityPageState(); @@ -19,7 +19,7 @@ class _UploadElectricQuantityPageState extends State Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.electricQuantity.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.electricQuantity!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body:Container( padding: EdgeInsets.all(30.w), child: Column( @@ -27,18 +27,18 @@ class _UploadElectricQuantityPageState extends State Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text(TranslationLoader.lanKeys.updateElectricQuantityTip.tr)), + Expanded(child: Text(TranslationLoader.lanKeys!.updateElectricQuantityTip!.tr)), ], ), SizedBox(height: 20.h,), Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text("${TranslationLoader.lanKeys.electricQuantity.tr} 100%")), + Expanded(child: Text("${TranslationLoader.lanKeys!.electricQuantity!.tr} 100%")), ], ), SizedBox(height: 30.h,), - SubmitBtn(btnName: TranslationLoader.lanKeys.update.tr, + SubmitBtn(btnName: TranslationLoader.lanKeys!.update!.tr, borderRadius: 20.w, fontSize: 32.sp, // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), diff --git a/star_lock/lib/main/lockDetail/lcokSet/burglarAlarm/burglarAlarm_page.dart b/star_lock/lib/main/lockDetail/lcokSet/burglarAlarm/burglarAlarm_page.dart index 84a517f2..144f527c 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/burglarAlarm/burglarAlarm_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/burglarAlarm/burglarAlarm_page.dart @@ -8,7 +8,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class BurglarAlarmPage extends StatefulWidget { - const BurglarAlarmPage({Key key}) : super(key: key); + const BurglarAlarmPage({Key? key}) : super(key: key); @override State createState() => _BurglarAlarmPageState(); @@ -19,7 +19,7 @@ class _BurglarAlarmPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.burglarAlarm.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.burglarAlarm!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body:Container( padding: EdgeInsets.all(30.w), child: Column( @@ -27,18 +27,18 @@ class _BurglarAlarmPageState extends State { Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text(TranslationLoader.lanKeys.burglarAlarmTip.tr)), + Expanded(child: Text(TranslationLoader.lanKeys!.burglarAlarmTip!.tr)), ], ), SizedBox(height: 20.h,), Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text("${TranslationLoader.lanKeys.currentMode.tr} : ${TranslationLoader.lanKeys.opened.tr}", style: TextStyle(fontWeight: FontWeight.w600),)), + Expanded(child: Text("${TranslationLoader.lanKeys!.currentMode!.tr} : ${TranslationLoader.lanKeys!.opened!.tr}", style: const TextStyle(fontWeight: FontWeight.w600),)), ], ), SizedBox(height: 30.h,), - SubmitBtn(btnName: TranslationLoader.lanKeys.closed.tr, + SubmitBtn(btnName: TranslationLoader.lanKeys!.closed!.tr, borderRadius: 20.w, fontSize: 32.sp, // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), diff --git a/star_lock/lib/main/lockDetail/lcokSet/diagnose/diagnose_page.dart b/star_lock/lib/main/lockDetail/lcokSet/diagnose/diagnose_page.dart index a919c81a..14fc1351 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/diagnose/diagnose_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/diagnose/diagnose_page.dart @@ -8,7 +8,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class DiagnosePage extends StatefulWidget { - const DiagnosePage({Key key}) : super(key: key); + const DiagnosePage({Key? key}) : super(key: key); @override State createState() => _DiagnosePageState(); @@ -19,7 +19,7 @@ class _DiagnosePageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.diagnose.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.diagnose!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body:Container( padding: EdgeInsets.all(30.w), child: Column( @@ -27,11 +27,11 @@ class _DiagnosePageState extends State { Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text(TranslationLoader.lanKeys.diagnoseTip.tr)), + Expanded(child: Text(TranslationLoader.lanKeys!.diagnoseTip!.tr)), ], ), SizedBox(height: 30.h,), - SubmitBtn(btnName: TranslationLoader.lanKeys.uploading.tr, + SubmitBtn(btnName: TranslationLoader.lanKeys!.uploading!.tr, borderRadius: 20.w, fontSize: 32.sp, // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), diff --git a/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/addDoorMagnetic/addDoorMagnetic_page.dart b/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/addDoorMagnetic/addDoorMagnetic_page.dart index 37361ffe..dde73003 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/addDoorMagnetic/addDoorMagnetic_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/addDoorMagnetic/addDoorMagnetic_page.dart @@ -10,7 +10,7 @@ import '../../../../../tools/titleAppBar.dart'; import '../../../../../translations/trans_lib.dart'; class AddDoorMagneticPage extends StatefulWidget { - const AddDoorMagneticPage({Key key}) : super(key: key); + const AddDoorMagneticPage({Key? key}) : super(key: key); @override State createState() => _AddDoorMagneticPageState(); @@ -22,7 +22,7 @@ class _AddDoorMagneticPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.add.tr} ${TranslationLoader.lanKeys.doorMagnetic.tr}", haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.add!.tr} ${TranslationLoader.lanKeys!.doorMagnetic!.tr}", haveBack:true, backgroundColor: AppColors.mainColor), body: ListView( children: [ SizedBox(height: 100.h,), @@ -33,7 +33,7 @@ class _AddDoorMagneticPageState extends State { mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ - Expanded(child: Text(TranslationLoader.lanKeys.pressAndHoldTheResetButtonTwoSeconds.tr, textAlign:TextAlign.center, style: TextStyle(fontSize: 34.sp, fontWeight: FontWeight.w500),)), + Expanded(child: Text(TranslationLoader.lanKeys!.pressAndHoldTheResetButtonTwoSeconds!.tr, textAlign:TextAlign.center, style: TextStyle(fontSize: 34.sp, fontWeight: FontWeight.w500),)), ], ), ), @@ -43,12 +43,12 @@ class _AddDoorMagneticPageState extends State { Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Text(TranslationLoader.lanKeys.whenScreenFlashesClickNext.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),), + Text(TranslationLoader.lanKeys!.whenScreenFlashesClickNext!.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),), ], ), SizedBox(height: 90.h,), SubmitBtn( - btnName: TranslationLoader.lanKeys.next.tr, + btnName: TranslationLoader.lanKeys!.next!.tr, borderRadius: 10.w, fontSize: 28.sp, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w), diff --git a/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/doorMagneticList/doorMagnetic_page.dart b/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/doorMagneticList/doorMagnetic_page.dart index f821de90..59298736 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/doorMagneticList/doorMagnetic_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/doorMagneticList/doorMagnetic_page.dart @@ -11,7 +11,7 @@ import '../../../../../tools/titleAppBar.dart'; import '../../../../../translations/trans_lib.dart'; class DoorMagneticPage extends StatefulWidget { - const DoorMagneticPage({Key key}) : super(key: key); + const DoorMagneticPage({Key? key}) : super(key: key); @override State createState() => _DoorMagneticPageState(); @@ -22,7 +22,7 @@ class _DoorMagneticPageState extends State with BaseWidget { Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.doorMagnetic.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.doorMagnetic!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body: Column( children: [ Container( @@ -31,13 +31,13 @@ class _DoorMagneticPageState extends State with BaseWidget { child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text(TranslationLoader.lanKeys.doorMagneticListTopTip.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),)), + Expanded(child: Text(TranslationLoader.lanKeys!.doorMagneticListTopTip!.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),)), ], ), ), Expanded(child: _buildMainUI()), SubmitBtn( - btnName: "${TranslationLoader.lanKeys.add.tr} ${TranslationLoader.lanKeys.doorMagnetic.tr}", + btnName: "${TranslationLoader.lanKeys!.add!.tr} ${TranslationLoader.lanKeys!.doorMagnetic!.tr}", borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), @@ -62,7 +62,7 @@ class _DoorMagneticPageState extends State with BaseWidget { return emptyView(); } - Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function action){ + Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function() action){ return GestureDetector( onTap: action, child: Container( diff --git a/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/nearbyDoorMagnetic/nearbyDoorMagnetic_page.dart b/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/nearbyDoorMagnetic/nearbyDoorMagnetic_page.dart index 9f5c5e2c..13e2ef9f 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/nearbyDoorMagnetic/nearbyDoorMagnetic_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/nearbyDoorMagnetic/nearbyDoorMagnetic_page.dart @@ -8,7 +8,7 @@ import '../../../../../tools/titleAppBar.dart'; import '../../../../../translations/trans_lib.dart'; class NearbyDoorMagneticPage extends StatefulWidget { - const NearbyDoorMagneticPage({Key key}) : super(key: key); + const NearbyDoorMagneticPage({Key? key}) : super(key: key); @override State createState() => _NearbyDoorMagneticPageState(); @@ -19,7 +19,7 @@ class _NearbyDoorMagneticPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.nearbyEquipment.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.nearbyEquipment!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body: ListView.builder( itemCount:20, itemBuilder: (c, index){ @@ -31,7 +31,7 @@ class _NearbyDoorMagneticPageState extends State { ); } - Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function action){ + Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function() action){ return GestureDetector( onTap: action, child: Column( diff --git a/star_lock/lib/main/lockDetail/lcokSet/importOtherLockData/ImportOtherLockData_page.dart b/star_lock/lib/main/lockDetail/lcokSet/importOtherLockData/ImportOtherLockData_page.dart index 3acf470a..d44e60de 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/importOtherLockData/ImportOtherLockData_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/importOtherLockData/ImportOtherLockData_page.dart @@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class ImportOtherLockDataPage extends StatefulWidget { - const ImportOtherLockDataPage({Key key}) : super(key: key); + const ImportOtherLockDataPage({Key? key}) : super(key: key); @override State createState() => _ImportOtherLockDataPageState(); @@ -20,7 +20,7 @@ class _ImportOtherLockDataPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.importOtherLockData.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.importOtherLockData!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body:Container( padding: EdgeInsets.all(30.w), child: Column( @@ -28,14 +28,14 @@ class _ImportOtherLockDataPageState extends State { Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text(TranslationLoader.lanKeys.importOtherLockDataTip.tr)), + Expanded(child: Text(TranslationLoader.lanKeys!.importOtherLockDataTip!.tr)), ], ), SizedBox(height: 20.h,), _searchWidget(), SizedBox(height: 10.h,), Expanded(child: _buildMainUI()), - SubmitBtn(btnName: TranslationLoader.lanKeys.sure.tr, + SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr, borderRadius: 20.w, fontSize: 32.sp, // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), @@ -66,7 +66,7 @@ class _ImportOtherLockDataPageState extends State { //输入里面输入文字内边距设置 contentPadding: EdgeInsets.only( top: 8.h, left: -25.0.h, right: -15.0.h, bottom: 8.0.h), - hintText: TranslationLoader.lanKeys.pleaseEnter.tr, + hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr, //不需要输入框下划线 border: InputBorder.none, //左边图标设置 @@ -90,7 +90,7 @@ class _ImportOtherLockDataPageState extends State { ); } - Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function action){ + Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function() action){ return GestureDetector( onTap: action, child: Container( diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockEscalation/lockEscalation_page.dart b/star_lock/lib/main/lockDetail/lcokSet/lockEscalation/lockEscalation_page.dart index 17f9d435..dd290d2b 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/lockEscalation/lockEscalation_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/lockEscalation/lockEscalation_page.dart @@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class LockEscalationPage extends StatefulWidget { - const LockEscalationPage({Key key}) : super(key: key); + const LockEscalationPage({Key? key}) : super(key: key); @override State createState() => _LockEscalationPageState(); @@ -20,7 +20,7 @@ class _LockEscalationPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.lockEscalation.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.lockEscalation!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body:Container( padding: EdgeInsets.all(30.w), child: Column( @@ -31,15 +31,15 @@ class _LockEscalationPageState extends State { children: [ Image.asset('images/main/icon_main_lockSet_lockEscalation.png', width: 40.w, height: 40.w,), SizedBox(width: 10.w,), - Text(TranslationLoader.lanKeys.haveNewVersion.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w600),) + Text(TranslationLoader.lanKeys!.haveNewVersion!.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w600),) ], ), SizedBox(height: 30.h,), - Text("${TranslationLoader.lanKeys.currentVersion.tr}:1.0.0"), + Text("${TranslationLoader.lanKeys!.currentVersion!.tr}:1.0.0"), SizedBox(height: 10.h,), - Text("${TranslationLoader.lanKeys.newVersion.tr}:1.0.1", style: TextStyle(color: AppColors.mainColor),), + Text("${TranslationLoader.lanKeys!.newVersion!.tr}:1.0.1", style: TextStyle(color: AppColors.mainColor),), SizedBox(height: 30.h,), - SubmitBtn(btnName: TranslationLoader.lanKeys.upgrade.tr, + SubmitBtn(btnName: TranslationLoader.lanKeys!.upgrade!.tr, borderRadius: 20.w, fontSize: 32.sp, // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_page.dart b/star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_page.dart index 2ab120f2..78293a6c 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_page.dart @@ -11,7 +11,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class LockSetPage extends StatefulWidget { - const LockSetPage({Key key}) : super(key: key); + const LockSetPage({Key? key}) : super(key: key); @override State createState() => _LockSetPageState(); @@ -22,58 +22,58 @@ class _LockSetPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.set.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.set!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body:Column( children: [ Expanded( child: ListView( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.basicInformation.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.basicInformation!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){ Navigator.pushNamed(context, Routers.basicInformationPage); }), SizedBox(height: 10.h,), - CommonItem(leftTitel:TranslationLoader.lanKeys.wirelessKeyboard.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.wirelessKeyboard!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ Navigator.pushNamed(context, Routers.wirelessKeyboardPage); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.doorMagnetic.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.doorMagnetic!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){ Navigator.pushNamed(context, Routers.doorMagneticPage); }), SizedBox(height: 10.h,), - CommonItem(leftTitel:TranslationLoader.lanKeys.remoteUnlocking.tr, rightTitle:TranslationLoader.lanKeys.closed.tr, isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.remoteUnlocking!.tr, rightTitle:TranslationLoader.lanKeys!.closed!.tr, isHaveLine: true, isHaveDirection: true, action: (){ Navigator.pushNamed(context, Routers.remoteUnlockingPage); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.automaticBlocking.tr, rightTitle:"5s", isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.automaticBlocking!.tr, rightTitle:"5s", isHaveLine: true, isHaveDirection: true, action: (){ Navigator.pushNamed(context, Routers.automaticBlockingPage); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.normallyOpenMode.tr, rightTitle:TranslationLoader.lanKeys.closed.tr, isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.normallyOpenMode!.tr, rightTitle:TranslationLoader.lanKeys!.closed!.tr, isHaveLine: true, isHaveDirection: true, action: (){ Navigator.pushNamed(context, Routers.normallyOpenModePage); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.lockSound.tr, rightTitle:"高", isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.lockSound!.tr, rightTitle:"高", isHaveLine: true, isHaveDirection: true, action: (){ Navigator.pushNamed(context, Routers.lockSoundSetPage); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.burglarAlarm.tr, rightTitle:TranslationLoader.lanKeys.opened.tr, isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.burglarAlarm!.tr, rightTitle:TranslationLoader.lanKeys!.opened!.tr, isHaveLine: true, isHaveDirection: true, action: (){ Navigator.pushNamed(context, Routers.burglarAlarmPage); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.resetButton.tr, rightTitle:TranslationLoader.lanKeys.opened.tr, isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.resetButton!.tr, rightTitle:TranslationLoader.lanKeys!.opened!.tr, isHaveLine: true, isHaveDirection: true, action: (){ Navigator.pushNamed(context, Routers.resetButtonPage); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.unlockQRCode.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.unlockQRCode!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){ Navigator.pushNamed(context, Routers.unlockQRCodePage); }), SizedBox(height: 10.h,), - CommonItem(leftTitel:TranslationLoader.lanKeys.lockTime.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.lockTime!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ Navigator.pushNamed(context, Routers.lockTimePage); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.diagnose.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.diagnose!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ Navigator.pushNamed(context, Routers.diagnosePage); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.uploadData.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.uploadData!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ Navigator.pushNamed(context, Routers.uploadDataPage); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.importOtherLockData.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.importOtherLockData!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ Navigator.pushNamed(context, Routers.importOtherLockDataPage); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.lockEscalation.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.lockEscalation!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){ Navigator.pushNamed(context, Routers.lockEscalationPage); }), SizedBox(height: 10.h,), @@ -84,13 +84,13 @@ class _LockSetPageState extends State { }), SizedBox(height: 10.h,), - CommonItem(leftTitel:TranslationLoader.lanKeys.markedHouseState.tr, rightTitle:"空闲", isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.markedHouseState!.tr, rightTitle:"空闲", isHaveLine: true, isHaveDirection: true, action: (){ Navigator.pushNamed(context, Routers.markedHouseStatePage); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.checkingIn.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())), - CommonItem(leftTitel:TranslationLoader.lanKeys.unlockReminder.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())), + CommonItem(leftTitel:TranslationLoader.lanKeys!.checkingIn!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())), + CommonItem(leftTitel:TranslationLoader.lanKeys!.unlockReminder!.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())), SizedBox(height: 30.h,), - SubmitBtn(btnName: TranslationLoader.lanKeys.delete.tr, + SubmitBtn(btnName: TranslationLoader.lanKeys!.delete!.tr, borderRadius: 20.w, fontSize: 32.sp, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w), diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockSoundSet/lockSoundSet_page.dart b/star_lock/lib/main/lockDetail/lcokSet/lockSoundSet/lockSoundSet_page.dart index 3df0bf74..1b7102d3 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/lockSoundSet/lockSoundSet_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/lockSoundSet/lockSoundSet_page.dart @@ -10,7 +10,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class LockSoundSetPage extends StatefulWidget { - const LockSoundSetPage({Key key}) : super(key: key); + const LockSoundSetPage({Key? key}) : super(key: key); @override State createState() => _LockSoundSetPageState(); @@ -22,10 +22,10 @@ class _LockSoundSetPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.lockSound.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.lockSound!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body:ListView( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.lockSound.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())), + CommonItem(leftTitel:TranslationLoader.lanKeys!.lockSound!.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())), Container(height: 10.h,), Container( padding: EdgeInsets.all(30.w), @@ -33,7 +33,7 @@ class _LockSoundSetPageState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text(TranslationLoader.lanKeys.lockSoundTip.tr)), + Expanded(child: Text(TranslationLoader.lanKeys!.lockSoundTip!.tr)), ], ), ), @@ -44,36 +44,36 @@ class _LockSoundSetPageState extends State { color: Colors.white, child: Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.pleaseSeletLockVolume.tr, rightTitle:"", isHaveLine: true), - CommonItem(leftTitel:TranslationLoader.lanKeys.low.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, + CommonItem(leftTitel:TranslationLoader.lanKeys!.pleaseSeletLockVolume!.tr, rightTitle:"", isHaveLine: true), + CommonItem(leftTitel:TranslationLoader.lanKeys!.low!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: GestureDetector( onTap: (){ }, child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) ), - CommonItem(leftTitel:TranslationLoader.lanKeys.lower.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, + CommonItem(leftTitel:TranslationLoader.lanKeys!.lower!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: GestureDetector( onTap: (){ }, child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) ), - CommonItem(leftTitel:TranslationLoader.lanKeys.medium.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, + CommonItem(leftTitel:TranslationLoader.lanKeys!.medium!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: GestureDetector( onTap: (){ }, child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) ), - CommonItem(leftTitel:TranslationLoader.lanKeys.higher.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, + CommonItem(leftTitel:TranslationLoader.lanKeys!.higher!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: GestureDetector( onTap: (){ }, child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) ), - CommonItem(leftTitel:TranslationLoader.lanKeys.high.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, + CommonItem(leftTitel:TranslationLoader.lanKeys!.high!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: GestureDetector( onTap: (){ @@ -85,7 +85,7 @@ class _LockSoundSetPageState extends State { ) ), SubmitBtn( - btnName: TranslationLoader.lanKeys.save.tr, + btnName: TranslationLoader.lanKeys!.save!.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockTime/lockTime_page.dart b/star_lock/lib/main/lockDetail/lcokSet/lockTime/lockTime_page.dart index b992af54..a6b70c3b 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/lockTime/lockTime_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/lockTime/lockTime_page.dart @@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class LockTimePage extends StatefulWidget { - const LockTimePage({Key key}) : super(key: key); + const LockTimePage({Key? key}) : super(key: key); @override State createState() => _LockTimePageState(); @@ -21,7 +21,7 @@ class _LockTimePageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.lockTime.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.lockTime!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body:Container( padding: EdgeInsets.all(30.w), child: Column( @@ -34,7 +34,7 @@ class _LockTimePageState extends State { ], ), SizedBox(height: 60.h,), - SubmitBtn(btnName: TranslationLoader.lanKeys.calibrationTime.tr, + SubmitBtn(btnName: TranslationLoader.lanKeys!.calibrationTime!.tr, borderRadius: 20.w, fontSize: 32.sp, // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), @@ -49,7 +49,7 @@ class _LockTimePageState extends State { }, child: Container( - child: Text(TranslationLoader.lanKeys.setTheDSTMode.tr, style: TextStyle(fontSize: 30.sp, color: AppColors.mainColor)) + child: Text(TranslationLoader.lanKeys!.setTheDSTMode!.tr, style: TextStyle(fontSize: 30.sp, color: AppColors.mainColor)) ), ), ], diff --git a/star_lock/lib/main/lockDetail/lcokSet/markedHouseState/markedHouseState_page.dart b/star_lock/lib/main/lockDetail/lcokSet/markedHouseState/markedHouseState_page.dart index 9015519d..f36e0500 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/markedHouseState/markedHouseState_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/markedHouseState/markedHouseState_page.dart @@ -10,7 +10,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class MarkedHouseStatePage extends StatefulWidget { - const MarkedHouseStatePage({Key key}) : super(key: key); + const MarkedHouseStatePage({Key? key}) : super(key: key); @override State createState() => _MarkedHouseStatePageState(); @@ -21,18 +21,18 @@ class _MarkedHouseStatePageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.markedHouseState.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.markedHouseState!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body:Container( child: Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.leisure.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, + CommonItem(leftTitel:TranslationLoader.lanKeys!.leisure!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: GestureDetector( onTap: (){ }, child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) ), - CommonItem(leftTitel:TranslationLoader.lanKeys.checkingIn.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget: true, + CommonItem(leftTitel:TranslationLoader.lanKeys!.checkingIn!.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget: true, rightWidget: GestureDetector( onTap: (){ @@ -40,7 +40,7 @@ class _MarkedHouseStatePageState extends State { child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) ), SizedBox(height: 60.h,), - SubmitBtn(btnName: TranslationLoader.lanKeys.sure.tr, + SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr, borderRadius: 20.w, fontSize: 32.sp, // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), diff --git a/star_lock/lib/main/lockDetail/lcokSet/normallyOpenMode/normallyOpenMode_page.dart b/star_lock/lib/main/lockDetail/lcokSet/normallyOpenMode/normallyOpenMode_page.dart index 6e82540b..3962352e 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/normallyOpenMode/normallyOpenMode_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/normallyOpenMode/normallyOpenMode_page.dart @@ -10,7 +10,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class NormallyOpenModePage extends StatefulWidget { - const NormallyOpenModePage({Key key}) : super(key: key); + const NormallyOpenModePage({Key? key}) : super(key: key); @override State createState() => _NormallyOpenModePageState(); @@ -22,10 +22,10 @@ class _NormallyOpenModePageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.normallyOpenMode.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.normallyOpenMode!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body:ListView( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.normallyOpenMode.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())), + CommonItem(leftTitel:TranslationLoader.lanKeys!.normallyOpenMode!.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())), Container(height: 10.h,), Container( padding: EdgeInsets.all(30.w), @@ -33,7 +33,7 @@ class _NormallyOpenModePageState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text(TranslationLoader.lanKeys.normallyOpenModeTip.tr)), + Expanded(child: Text(TranslationLoader.lanKeys!.normallyOpenModeTip!.tr)), ], ), ), @@ -52,7 +52,7 @@ class _NormallyOpenModePageState extends State { ) ), SubmitBtn( - btnName: TranslationLoader.lanKeys.save.tr, + btnName: TranslationLoader.lanKeys!.save!.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), @@ -77,7 +77,7 @@ class _NormallyOpenModePageState extends State { height: 60.h, // color: Colors.red, padding: EdgeInsets.only(left:20.h, top: 15.h), - child: Text("${TranslationLoader.lanKeys.normallyOpen.tr} ${TranslationLoader.lanKeys.date.tr}", style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w600)) + child: Text("${TranslationLoader.lanKeys!.normallyOpen!.tr} ${TranslationLoader.lanKeys!.date!.tr}", style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w600)) ), Container( height: 90.h, @@ -102,27 +102,28 @@ class _NormallyOpenModePageState extends State { String dateStr; switch (index) { case 0: - dateStr = TranslationLoader.lanKeys.sundayShort.tr; + dateStr = TranslationLoader.lanKeys!.sundayShort!.tr; break; case 1: - dateStr = TranslationLoader.lanKeys.mondayShort.tr; + dateStr = TranslationLoader.lanKeys!.mondayShort!.tr; break; case 2: - dateStr = TranslationLoader.lanKeys.tuesdayShort.tr; + dateStr = TranslationLoader.lanKeys!.tuesdayShort!.tr; break; case 3: - dateStr = TranslationLoader.lanKeys.wednesdayShort.tr; + dateStr = TranslationLoader.lanKeys!.wednesdayShort!.tr; break; case 4: - dateStr = TranslationLoader.lanKeys.thursdayShort.tr; + dateStr = TranslationLoader.lanKeys!.thursdayShort!.tr; break; case 5: - dateStr = TranslationLoader.lanKeys.fridayShort.tr; + dateStr = TranslationLoader.lanKeys!.fridayShort!.tr; break; case 6: - dateStr = TranslationLoader.lanKeys.saturdayShort.tr; + dateStr = TranslationLoader.lanKeys!.saturdayShort!.tr; break; default: + dateStr = ""; break; } return GestureDetector( @@ -147,14 +148,14 @@ class _NormallyOpenModePageState extends State { return Column( children: [ Container(color: AppColors.mainBackgroundColor, height: 10.h,), - CommonItem(leftTitel:"${TranslationLoader.lanKeys.normallyOpen.tr} ${TranslationLoader.lanKeys.time.tr}", rightTitle:"", isHaveLine: true, isHaveRightWidget: true, + CommonItem(leftTitel:"${TranslationLoader.lanKeys!.normallyOpen!.tr} ${TranslationLoader.lanKeys!.time!.tr}", rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: GestureDetector( onTap: (){ }, child: Row( children: [ - Text(TranslationLoader.lanKeys.allDay.tr), + Text(TranslationLoader.lanKeys!.allDay!.tr), SizedBox(width: 5.w,), Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,), ], @@ -166,10 +167,10 @@ class _NormallyOpenModePageState extends State { color: Colors.white, child: Column( children: [ - CommonItem(leftTitel:"${TranslationLoader.lanKeys.begin.tr} ${TranslationLoader.lanKeys.time.tr}", rightTitle:"", isHaveDirection: true, isHaveLine: true, action:(){ + CommonItem(leftTitel:"${TranslationLoader.lanKeys!.begin!.tr} ${TranslationLoader.lanKeys!.time!.tr}", rightTitle:"", isHaveDirection: true, isHaveLine: true, action:(){ }), - CommonItem(leftTitel:"${TranslationLoader.lanKeys.end.tr} ${TranslationLoader.lanKeys.time.tr}", rightTitle:"", isHaveDirection: true, action:(){ + CommonItem(leftTitel:"${TranslationLoader.lanKeys!.end!.tr} ${TranslationLoader.lanKeys!.time!.tr}", rightTitle:"", isHaveDirection: true, action:(){ }), Container(height: 10.h), diff --git a/star_lock/lib/main/lockDetail/lcokSet/remoteUnlocking/remoteUnlocking_page.dart b/star_lock/lib/main/lockDetail/lcokSet/remoteUnlocking/remoteUnlocking_page.dart index 31c206c1..48f3bb85 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/remoteUnlocking/remoteUnlocking_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/remoteUnlocking/remoteUnlocking_page.dart @@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class RemoteUnlockingPage extends StatefulWidget { - const RemoteUnlockingPage({Key key}) : super(key: key); + const RemoteUnlockingPage({Key? key}) : super(key: key); @override State createState() => _RemoteUnlockingPageState(); @@ -20,7 +20,7 @@ class _RemoteUnlockingPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.remoteUnlocking.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.remoteUnlocking!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body:Container( padding: EdgeInsets.all(30.w), child: Column( @@ -28,18 +28,18 @@ class _RemoteUnlockingPageState extends State { Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text(TranslationLoader.lanKeys.remoteUnlockingPageTip.tr)), + Expanded(child: Text(TranslationLoader.lanKeys!.remoteUnlockingPageTip!.tr)), ], ), SizedBox(height: 20.h,), Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text("${TranslationLoader.lanKeys.currentMode.tr} : ${TranslationLoader.lanKeys.opened.tr}", style: TextStyle(fontWeight: FontWeight.w600),)), + Expanded(child: Text("${TranslationLoader.lanKeys!.currentMode!.tr} : ${TranslationLoader.lanKeys!.opened!.tr}", style: TextStyle(fontWeight: FontWeight.w600),)), ], ), SizedBox(height: 30.h,), - SubmitBtn(btnName: TranslationLoader.lanKeys.closed.tr, + SubmitBtn(btnName: TranslationLoader.lanKeys!.closed!.tr, borderRadius: 20.w, fontSize: 32.sp, // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), diff --git a/star_lock/lib/main/lockDetail/lcokSet/resetButton/resetButton_page.dart b/star_lock/lib/main/lockDetail/lcokSet/resetButton/resetButton_page.dart index 53bb0a8e..c4582299 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/resetButton/resetButton_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/resetButton/resetButton_page.dart @@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class ResetButtonPage extends StatefulWidget { - const ResetButtonPage({Key key}) : super(key: key); + const ResetButtonPage({Key? key}) : super(key: key); @override State createState() => _ResetButtonPageState(); @@ -20,7 +20,7 @@ class _ResetButtonPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.resetButton.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.resetButton!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body:Container( padding: EdgeInsets.all(30.w), child: Column( @@ -28,18 +28,18 @@ class _ResetButtonPageState extends State { Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text(TranslationLoader.lanKeys.resetButtonTip.tr)), + Expanded(child: Text(TranslationLoader.lanKeys!.resetButtonTip!.tr)), ], ), SizedBox(height: 20.h,), Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text("${TranslationLoader.lanKeys.currentMode.tr} : ${TranslationLoader.lanKeys.opened.tr}", style: TextStyle(fontWeight: FontWeight.w600),)), + Expanded(child: Text("${TranslationLoader.lanKeys!.currentMode!.tr} : ${TranslationLoader.lanKeys!.opened!.tr}", style: TextStyle(fontWeight: FontWeight.w600),)), ], ), SizedBox(height: 30.h,), - SubmitBtn(btnName: TranslationLoader.lanKeys.closed.tr, + SubmitBtn(btnName: TranslationLoader.lanKeys!.closed!.tr, borderRadius: 20.w, fontSize: 32.sp, // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), diff --git a/star_lock/lib/main/lockDetail/lcokSet/unlockQRCode/unlockQRCode_page.dart b/star_lock/lib/main/lockDetail/lcokSet/unlockQRCode/unlockQRCode_page.dart index 71454639..97ae4832 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/unlockQRCode/unlockQRCode_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/unlockQRCode/unlockQRCode_page.dart @@ -9,7 +9,7 @@ import '../../../../translations/trans_lib.dart'; import 'package:qr_flutter/qr_flutter.dart'; class UnlockQRCodePage extends StatefulWidget { - const UnlockQRCodePage({Key key}) : super(key: key); + const UnlockQRCodePage({Key? key}) : super(key: key); @override State createState() => _UnlockQRCodePageState(); @@ -20,7 +20,7 @@ class _UnlockQRCodePageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.burglarAlarm.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.burglarAlarm!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body:Column( children: [ Container( @@ -49,7 +49,7 @@ class _UnlockQRCodePageState extends State { // ), QrImage(data: 'www.baidu.com', size: 300.w), SizedBox(height: 50.w,), - SubmitBtn(btnName: TranslationLoader.lanKeys.share.tr, + SubmitBtn(btnName: TranslationLoader.lanKeys!.share!.tr, borderRadius: 20.w, fontSize: 32.sp, width: 250.w, diff --git a/star_lock/lib/main/lockDetail/lcokSet/uploadData/uploadData_page.dart b/star_lock/lib/main/lockDetail/lcokSet/uploadData/uploadData_page.dart index 4b9a277f..9a2ca115 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/uploadData/uploadData_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/uploadData/uploadData_page.dart @@ -8,7 +8,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class UploadDataPage extends StatefulWidget { - const UploadDataPage({Key key}) : super(key: key); + const UploadDataPage({Key? key}) : super(key: key); @override State createState() => _UploadDataPageState(); @@ -19,7 +19,7 @@ class _UploadDataPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.uploadData.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.uploadData!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body:Container( padding: EdgeInsets.all(30.w), child: Column( @@ -27,11 +27,11 @@ class _UploadDataPageState extends State { Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text(TranslationLoader.lanKeys.uploadDataTip.tr)), + Expanded(child: Text(TranslationLoader.lanKeys!.uploadDataTip!.tr)), ], ), SizedBox(height: 30.h,), - SubmitBtn(btnName: TranslationLoader.lanKeys.begin.tr, + SubmitBtn(btnName: TranslationLoader.lanKeys!.begin!.tr, borderRadius: 20.w, fontSize: 32.sp, // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), diff --git a/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboard/addWirelessKeyboard_page.dart b/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboard/addWirelessKeyboard_page.dart index 6d59ff5c..a1371278 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboard/addWirelessKeyboard_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboard/addWirelessKeyboard_page.dart @@ -10,7 +10,7 @@ import '../../../../../tools/titleAppBar.dart'; import '../../../../../translations/trans_lib.dart'; class AddWirelessKeyboardPage extends StatefulWidget { - const AddWirelessKeyboardPage({Key key}) : super(key: key); + const AddWirelessKeyboardPage({Key? key}) : super(key: key); @override State createState() => _AddWirelessKeyboardPageState(); @@ -22,7 +22,7 @@ class _AddWirelessKeyboardPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.add.tr} ${TranslationLoader.lanKeys.wirelessKeyboard.tr}", haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.add!.tr} ${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}", haveBack:true, backgroundColor: AppColors.mainColor), body: ListView( // mainAxisAlignment: MainAxisAlignment.center, // crossAxisAlignment: CrossAxisAlignment.center, @@ -31,7 +31,7 @@ Widget build(BuildContext context) { Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Text(TranslationLoader.lanKeys.lightTouchScreen.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),), + Text(TranslationLoader.lanKeys!.lightTouchScreen!.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),), ], ), SizedBox(height: 90.h,), @@ -40,12 +40,12 @@ Widget build(BuildContext context) { Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Text(TranslationLoader.lanKeys.whenScreenFlashesClickNext.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),), + Text(TranslationLoader.lanKeys!.whenScreenFlashesClickNext!.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),), ], ), SizedBox(height: 90.h,), SubmitBtn( - btnName: TranslationLoader.lanKeys.next.tr, + btnName: TranslationLoader.lanKeys!.next!.tr, borderRadius: 10.w, fontSize: 28.sp, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w), @@ -56,7 +56,7 @@ Widget build(BuildContext context) { ), // SizedBox(height: 20.h,), SubmitBtn( - btnName:TranslationLoader.lanKeys.theScreenNeverFlickered.tr, + btnName:TranslationLoader.lanKeys!.theScreenNeverFlickered!.tr, borderRadius: 10.w, fontSize: 28.sp, margin: EdgeInsets.only(left: 30.w, right: 30.w), diff --git a/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboardScreenNotLightOn/addWirelessKeyboardScreenNotLightOn_page.dart b/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboardScreenNotLightOn/addWirelessKeyboardScreenNotLightOn_page.dart index 359e7795..bcb4d1e9 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboardScreenNotLightOn/addWirelessKeyboardScreenNotLightOn_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboardScreenNotLightOn/addWirelessKeyboardScreenNotLightOn_page.dart @@ -10,7 +10,7 @@ import '../../../../../tools/titleAppBar.dart'; import '../../../../../translations/trans_lib.dart'; class AddWirelessKeyboardScreenNotLightOnPage extends StatefulWidget { - const AddWirelessKeyboardScreenNotLightOnPage({Key key}) : super(key: key); + const AddWirelessKeyboardScreenNotLightOnPage({Key? key}) : super(key: key); @override State createState() => _AddWirelessKeyboardScreenNotLightOnPageState(); @@ -22,7 +22,7 @@ class _AddWirelessKeyboardScreenNotLightOnPageState extends State createState() => _SeletWirelessKeyboardPageState(); @@ -19,7 +19,7 @@ class _SeletWirelessKeyboardPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.selet.tr} ${TranslationLoader.lanKeys.wirelessKeyboard.tr}", haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.selet!.tr} ${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}", haveBack:true, backgroundColor: AppColors.mainColor), body: ListView.builder( itemCount:20, itemBuilder: (c, index){ @@ -31,7 +31,7 @@ class _SeletWirelessKeyboardPageState extends State { ); } - Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function action){ + Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function() action){ return GestureDetector( onTap: action, child: Column( diff --git a/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/wirelessKeyboardList/wirelessKeyboard_page.dart b/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/wirelessKeyboardList/wirelessKeyboard_page.dart index af5f56a4..791b7523 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/wirelessKeyboardList/wirelessKeyboard_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/wirelessKeyboardList/wirelessKeyboard_page.dart @@ -10,7 +10,7 @@ import '../../../../../tools/titleAppBar.dart'; import '../../../../../translations/trans_lib.dart'; class WirelessKeyboardPage extends StatefulWidget { - const WirelessKeyboardPage({Key key}) : super(key: key); + const WirelessKeyboardPage({Key? key}) : super(key: key); @override State createState() => _WirelessKeyboardPageState(); @@ -21,9 +21,9 @@ class _WirelessKeyboardPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.wirelessKeyboard.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.wirelessKeyboard!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ TextButton( - child: Text(TranslationLoader.lanKeys.reset.tr, style: const TextStyle(color: Colors.white),), + child: Text(TranslationLoader.lanKeys!.reset!.tr, style: const TextStyle(color: Colors.white),), onPressed: (){ },), @@ -32,7 +32,7 @@ class _WirelessKeyboardPageState extends State { children: [ Expanded(child: _buildMainUI()), SubmitBtn( - btnName: "${TranslationLoader.lanKeys.add.tr} ${TranslationLoader.lanKeys.wirelessKeyboard.tr}", + btnName: "${TranslationLoader.lanKeys!.add!.tr} ${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}", borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), @@ -56,7 +56,7 @@ class _WirelessKeyboardPageState extends State { ); } - Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function action){ + Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function() action){ return GestureDetector( onTap: action, child: Container( diff --git a/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart b/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart index f5bf3551..51050a2c 100644 --- a/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart +++ b/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart @@ -9,7 +9,7 @@ import '../../../tools/titleAppBar.dart'; import '../../../translations/trans_lib.dart'; class LockDetailPage extends StatefulWidget { - const LockDetailPage({Key key}) : super(key: key); + const LockDetailPage({Key? key}) : super(key: key); @override State createState() => _LockDetailPageState(); @@ -20,7 +20,7 @@ class _LockDetailPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.starLock.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.starLock!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body: Column( children: [ topWidget(), @@ -70,7 +70,7 @@ class _LockDetailPageState extends State { Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Text(TranslationLoader.lanKeys.clickUnlockAndHoldDownClose.tr, style: TextStyle(fontSize: 28.sp, color: const Color(0xFFB3B3B3), fontWeight: FontWeight.w500),), + Text(TranslationLoader.lanKeys!.clickUnlockAndHoldDownClose!.tr, style: TextStyle(fontSize: 28.sp, color: const Color(0xFFB3B3B3), fontWeight: FontWeight.w500),), ], ), SizedBox(height: 40.h,), @@ -91,31 +91,31 @@ class _LockDetailPageState extends State { mainAxisSpacing: 10.h, physics: const NeverScrollableScrollPhysics(), children: [ - bottomItem('images/main/icon_main_clockingIn.png', TranslationLoader.lanKeys.checkingIn.tr, (){ + bottomItem('images/main/icon_main_clockingIn.png', TranslationLoader.lanKeys!.checkingIn!.tr, (){ Navigator.pushNamed(context, Routers.checkingInListPage); }), - bottomItem('images/main/icon_main_electronicKey.png', TranslationLoader.lanKeys.electronicKey.tr, (){ + bottomItem('images/main/icon_main_electronicKey.png', TranslationLoader.lanKeys!.electronicKey!.tr, (){ Navigator.pushNamed(context, Routers.electronicKeyListPage); }), - bottomItem('images/main/icon_main_password.png', TranslationLoader.lanKeys.password.tr, (){ + bottomItem('images/main/icon_main_password.png', TranslationLoader.lanKeys!.password!.tr, (){ Navigator.pushNamed(context, Routers.passwordKeyListPage); }), - bottomItem('images/main/icon_main_icCard.png', TranslationLoader.lanKeys.card.tr, (){ + bottomItem('images/main/icon_main_icCard.png', TranslationLoader.lanKeys!.card!.tr, (){ Navigator.pushNamed(context, Routers.otherTypeKeyListPage, arguments: 0); }), - bottomItem('images/main/icon_main_fingerprint.png', TranslationLoader.lanKeys.fingerprint.tr, (){ + bottomItem('images/main/icon_main_fingerprint.png', TranslationLoader.lanKeys!.fingerprint!.tr, (){ Navigator.pushNamed(context, Routers.otherTypeKeyListPage, arguments: 1); }), - bottomItem('images/main/icon_main_remoteControl.png', TranslationLoader.lanKeys.remoteControl.tr, (){ + bottomItem('images/main/icon_main_remoteControl.png', TranslationLoader.lanKeys!.remoteControl!.tr, (){ Navigator.pushNamed(context, Routers.otherTypeKeyListPage, arguments: 2); }), - bottomItem('images/main/icon_main_authorizedAdmin.png', TranslationLoader.lanKeys.authorizedAdmin.tr, (){ + bottomItem('images/main/icon_main_authorizedAdmin.png', TranslationLoader.lanKeys!.authorizedAdmin!.tr, (){ Navigator.pushNamed(context, Routers.authorizedAdminListPage); }), - bottomItem('images/main/icon_main_operatingRecord.png', TranslationLoader.lanKeys.operatingRecord.tr, (){ + bottomItem('images/main/icon_main_operatingRecord.png', TranslationLoader.lanKeys!.operatingRecord!.tr, (){ Navigator.pushNamed(context, Routers.lockOperatingRecordPage); }), - bottomItem('images/main/icon_main_set.png', TranslationLoader.lanKeys.set.tr, (){ + bottomItem('images/main/icon_main_set.png', TranslationLoader.lanKeys!.set!.tr, (){ Navigator.pushNamed(context, Routers.lockSetPage); }), ], @@ -124,7 +124,7 @@ class _LockDetailPageState extends State { ); } - Widget bottomItem(String iconUrl,String name, Function onClick){ + Widget bottomItem(String iconUrl,String name, Function() onClick){ var width = 65.w; var height = 70.h; return GestureDetector( diff --git a/star_lock/lib/main/lockDetail/lockOperatingRecord/lockOperatingRecord_page.dart b/star_lock/lib/main/lockDetail/lockOperatingRecord/lockOperatingRecord_page.dart index 8521bd2a..629f1de1 100644 --- a/star_lock/lib/main/lockDetail/lockOperatingRecord/lockOperatingRecord_page.dart +++ b/star_lock/lib/main/lockDetail/lockOperatingRecord/lockOperatingRecord_page.dart @@ -9,7 +9,7 @@ import '../../../tools/titleAppBar.dart'; import '../../../translations/trans_lib.dart'; class LockOperatingRecordPage extends StatefulWidget { - const LockOperatingRecordPage({Key key}) : super(key: key); + const LockOperatingRecordPage({Key? key}) : super(key: key); @override State createState() => _LockOperatingRecordPageState(); @@ -20,7 +20,7 @@ class _LockOperatingRecordPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle:TranslationLoader.lanKeys.operatingRecord.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ + appBar: TitleAppBar(barTitle:TranslationLoader.lanKeys!.operatingRecord!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ TextButton( child: const Text("操作", style: TextStyle(color: Colors.white),), onPressed: (){ @@ -42,7 +42,7 @@ class _LockOperatingRecordPageState extends State { Container( // crossAxisAlignment: CrossAxisAlignment.start, padding: EdgeInsets.all(20.h), - child: Text(TranslationLoader.lanKeys.lockOperatingRecordTip.tr, textAlign: TextAlign.start,), + child: Text(TranslationLoader.lanKeys!.lockOperatingRecordTip!.tr, textAlign: TextAlign.start,), ), _searchWidget(), Expanded(child: _buildMainUI()), @@ -67,7 +67,7 @@ class _LockOperatingRecordPageState extends State { //输入里面输入文字内边距设置 contentPadding: const EdgeInsets.only( top: 12.0, left: -22.0, right: -15.0, bottom: 10.0), - hintText: TranslationLoader.lanKeys.pleaseEnter.tr, + hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr, hintStyle: TextStyle(fontSize: 28.sp), //不需要输入框下划线 border: InputBorder.none, @@ -109,7 +109,7 @@ class _LockOperatingRecordPageState extends State { ); } - Widget _operatingRecordItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function action){ + Widget _operatingRecordItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function() action){ return GestureDetector( onTap: action, child: Container( diff --git a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeAddKey/otherTypeAddKey_page.dart b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeAddKey/otherTypeAddKey_page.dart index f63c8e33..f791edb4 100644 --- a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeAddKey/otherTypeAddKey_page.dart +++ b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeAddKey/otherTypeAddKey_page.dart @@ -10,7 +10,7 @@ import '../../../../translations/trans_lib.dart'; class OtherTypeAddKeyPage extends StatefulWidget { final String seletType; final int lockType; - const OtherTypeAddKeyPage({Key key, @required this.seletType, @required this.lockType}) : super(key: key); + const OtherTypeAddKeyPage({Key? key, required this.seletType, required this.lockType}) : super(key: key); @override State createState() => _OtherTypeAddKeyPageState(); @@ -33,31 +33,29 @@ class _OtherTypeAddKeyPageState extends State { // return sendElectronicKeySucceed(); return Column( children: [ - perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseEnter.tr, _controller), + perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseEnter!.tr, _controller), keyBottomWidget() ], ); } - break; case 1: { // 限时 return Column( children: [ - perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseEnter.tr, _controller), + perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseEnter!.tr, _controller), keyTimeLimitWidget(), keyBottomWidget() ], ); } - break; case 2: { // 循环 return Column( children: [ - perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseEnter.tr, _controller), - CommonItem(leftTitel:TranslationLoader.lanKeys.failureTime.tr, rightTitle:"", isHaveDirection: true, action:(){ + perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseEnter!.tr, _controller), + CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"", isHaveDirection: true, action:(){ // _showDatePicker(); }), keyBottomWidget() @@ -66,7 +64,7 @@ class _OtherTypeAddKeyPageState extends State { } break; default: - break; + return Container(); } } @@ -85,10 +83,10 @@ class _OtherTypeAddKeyPageState extends State { Widget keyTimeLimitWidget(){ return Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true, isHaveDirection: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true, isHaveDirection: true, action:(){ // _showDatePicker(); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.failureTime.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, action:(){ // _showDatePicker(); }), Container(height: 10.h), @@ -108,7 +106,7 @@ class _OtherTypeAddKeyPageState extends State { // ], // ), // ), - SubmitBtn(btnName: '${TranslationLoader.lanKeys.getTip.tr} ${getAppBarTitle(widget.lockType)}', borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), + SubmitBtn(btnName: '${TranslationLoader.lanKeys!.getTip!.tr} ${getAppBarTitle(widget.lockType)}', borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){ } @@ -154,15 +152,16 @@ class _OtherTypeAddKeyPageState extends State { String title; switch (type) { case 0: - title = TranslationLoader.lanKeys.card.tr; + title = TranslationLoader.lanKeys!.card!.tr; break; case 1: - title = TranslationLoader.lanKeys.fingerprint.tr; + title = TranslationLoader.lanKeys!.fingerprint!.tr; break; case 2: - title = TranslationLoader.lanKeys.remoteControl.tr; + title = TranslationLoader.lanKeys!.remoteControl!.tr; break; default: + title = ""; break; } return title; diff --git a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyDetail/otherTypeKeyDetail_page.dart b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyDetail/otherTypeKeyDetail_page.dart index 43b5f48c..0a37848f 100644 --- a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyDetail/otherTypeKeyDetail_page.dart +++ b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyDetail/otherTypeKeyDetail_page.dart @@ -11,7 +11,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class OtherTypeKeyDetailPage extends StatefulWidget { - const OtherTypeKeyDetailPage({Key key}) : super(key: key); + const OtherTypeKeyDetailPage({Key? key}) : super(key: key); @override State createState() => _OtherTypeKeyDetailPageState(); @@ -20,42 +20,42 @@ class OtherTypeKeyDetailPage extends StatefulWidget { class _OtherTypeKeyDetailPageState extends State { @override Widget build(BuildContext context) { - var type = ModalRoute.of(context)?.settings?.arguments; + var type = ModalRoute.of(context)?.settings.arguments as int; return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: "${getAppBarTitle(type)}${TranslationLoader.lanKeys.number.tr}", haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ + appBar: TitleAppBar(barTitle: "${getAppBarTitle(type)}${TranslationLoader.lanKeys!.number!.tr}", haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ TextButton( - child: Text(TranslationLoader.lanKeys.share.tr, style: const TextStyle(color: Colors.white),), + child: Text(TranslationLoader.lanKeys!.share!.tr, style: const TextStyle(color: Colors.white),), onPressed: (){ },), ],), body: Column( children: [ - CommonItem(leftTitel:"${getAppBarTitle(type)}${TranslationLoader.lanKeys.number.tr}", rightTitle:"98765432", isHaveDirection: true, isHaveLine: true, action:(){ + CommonItem(leftTitel:"${getAppBarTitle(type)}${TranslationLoader.lanKeys!.number!.tr}", rightTitle:"98765432", isHaveDirection: true, isHaveLine: true, action:(){ showCupertinoAlertDialog(context); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.name.tr, rightTitle:"你好", isHaveDirection: true, isHaveLine: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.name!.tr, rightTitle:"你好", isHaveDirection: true, isHaveLine: true, action:(){ showCupertinoAlertDialog(context); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.periodValidity.tr, rightTitle:"永久", isHaveDirection: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.periodValidity!.tr, rightTitle:"永久", isHaveDirection: true, action:(){ Navigator.pushNamed(context, Routers.electronicKeyDetailChangeDate); }), Container(height: 10.h), - CommonItem(leftTitel:TranslationLoader.lanKeys.additive.tr, rightTitle:"15080825640", action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.additive!.tr, rightTitle:"15080825640", action:(){ }), - CommonItem(leftTitel:TranslationLoader.lanKeys.addTime.tr, rightTitle:"2020.06.21 11:49", action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.addTime!.tr, rightTitle:"2020.06.21 11:49", action:(){ }), Container(height: 10.h), - CommonItem(leftTitel:TranslationLoader.lanKeys.operatingRecord.tr, rightTitle:"", isHaveDirection: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.operatingRecord!.tr, rightTitle:"", isHaveDirection: true, action:(){ }), Container(height: 40.h), SubmitBtn( - btnName: TranslationLoader.lanKeys.delete.tr, + btnName: TranslationLoader.lanKeys!.delete!.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), @@ -69,16 +69,16 @@ class _OtherTypeKeyDetailPageState extends State { } String getAppBarTitle(int type){ - String title; + String title = ""; switch (type) { case 0: - title = TranslationLoader.lanKeys.card.tr; + title = TranslationLoader.lanKeys!.card!.tr; break; case 1: - title = TranslationLoader.lanKeys.fingerprint.tr; + title = TranslationLoader.lanKeys!.fingerprint!.tr; break; case 2: - title = TranslationLoader.lanKeys.remoteControl.tr; + title = TranslationLoader.lanKeys!.remoteControl!.tr; break; default: break; @@ -86,7 +86,7 @@ class _OtherTypeKeyDetailPageState extends State { return title; } - Widget commonItem(String leftTitle, String rightTitle, {bool isHaveDirection = false, bool isHaveLine = false, bool isHaveRightWidget = false, Widget rightWidget,Function action}){ + Widget commonItem(String leftTitle, String rightTitle, {bool isHaveDirection = false, bool isHaveLine = false, bool isHaveRightWidget = false, Widget? rightWidget, Function()? action}){ return GestureDetector( onTap: action, child: Column( @@ -105,7 +105,7 @@ class _OtherTypeKeyDetailPageState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.end, children: [ - isHaveRightWidget?rightWidget:Text(rightTitle, textAlign: TextAlign.end,style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),) + isHaveRightWidget?rightWidget!:Text(rightTitle, textAlign: TextAlign.end,style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),) ], ), ), diff --git a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyList/otherTypeKeyList_page.dart b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyList/otherTypeKeyList_page.dart index 25767677..5b31d911 100644 --- a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyList/otherTypeKeyList_page.dart +++ b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyList/otherTypeKeyList_page.dart @@ -10,7 +10,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class OtherTypeKeyListPage extends StatefulWidget { - const OtherTypeKeyListPage({Key key}) : super(key: key); + const OtherTypeKeyListPage({Key? key}) : super(key: key); @override State createState() => _OtherTypeKeyListPageState(); @@ -20,12 +20,12 @@ class _OtherTypeKeyListPageState extends State { @override Widget build(BuildContext context) { - var type = ModalRoute.of(context)?.settings?.arguments; + var type = ModalRoute.of(context)?.settings.arguments as int; return Scaffold( backgroundColor: AppColors.mainBackgroundColor, appBar: TitleAppBar(barTitle: getAppBarTitle(type), haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ TextButton( - child: Text(TranslationLoader.lanKeys.reset.tr, style: const TextStyle(color: Colors.white),), + child: Text(TranslationLoader.lanKeys!.reset!.tr, style: const TextStyle(color: Colors.white),), onPressed: (){ },), @@ -35,7 +35,7 @@ class _OtherTypeKeyListPageState extends State { _searchWidget(), Expanded(child: _buildMainUI(type)), SubmitBtn( - btnName: '${TranslationLoader.lanKeys.getTip.tr} ${getAppBarTitle(type)}', + btnName: '${TranslationLoader.lanKeys!.getTip!.tr} ${getAppBarTitle(type)}', borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), @@ -49,16 +49,16 @@ class _OtherTypeKeyListPageState extends State { } String getAppBarTitle(int type){ - String title; + String title = ""; switch (type) { case 0: - title = TranslationLoader.lanKeys.card.tr; + title = TranslationLoader.lanKeys!.card!.tr; break; case 1: - title = TranslationLoader.lanKeys.fingerprint.tr; + title = TranslationLoader.lanKeys!.fingerprint!.tr; break; case 2: - title = TranslationLoader.lanKeys.remoteControl.tr; + title = TranslationLoader.lanKeys!.remoteControl!.tr; break; default: break; @@ -82,7 +82,7 @@ class _OtherTypeKeyListPageState extends State { //输入里面输入文字内边距设置 contentPadding: const EdgeInsets.only( top: 12.0, left: -19.0, right: -15.0, bottom: 8.0), - hintText: TranslationLoader.lanKeys.pleaseEnter.tr, + hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr, //不需要输入框下划线 border: InputBorder.none, //左边图标设置 @@ -106,7 +106,7 @@ class _OtherTypeKeyListPageState extends State { ); } - Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function action){ + Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function() action){ return GestureDetector( onTap: action, child: Container( diff --git a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyManage/otherTypeKeyManage_page.dart b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyManage/otherTypeKeyManage_page.dart index 1c9fccde..0d0871f3 100644 --- a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyManage/otherTypeKeyManage_page.dart +++ b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyManage/otherTypeKeyManage_page.dart @@ -7,7 +7,7 @@ import '../../../../translations/trans_lib.dart'; import 'otherTypeKeyManage_tabbar.dart'; class OtherTypeKeyManagePage extends StatefulWidget { - const OtherTypeKeyManagePage({Key key}) : super(key: key); + const OtherTypeKeyManagePage({Key? key}) : super(key: key); @override State createState() => _OtherTypeKeyManagePageState(); @@ -18,10 +18,10 @@ class _OtherTypeKeyManagePageState extends State { @override Widget build(BuildContext context) { - var lockType = ModalRoute.of(context)?.settings?.arguments; + var lockType = ModalRoute.of(context)?.settings.arguments as int; return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.addTip.tr} ${getAppBarTitle(lockType)}", haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.addTip!.tr} ${getAppBarTitle(lockType)}", haveBack:true, backgroundColor: AppColors.mainColor), body: Column( children: [ OtherTypeKeyManageTabbar(initialIndex: index, lockType: lockType), @@ -31,16 +31,16 @@ class _OtherTypeKeyManagePageState extends State { } String getAppBarTitle(int type){ - String title; + String title = ""; switch (type) { case 0: - title = TranslationLoader.lanKeys.card.tr; + title = TranslationLoader.lanKeys!.card!.tr; break; case 1: - title = TranslationLoader.lanKeys.fingerprint.tr; + title = TranslationLoader.lanKeys!.fingerprint!.tr; break; case 2: - title = TranslationLoader.lanKeys.remoteControl.tr; + title = TranslationLoader.lanKeys!.remoteControl!.tr; break; default: break; diff --git a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyManage/otherTypeKeyManage_tabbar.dart b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyManage/otherTypeKeyManage_tabbar.dart index 1dbcc2ec..548517cb 100644 --- a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyManage/otherTypeKeyManage_tabbar.dart +++ b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyManage/otherTypeKeyManage_tabbar.dart @@ -10,19 +10,19 @@ import '../otherTypeAddKey/otherTypeAddKey_page.dart'; class OtherTypeKeyManageTabbar extends StatefulWidget { var initialIndex=1; var lockType=0; - OtherTypeKeyManageTabbar({Key key, @required this.initialIndex, @required this.lockType}) : super(key: key); + OtherTypeKeyManageTabbar({Key? key, required this.initialIndex, required this.lockType}) : super(key: key); @override State createState() => _OtherTypeKeyManageTabbarState(); } class _OtherTypeKeyManageTabbarState extends State with SingleTickerProviderStateMixin { - TabController _tabController; + late TabController _tabController; final List _itemTabs = [ - ItemView(title: TranslationLoader.lanKeys.permanent.tr, seletType: "0"), - ItemView(title: TranslationLoader.lanKeys.timeLimit.tr, seletType: "1"), - ItemView(title: TranslationLoader.lanKeys.circulation.tr, seletType: "2"), + ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, seletType: "0"), + ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, seletType: "1"), + ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, seletType: "2"), ]; @override @@ -74,7 +74,7 @@ class _OtherTypeKeyManageTabbarState extends State wit } class ItemView { - const ItemView({@required this.title, @required this.seletType}); + const ItemView({required this.title, required this.seletType}); final String title; final String seletType; diff --git a/star_lock/lib/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_page.dart b/star_lock/lib/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_page.dart index 511edd58..fa178d0c 100644 --- a/star_lock/lib/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_page.dart +++ b/star_lock/lib/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_page.dart @@ -11,7 +11,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class PasswordKeyDetailPage extends StatefulWidget { - const PasswordKeyDetailPage({Key key}) : super(key: key); + const PasswordKeyDetailPage({Key? key}) : super(key: key); @override State createState() => _PasswordKeyDetailPageState(); @@ -22,7 +22,7 @@ class _PasswordKeyDetailPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.passwordDetail.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.passwordDetail!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ TextButton( child: const Text("分享", style: TextStyle(color: Colors.white),), onPressed: (){ @@ -31,29 +31,29 @@ class _PasswordKeyDetailPageState extends State { ],), body: Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.password.tr, rightTitle:"98765432", isHaveDirection: true, isHaveLine: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.password!.tr, rightTitle:"98765432", isHaveDirection: true, isHaveLine: true, action:(){ showCupertinoAlertDialog(context); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.name.tr, rightTitle:"你好", isHaveDirection: true, isHaveLine: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.name!.tr, rightTitle:"你好", isHaveDirection: true, isHaveLine: true, action:(){ showCupertinoAlertDialog(context); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"永久", isHaveDirection: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"永久", isHaveDirection: true, action:(){ Navigator.pushNamed(context, Routers.electronicKeyDetailChangeDate); }), Container(height: 10.h), - CommonItem(leftTitel:TranslationLoader.lanKeys.sender.tr, rightTitle:"15080825640", action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.sender!.tr, rightTitle:"15080825640", action:(){ }), - CommonItem(leftTitel:TranslationLoader.lanKeys.senderTime.tr, rightTitle:"2020.06.21 11:49", action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.senderTime!.tr, rightTitle:"2020.06.21 11:49", action:(){ }), Container(height: 10.h), - CommonItem(leftTitel:TranslationLoader.lanKeys.operatingRecord.tr, rightTitle:"", isHaveDirection: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.operatingRecord!.tr, rightTitle:"", isHaveDirection: true, action:(){ }), Container(height: 40.h), SubmitBtn( - btnName: TranslationLoader.lanKeys.delete.tr, + btnName: TranslationLoader.lanKeys!.delete!.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), @@ -66,7 +66,7 @@ class _PasswordKeyDetailPageState extends State { ); } - Widget commonItem(String leftTitle, String rightTitle, {bool isHaveDirection = false, bool isHaveLine = false, bool isHaveRightWidget = false, Widget rightWidget,Function action}){ + Widget commonItem(String leftTitle, String rightTitle, {bool isHaveDirection = false, bool isHaveLine = false, bool isHaveRightWidget = false, Widget? rightWidget, Function()? action}){ return GestureDetector( onTap: action, child: Column( @@ -85,7 +85,7 @@ class _PasswordKeyDetailPageState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.end, children: [ - isHaveRightWidget?rightWidget:Text(rightTitle, textAlign: TextAlign.end,style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),) + isHaveRightWidget?rightWidget!:Text(rightTitle, textAlign: TextAlign.end,style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),) ], ), ), @@ -108,7 +108,7 @@ class _PasswordKeyDetailPageState extends State { return Card( color: const Color(0x00FFFFFF), child: CupertinoAlertDialog( - title: Text("${TranslationLoader.lanKeys.amend.tr} ${TranslationLoader.lanKeys.password.tr}"), + title: Text("${TranslationLoader.lanKeys!.amend!.tr} ${TranslationLoader.lanKeys!.password!.tr}"), content: Column( children: [ const SizedBox(height: 10,), @@ -125,7 +125,7 @@ class _PasswordKeyDetailPageState extends State { //输入里面输入文字内边距设置 // contentPadding: const EdgeInsets.only( // top: 12.0, left: -19.0, right: -15.0, bottom: 8.0), - hintText: TranslationLoader.lanKeys.pleaseEnter.tr, + hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr, //不需要输入框下划线 border: InputBorder.none, //左边图标设置 @@ -153,14 +153,14 @@ class _PasswordKeyDetailPageState extends State { ), actions: [ CupertinoDialogAction( - child: Text(TranslationLoader.lanKeys.cancel.tr), + child: Text(TranslationLoader.lanKeys!.cancel!.tr), onPressed: () { Navigator.pop(context); // print("取消"); }, ), CupertinoDialogAction( - child: Text(TranslationLoader.lanKeys.sure.tr), + child: Text(TranslationLoader.lanKeys!.sure!.tr), onPressed: () { Navigator.pop(context); // print("确定"); diff --git a/star_lock/lib/main/lockDetail/passwordKey/passwordKeyList/passwordKeyList_page.dart b/star_lock/lib/main/lockDetail/passwordKey/passwordKeyList/passwordKeyList_page.dart index bac698bc..fe3ecb2b 100644 --- a/star_lock/lib/main/lockDetail/passwordKey/passwordKeyList/passwordKeyList_page.dart +++ b/star_lock/lib/main/lockDetail/passwordKey/passwordKeyList/passwordKeyList_page.dart @@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class PasswordKeyListPage extends StatefulWidget { - const PasswordKeyListPage({Key key}) : super(key: key); + const PasswordKeyListPage({Key? key}) : super(key: key); @override State createState() => _PasswordKeyListPageState(); @@ -20,9 +20,9 @@ class _PasswordKeyListPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.password.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.password!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ TextButton( - child: Text(TranslationLoader.lanKeys.reset.tr, style: TextStyle(color: Colors.white),), + child: Text(TranslationLoader.lanKeys!.reset!.tr, style: const TextStyle(color: Colors.white),), onPressed: (){ },), @@ -32,7 +32,7 @@ class _PasswordKeyListPageState extends State { _searchWidget(), Expanded(child: _buildMainUI()), SubmitBtn( - btnName: TranslationLoader.lanKeys.getPassword.tr, + btnName: TranslationLoader.lanKeys!.getPassword!.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), @@ -61,7 +61,7 @@ class _PasswordKeyListPageState extends State { //输入里面输入文字内边距设置 contentPadding: const EdgeInsets.only( top: 12.0, left: -19.0, right: -15.0, bottom: 8.0), - hintText: TranslationLoader.lanKeys.pleaseEnter.tr, + hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr, //不需要输入框下划线 border: InputBorder.none, //左边图标设置 @@ -85,7 +85,7 @@ class _PasswordKeyListPageState extends State { ); } - Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function action){ + Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function()? action){ return GestureDetector( onTap: action, child: Container( diff --git a/star_lock/lib/main/lockDetail/passwordKey/passwordKeyManage/passwordKeyManage_page.dart b/star_lock/lib/main/lockDetail/passwordKey/passwordKeyManage/passwordKeyManage_page.dart index 59c56bfc..d2b15e55 100644 --- a/star_lock/lib/main/lockDetail/passwordKey/passwordKeyManage/passwordKeyManage_page.dart +++ b/star_lock/lib/main/lockDetail/passwordKey/passwordKeyManage/passwordKeyManage_page.dart @@ -8,7 +8,7 @@ import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; class PasswordKeyManagePage extends StatefulWidget { - const PasswordKeyManagePage({Key key}) : super(key: key); + const PasswordKeyManagePage({Key? key}) : super(key: key); @override State createState() => _PasswordKeyManagePageState(); @@ -21,7 +21,7 @@ class _PasswordKeyManagePageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.getPassword.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.getPassword!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body: Column( children: [ PasswordKeyManageTabbarPage(initialIndex: index,), diff --git a/star_lock/lib/main/lockDetail/passwordKey/passwordKeyManage/passwordKeyManage_tabbar.dart b/star_lock/lib/main/lockDetail/passwordKey/passwordKeyManage/passwordKeyManage_tabbar.dart index 1741aa6b..0b1f8b16 100644 --- a/star_lock/lib/main/lockDetail/passwordKey/passwordKeyManage/passwordKeyManage_tabbar.dart +++ b/star_lock/lib/main/lockDetail/passwordKey/passwordKeyManage/passwordKeyManage_tabbar.dart @@ -10,21 +10,21 @@ import '../passwordKey_Perpetual/passwordKey_perpetual_page.dart'; class PasswordKeyManageTabbarPage extends StatefulWidget { var initialIndex=1; - PasswordKeyManageTabbarPage({Key key, @required this.initialIndex}) : super(key: key); + PasswordKeyManageTabbarPage({Key? key, required this.initialIndex}) : super(key: key); @override State createState() => _PasswordKeyManageTabbarPageState(); } class _PasswordKeyManageTabbarPageState extends State with SingleTickerProviderStateMixin { - TabController _tabController; + late TabController _tabController; final List _itemTabs = [ - ItemView(title: TranslationLoader.lanKeys.permanent.tr, type: "0"), - ItemView(title: TranslationLoader.lanKeys.timeLimit.tr, type: "1"), - ItemView(title: TranslationLoader.lanKeys.once.tr, type: "2"), - ItemView(title: TranslationLoader.lanKeys.custom.tr, type: "3"), - ItemView(title: TranslationLoader.lanKeys.circulation.tr, type: "4"), - ItemView(title: TranslationLoader.lanKeys.clearAll.tr, type: "5"), + ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: "0"), + ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: "1"), + ItemView(title: TranslationLoader.lanKeys!.once!.tr, type: "2"), + ItemView(title: TranslationLoader.lanKeys!.custom!.tr, type: "3"), + ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, type: "4"), + ItemView(title: TranslationLoader.lanKeys!.clearAll!.tr, type: "5"), ]; @override @@ -84,7 +84,7 @@ class _PasswordKeyManageTabbarPageState extends State createState() => _PasswordKeyPerpetualPageState(); } @@ -40,8 +40,8 @@ class _PasswordKeyPerpetualPageState extends State { // return sendElectronicKeySucceed(); return Column( children: [ - perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseNameYourPassword.tr, _controller), - keyBottomWidget(TranslationLoader.lanKeys.getPasswordTip1.tr) + perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, _controller), + keyBottomWidget(TranslationLoader.lanKeys!.getPasswordTip1!.tr) ], ); } @@ -52,8 +52,8 @@ class _PasswordKeyPerpetualPageState extends State { return Column( children: [ keyTimeLimitWidget(), - perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseNameYourPassword.tr, _controller), - keyBottomWidget(TranslationLoader.lanKeys.getPasswordTip2.tr) + perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, _controller), + keyBottomWidget(TranslationLoader.lanKeys!.getPasswordTip2!.tr) ], ); } @@ -63,8 +63,8 @@ class _PasswordKeyPerpetualPageState extends State { // 单次 return Column( children: [ - perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseNameYourPassword.tr, _controller), - keyBottomWidget(TranslationLoader.lanKeys.getPasswordTip3.tr) + perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, _controller), + keyBottomWidget(TranslationLoader.lanKeys!.getPasswordTip3!.tr) ], ); } @@ -75,9 +75,9 @@ class _PasswordKeyPerpetualPageState extends State { return Column( children: [ keyIfPerpetualWidget(), - perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseNameYourPassword.tr, _controller), - perpetualKeyWidget(TranslationLoader.lanKeys.password.tr, "请输入6-9位数字", _controller), - keyBottomWidget(TranslationLoader.lanKeys.getPasswordTip4.tr) + perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, _controller), + perpetualKeyWidget(TranslationLoader.lanKeys!.password!.tr, "请输入6-9位数字", _controller), + keyBottomWidget(TranslationLoader.lanKeys!.getPasswordTip4!.tr) ], ); } @@ -88,8 +88,8 @@ class _PasswordKeyPerpetualPageState extends State { return Column( children: [ keyCirculationWidget(), - perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseNameYourPassword.tr, _controller), - keyBottomWidget(TranslationLoader.lanKeys.getPasswordTip5.tr) + perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, _controller), + keyBottomWidget(TranslationLoader.lanKeys!.getPasswordTip5!.tr) ], ); } @@ -99,13 +99,14 @@ class _PasswordKeyPerpetualPageState extends State { // 清空 return Column( children: [ - perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseNameYourPassword.tr, _controller), - keyBottomWidget(TranslationLoader.lanKeys.getPasswordTip6.tr) + perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, _controller), + keyBottomWidget(TranslationLoader.lanKeys!.getPasswordTip6!.tr) ], ); } break; default: + return Container(); break; } } @@ -125,10 +126,10 @@ class _PasswordKeyPerpetualPageState extends State { Widget keyTimeLimitWidget(){ return Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true, isHaveDirection: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true, isHaveDirection: true, action:(){ // _showDatePicker(); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.failureTime.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, action:(){ // _showDatePicker(); }), Container(height: 10.h), @@ -140,7 +141,7 @@ class _PasswordKeyPerpetualPageState extends State { Widget keyIfPerpetualWidget(){ return Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.permanent.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch()), action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.permanent!.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch()), action:(){ }), Container(height: 10.h), @@ -152,13 +153,13 @@ class _PasswordKeyPerpetualPageState extends State { Widget keyCirculationWidget(){ return Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.recursiveDevice.tr, rightTitle:"周末", isHaveLine: true, isHaveDirection: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.recursiveDevice!.tr, rightTitle:"周末", isHaveLine: true, isHaveDirection: true, action:(){ }), - CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"10:00", isHaveLine: true, isHaveDirection: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"10:00", isHaveLine: true, isHaveDirection: true, action:(){ }), - CommonItem(leftTitel:TranslationLoader.lanKeys.failureTime.tr, rightTitle:"11:00", isHaveDirection: true, action:(){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"11:00", isHaveDirection: true, action:(){ }), ], @@ -177,7 +178,7 @@ class _PasswordKeyPerpetualPageState extends State { ], ), ), - SubmitBtn(btnName: TranslationLoader.lanKeys.getPassword.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), + SubmitBtn(btnName: TranslationLoader.lanKeys!.getPassword!.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){ } diff --git a/star_lock/lib/main/lockMian/lockMain_page.dart b/star_lock/lib/main/lockMian/lockMain_page.dart index 658eb44b..9c3242b2 100644 --- a/star_lock/lib/main/lockMian/lockMain_page.dart +++ b/star_lock/lib/main/lockMian/lockMain_page.dart @@ -11,7 +11,7 @@ import '../../tools/titleAppBar.dart'; import '../../translations/trans_lib.dart'; class StarLockMain extends StatefulWidget { - const StarLockMain({Key key}) : super(key: key); + const StarLockMain({Key? key}) : super(key: key); @override State createState() => _StarLockMainState(); @@ -22,7 +22,7 @@ class _StarLockMainState extends State with BaseWidget{ Widget build(BuildContext context) { return Scaffold( backgroundColor: const Color(0xFFF5F5F5), - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.starLock.tr, haveBack:false, haveOtherLeftWidget: true, leftWidget: Builder( + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.starLock!.tr, haveBack:false, haveOtherLeftWidget: true, leftWidget: Builder( builder: (context) => IconButton( icon: Image.asset("images/main/mainLeft_menu_icon.png",color:Colors.white, width: 60.w, height: 60.w,), onPressed: () { @@ -50,7 +50,7 @@ class _StarLockMainState extends State with BaseWidget{ ); } - Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function action){ + Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function() action){ return GestureDetector( onTap: action, child: Container( @@ -131,7 +131,7 @@ class _StarLockMainState extends State with BaseWidget{ SizedBox(height: h(50.h),), Container( padding: EdgeInsets.all(30.w), - child: Text(TranslationLoader.lanKeys.whenAddingLockThePhoneMustBeNextToTheLock.tr, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w800, color: AppColors.mainColor),) + child: Text(TranslationLoader.lanKeys!.whenAddingLockThePhoneMustBeNextToTheLock!.tr, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w800, color: AppColors.mainColor),) ) ], ); diff --git a/star_lock/lib/mine/addLock/addLock/addLock_page.dart b/star_lock/lib/mine/addLock/addLock/addLock_page.dart index 3f6385f6..3c7e6198 100644 --- a/star_lock/lib/mine/addLock/addLock/addLock_page.dart +++ b/star_lock/lib/mine/addLock/addLock/addLock_page.dart @@ -10,7 +10,7 @@ import '../../../tools/titleAppBar.dart'; import '../../../translations/trans_lib.dart'; class AddLockPage extends StatefulWidget { - const AddLockPage({Key key}) : super(key: key); + const AddLockPage({Key? key}) : super(key: key); @override State createState() => _AddLockPageState(); @@ -22,7 +22,7 @@ class _AddLockPageState extends State with BaseWidget{ Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.addLock.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.addLock!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body: Column( // mainAxisAlignment: MainAxisAlignment.center, // crossAxisAlignment: CrossAxisAlignment.center, @@ -31,7 +31,7 @@ class _AddLockPageState extends State with BaseWidget{ Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Text(TranslationLoader.lanKeys.lightTouchScreen.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),), + Text(TranslationLoader.lanKeys!.lightTouchScreen!.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),), ], ), SizedBox(height: 120.h,), @@ -40,12 +40,12 @@ class _AddLockPageState extends State with BaseWidget{ Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Text(TranslationLoader.lanKeys.lightTouchScreenTip.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),), + Text(TranslationLoader.lanKeys!.lightTouchScreenTip!.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),), ], ), SizedBox(height: 120.h,), SubmitBtn( - btnName: TranslationLoader.lanKeys.next.tr, + btnName: TranslationLoader.lanKeys!.next!.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), diff --git a/star_lock/lib/mine/addLock/lockAddress/lockAddress_page.dart b/star_lock/lib/mine/addLock/lockAddress/lockAddress_page.dart index c638ed5d..2f8ac658 100644 --- a/star_lock/lib/mine/addLock/lockAddress/lockAddress_page.dart +++ b/star_lock/lib/mine/addLock/lockAddress/lockAddress_page.dart @@ -8,7 +8,7 @@ import '../../../tools/titleAppBar.dart'; import '../../../translations/trans_lib.dart'; class LockAddressPage extends StatefulWidget { - const LockAddressPage({Key key}) : super(key: key); + const LockAddressPage({Key? key}) : super(key: key); @override State createState() => _LockAddressPageState(); diff --git a/star_lock/lib/mine/addLock/nearbyLock/nearbyLock_page.dart b/star_lock/lib/mine/addLock/nearbyLock/nearbyLock_page.dart index 97a9f179..addf5cbd 100644 --- a/star_lock/lib/mine/addLock/nearbyLock/nearbyLock_page.dart +++ b/star_lock/lib/mine/addLock/nearbyLock/nearbyLock_page.dart @@ -7,7 +7,7 @@ import '../../../tools/titleAppBar.dart'; import '../../../translations/trans_lib.dart'; class NearbyLockPage extends StatefulWidget { - const NearbyLockPage({Key key}) : super(key: key); + const NearbyLockPage({Key? key}) : super(key: key); @override State createState() => _NearbyLockPageState(); @@ -18,7 +18,7 @@ class _NearbyLockPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.nearbyLock.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.nearbyLock!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body: ListView.builder( itemCount:20, itemBuilder: (c, index){ @@ -30,7 +30,7 @@ class _NearbyLockPageState extends State { ); } - Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function action){ + Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function() action){ return GestureDetector( onTap: action, child: Column( diff --git a/star_lock/lib/mine/addLock/saveLock/saveLock_page.dart b/star_lock/lib/mine/addLock/saveLock/saveLock_page.dart index 4160b52c..607bdd4d 100644 --- a/star_lock/lib/mine/addLock/saveLock/saveLock_page.dart +++ b/star_lock/lib/mine/addLock/saveLock/saveLock_page.dart @@ -8,7 +8,7 @@ import '../../../tools/titleAppBar.dart'; import '../../../translations/trans_lib.dart'; class SaveLockPage extends StatefulWidget { - const SaveLockPage({Key key}) : super(key: key); + const SaveLockPage({Key? key}) : super(key: key); @override State createState() => _SaveLockPageState(); @@ -19,7 +19,7 @@ class _SaveLockPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.addLock.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.addLock!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body: Column( // mainAxisAlignment: MainAxisAlignment.center, // crossAxisAlignment: CrossAxisAlignment.center, @@ -28,7 +28,7 @@ class _SaveLockPageState extends State { Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Text(TranslationLoader.lanKeys.addSuccessfullyPleaseRename.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),), + Text(TranslationLoader.lanKeys!.addSuccessfullyPleaseRename!.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),), ], ), SizedBox(height: 80.h,), @@ -75,7 +75,7 @@ class _SaveLockPageState extends State { ), SizedBox(height: 120.h,), SubmitBtn( - btnName: TranslationLoader.lanKeys.sure.tr, + btnName: TranslationLoader.lanKeys!.sure!.tr, borderRadius: 20.w, margin: EdgeInsets.only( left: 50.w, diff --git a/star_lock/lib/mine/addLock/seletLockType/seletLockType_page.dart b/star_lock/lib/mine/addLock/seletLockType/seletLockType_page.dart index 005445e2..1ee17593 100644 --- a/star_lock/lib/mine/addLock/seletLockType/seletLockType_page.dart +++ b/star_lock/lib/mine/addLock/seletLockType/seletLockType_page.dart @@ -9,7 +9,7 @@ import '../../../tools/titleAppBar.dart'; import '../../../translations/trans_lib.dart'; class SeletLockTypePage extends StatefulWidget { - const SeletLockTypePage({Key key}) : super(key: key); + const SeletLockTypePage({Key? key}) : super(key: key); @override State createState() => _SeletLockTypePageState(); @@ -20,7 +20,7 @@ class _SeletLockTypePageState extends State with BaseWidget{ Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.addLock.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.addLock!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body: Column( children: [ allLock(), @@ -33,25 +33,25 @@ class _SeletLockTypePageState extends State with BaseWidget{ crossAxisSpacing: 10, mainAxisSpacing: 10, children: [ - lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys.doorLock.tr, (){ + lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys!.doorLock!.tr, (){ Navigator.pushNamed(context, Routers.addLockPage); }), - lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys.padlock.tr, (){ + lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys!.padlock!.tr, (){ Navigator.pushNamed(context, Routers.addLockPage); }), - lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys.safeLock.tr, (){ + lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys!.safeLock!.tr, (){ Navigator.pushNamed(context, Routers.addLockPage); }), - lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys.intelligentLockCore.tr, (){ + lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys!.intelligentLockCore!.tr, (){ Navigator.pushNamed(context, Routers.addLockPage); }), - lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys.parkingLock.tr, (){ + lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys!.parkingLock!.tr, (){ Navigator.pushNamed(context, Routers.addLockPage); }), - lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys.bicycleLock.tr, (){ + lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys!.bicycleLock!.tr, (){ Navigator.pushNamed(context, Routers.addLockPage); }), - lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys.longRangeControl.tr, (){ + lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys!.longRangeControl!.tr, (){ Navigator.pushNamed(context, Routers.addLockPage); }), ], @@ -72,7 +72,7 @@ class _SeletLockTypePageState extends State with BaseWidget{ child: Container( height: 150.h, color: Colors.white, - margin: EdgeInsets.all(10), + margin: const EdgeInsets.all(10), child: Row( children: [ SizedBox(width:40.w), @@ -83,8 +83,8 @@ class _SeletLockTypePageState extends State with BaseWidget{ mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(TranslationLoader.lanKeys.allLock.tr, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w500)), - Text(TranslationLoader.lanKeys.searchAllLockType.tr, style: TextStyle(fontSize: 26.sp, fontWeight: FontWeight.w500)), + Text(TranslationLoader.lanKeys!.allLock!.tr, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w500)), + Text(TranslationLoader.lanKeys!.searchAllLockType!.tr, style: TextStyle(fontSize: 26.sp, fontWeight: FontWeight.w500)), ], ), ), @@ -97,7 +97,7 @@ class _SeletLockTypePageState extends State with BaseWidget{ ); } - Widget lockTypeItem(String lockTypeIcon, String lockTypeTitle, Function action){ + Widget lockTypeItem(String lockTypeIcon, String lockTypeTitle, Function() action){ return GestureDetector( onTap: action, child: Container( diff --git a/star_lock/lib/mine/mineMultiLanguage/mineMultiLanguage_page.dart b/star_lock/lib/mine/mineMultiLanguage/mineMultiLanguage_page.dart index f1c8fb61..647f091c 100644 --- a/star_lock/lib/mine/mineMultiLanguage/mineMultiLanguage_page.dart +++ b/star_lock/lib/mine/mineMultiLanguage/mineMultiLanguage_page.dart @@ -10,7 +10,7 @@ import '../../translations/trans_lib.dart'; import 'mineMultiLanguage_logic.dart'; class MineMultiLanguagePage extends StatefulWidget { - const MineMultiLanguagePage({Key key}) : super(key: key); + const MineMultiLanguagePage({Key? key}) : super(key: key); @override State createState() => _MineMultiLanguagePageState(); @@ -26,7 +26,7 @@ class _MineMultiLanguagePageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.multilingual.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.multilingual!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body: Column( mainAxisAlignment: MainAxisAlignment.start, mainAxisSize: MainAxisSize.min, diff --git a/star_lock/lib/mine/mineMultiLanguage/mineMultiLanguage_state.dart b/star_lock/lib/mine/mineMultiLanguage/mineMultiLanguage_state.dart index 2b8d5737..2da7e674 100644 --- a/star_lock/lib/mine/mineMultiLanguage/mineMultiLanguage_state.dart +++ b/star_lock/lib/mine/mineMultiLanguage/mineMultiLanguage_state.dart @@ -11,14 +11,14 @@ class MineMultiLanguageState { return appDept.deptSupportedLocales; } - var currentLanguageType = ExtensionLanguageType.fromLanguageCode(Get.locale.languageCode).obs; + var currentLanguageType = ExtensionLanguageType.fromLanguageCode(Get.locale!.languageCode).obs; AppLanuageConfigState() { resetLan(); } void resetLan() { - currentLanguageType.value = ExtensionLanguageType.fromLanguageCode(Get.locale.languageCode); - StoreService.to.saveLanguageCode(Get.locale.languageCode); + currentLanguageType.value = ExtensionLanguageType.fromLanguageCode(Get.locale!.languageCode); + StoreService.to.saveLanguageCode(Get.locale!.languageCode); } } \ No newline at end of file diff --git a/star_lock/lib/mine/mineSet/mineSet_page.dart b/star_lock/lib/mine/mineSet/mineSet_page.dart index 3acd0c4d..19c4c532 100644 --- a/star_lock/lib/mine/mineSet/mineSet_page.dart +++ b/star_lock/lib/mine/mineSet/mineSet_page.dart @@ -10,7 +10,7 @@ import '../../tools/titleAppBar.dart'; import '../../translations/trans_lib.dart'; class MineSetPage extends StatefulWidget { - const MineSetPage({Key key}) : super(key: key); + const MineSetPage({Key? key}) : super(key: key); @override State createState() => _MineSetPageState(); @@ -21,107 +21,107 @@ class _MineSetPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.moreSet.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.moreSet!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body:Column( children: [ Expanded( child: ListView( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys.prompTone.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())), - CommonItem(leftTitel:TranslationLoader.lanKeys.touchUnlock.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())), - CommonItem(leftTitel:TranslationLoader.lanKeys.pushNotification.tr, rightTitle:"", isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())), + CommonItem(leftTitel:TranslationLoader.lanKeys!.prompTone!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())), + CommonItem(leftTitel:TranslationLoader.lanKeys!.touchUnlock!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())), + CommonItem(leftTitel:TranslationLoader.lanKeys!.pushNotification!.tr, rightTitle:"", isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())), SizedBox(height: 10.h,), - CommonItem(leftTitel:TranslationLoader.lanKeys.lockUserManagement.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.lockUserManagement!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ }), - CommonItem(leftTitel:TranslationLoader.lanKeys.authorizedAdmin.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.authorizedAdmin!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ }), - CommonItem(leftTitel:TranslationLoader.lanKeys.lockGroup.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.lockGroup!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ }), - CommonItem(leftTitel:TranslationLoader.lanKeys.transferSmartLock.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.transferSmartLock!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ }), - CommonItem(leftTitel:TranslationLoader.lanKeys.transferGateway.tr, rightTitle:"", isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.transferGateway!.tr, rightTitle:"", isHaveDirection: true, action: (){ }), SizedBox(height: 10.h,), - CommonItem(leftTitel:TranslationLoader.lanKeys.multiLanguage.tr, rightTitle:"简体中文", isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.multiLanguage!.tr, rightTitle:"简体中文", isHaveLine: true, isHaveDirection: true, action: (){ Navigator.pushNamed(context, Routers.mineMultiLanguagePage); }), - CommonItem(leftTitel:TranslationLoader.lanKeys.lockScreen.tr, rightTitle:TranslationLoader.lanKeys.opened.tr, isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.lockScreen!.tr, rightTitle:TranslationLoader.lanKeys!.opened!.tr, isHaveLine: true, isHaveDirection: true, action: (){ }), - CommonItem(leftTitel:TranslationLoader.lanKeys.hideInvalidUnlockPermissions.tr, rightTitle:TranslationLoader.lanKeys.closed.tr, isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.hideInvalidUnlockPermissions!.tr, rightTitle:TranslationLoader.lanKeys!.closed!.tr, isHaveLine: true, isHaveDirection: true, action: (){ }), - CommonItem(leftTitel:TranslationLoader.lanKeys.appUnlockRequiresMobilePhoneAccessToTheLock.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.appUnlockRequiresMobilePhoneAccessToTheLock!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ }), - CommonItem(leftTitel:TranslationLoader.lanKeys.valueAddedServices.tr, rightTitle:"", isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.valueAddedServices!.tr, rightTitle:"", isHaveDirection: true, action: (){ }), SizedBox(height: 10.h,), - CommonItem(leftTitel:TranslationLoader.lanKeys.about.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.about!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ }), SizedBox(height: 10.h,), - CommonItem(leftTitel:TranslationLoader.lanKeys.userAgreement.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.userAgreement!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ }), - CommonItem(leftTitel:TranslationLoader.lanKeys.privacyPolicy.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.privacyPolicy!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ }), - CommonItem(leftTitel:TranslationLoader.lanKeys.personalInformationCollectionList.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.personalInformationCollectionList!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ }), - CommonItem(leftTitel:TranslationLoader.lanKeys.applicationPermissionDescription.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.applicationPermissionDescription!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ }), - CommonItem(leftTitel:TranslationLoader.lanKeys.thirdPartyInformationSharingList.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ + CommonItem(leftTitel:TranslationLoader.lanKeys!.thirdPartyInformationSharingList!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ }), ], ), ), - keyBottomWidget() + // keyBottomWidget() ], ) ); } - Widget keyBottomWidget() { - return Column( - children: [ - SubmitBtn(btnName: TranslationLoader.lanKeys.logout.tr, - borderRadius: 20.w, - fontSize: 32.sp, - margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w), - padding: EdgeInsets.only(top: 20.w, bottom: 20.w), - onClick: () { - - } - ), - Container( - padding: EdgeInsets.only(right: 30.w), - // color: Colors.red, - child: Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - TextButton( - child: Text( TranslationLoader.lanKeys.deleteAccount.tr, style: TextStyle(color: AppColors.mainColor, fontWeight: FontWeight.w500),), - onPressed: () { - - }, - ), - ], - ), - ), - SizedBox(height: 30.h,) - ], - ); - } + // Widget keyBottomWidget() { + // return Column( + // children: [ + // SubmitBtn(btnName: TranslationLoader.lanKeys!.logout!.tr, + // borderRadius: 20.w, + // fontSize: 32.sp, + // margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w), + // padding: EdgeInsets.only(top: 20.w, bottom: 20.w), + // onClick: () { + // + // } + // ), + // Container( + // padding: EdgeInsets.only(right: 30.w), + // // color: Colors.red, + // child: Row( + // mainAxisAlignment: MainAxisAlignment.end, + // children: [ + // TextButton( + // child: Text( TranslationLoader.lanKeys!.deleteAccount!.tr, style: TextStyle(color: AppColors.mainColor, fontWeight: FontWeight.w500),), + // onPressed: () { + // + // }, + // ), + // ], + // ), + // ), + // SizedBox(height: 30.h,) + // ], + // ); + // } Switch _switch(){ return Switch( diff --git a/star_lock/lib/mine/mine_page.dart b/star_lock/lib/mine/mine_page.dart index 20691d1a..cf4b8f4d 100644 --- a/star_lock/lib/mine/mine_page.dart +++ b/star_lock/lib/mine/mine_page.dart @@ -6,11 +6,12 @@ import 'package:get/get.dart'; import '../appRouters.dart'; import '../app_settings/app_colors.dart'; import '../baseWidget.dart'; +import '../tools/submitBtn.dart'; import '../tools/titleAppBar.dart'; import '../translations/trans_lib.dart'; class StarLockMinePage extends StatefulWidget { - const StarLockMinePage({Key key}) : super(key: key); + const StarLockMinePage({Key? key}) : super(key: key); @override State createState() => _StarLockMinePageState(); @@ -26,7 +27,9 @@ class _StarLockMinePageState extends State with BaseWidget{ body: Column( children: [ topWidget(), - bottomListWidget() + bottomListWidget(), + SizedBox(height: 40.h,), + keyBottomWidget() ], ), ); @@ -68,24 +71,30 @@ class _StarLockMinePageState extends State with BaseWidget{ Widget bottomListWidget(){ return Expanded( child: ListView( - padding: EdgeInsets.only(left: 110.w, top: 80.h, right: 10.w), + padding: EdgeInsets.only(left: 70.w, top: 50.h, right: 10.w), children: [ - mineItem('images/mine/icon_mine_main_addLock.png', TranslationLoader.lanKeys.addLock.tr, (){ + mineItem('images/mine/icon_mine_main_personInfo.png', "个人信息", (){ Navigator.pushNamed(context, Routers.seletLockTypePage); }), - mineItem('images/mine/icon_mine_main_gateway.png', TranslationLoader.lanKeys.gateway.tr, (){ + mineItem('images/mine/icon_mine_main_addLock.png', TranslationLoader.lanKeys!.addLock!.tr, (){ + Navigator.pushNamed(context, Routers.seletLockTypePage); + }), + mineItem('images/mine/icon_mine_main_gateway.png', TranslationLoader.lanKeys!.gateway!.tr, (){ }), - mineItem('images/mine/icon_mine_main_message.png', TranslationLoader.lanKeys.message.tr, (){ + mineItem('images/mine/icon_mine_main_message.png', TranslationLoader.lanKeys!.message!.tr, (){ }), - mineItem('images/mine/icon_mine_main_supportStaff.png', TranslationLoader.lanKeys.supportStaff.tr, (){ + mineItem('images/mine/icon_mine_main_supportStaff.png', TranslationLoader.lanKeys!.supportStaff!.tr, (){ }), - mineItem('images/mine/icon_mine_main_set.png', TranslationLoader.lanKeys.set.tr, (){ + mineItem('images/mine/icon_mine_main_set.png', TranslationLoader.lanKeys!.set!.tr, (){ Navigator.pushNamed(context, Routers.mineSetPage); }), - mineItem('images/mine/icon_mine_main_moreServices.png', TranslationLoader.lanKeys.moreServices.tr, (){ + mineItem('images/mine/icon_mine_main_vip.png', TranslationLoader.lanKeys!.valueAddedServices!.tr, (){ + + }), + mineItem('images/mine/icon_mine_main_about.png', TranslationLoader.lanKeys!.about!.tr, (){ }), ], @@ -93,7 +102,39 @@ class _StarLockMinePageState extends State with BaseWidget{ ); } - Widget mineItem(String lockTypeIcon, String lockTypeTitle, Function action){ + Widget keyBottomWidget() { + return Column( + children: [ + SubmitBtn(btnName: TranslationLoader.lanKeys!.logout!.tr, + borderRadius: 20.w, + fontSize: 32.sp, + margin: EdgeInsets.only(left: 60.w, right: 60.w), + padding: EdgeInsets.only(top: 15.w, bottom: 15.w), + onClick: () { + + } + ), + Container( + padding: EdgeInsets.only(right: 30.w), + // color: Colors.red, + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + TextButton( + child: Text(TranslationLoader.lanKeys!.deleteAccount!.tr, style: TextStyle(color: AppColors.mainColor, fontWeight: FontWeight.w500),), + onPressed: () { + + }, + ), + ], + ), + ), + SizedBox(height: 30.h,) + ], + ); + } + + Widget mineItem(String lockTypeIcon, String lockTypeTitle, Function() action){ return GestureDetector( onTap: action, child: Row( @@ -101,7 +142,7 @@ class _StarLockMinePageState extends State with BaseWidget{ Center( child: Container( height: 80.h, - width: 300.w, + // width: 300.w, color: Colors.white, child: Row( children: [ diff --git a/star_lock/lib/navPages.dart b/star_lock/lib/navPages.dart index 4a3477f2..c9e5c8b2 100644 --- a/star_lock/lib/navPages.dart +++ b/star_lock/lib/navPages.dart @@ -7,7 +7,7 @@ import 'app_settings/app_colors.dart'; import 'main/lockMian/lockMain_page.dart'; class NavPages extends StatefulWidget { - const NavPages({Key key}) : super(key: key); + const NavPages({Key? key}) : super(key: key); @override State createState() => _NavPagesState(); diff --git a/star_lock/lib/starLockApplication.dart b/star_lock/lib/starLockApplication.dart index 200b87ac..5da94f8e 100644 --- a/star_lock/lib/starLockApplication.dart +++ b/star_lock/lib/starLockApplication.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'navPages.dart'; class StarLockApplication extends StatefulWidget { - const StarLockApplication({Key key}) : super(key: key); + const StarLockApplication({Key? key}) : super(key: key); @override State createState() => _StarLockApplicationState(); diff --git a/star_lock/lib/tools/CustomUnderlineTabIndicator.dart b/star_lock/lib/tools/CustomUnderlineTabIndicator.dart index aa0fa653..396698e3 100644 --- a/star_lock/lib/tools/CustomUnderlineTabIndicator.dart +++ b/star_lock/lib/tools/CustomUnderlineTabIndicator.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; // ------------------------------------------------------ // author:AllenSu @@ -9,10 +8,10 @@ import 'package:flutter/widgets.dart'; // ------------------------------------------------------ class CustomUnderlineTabIndicator extends Decoration { - final BorderSide borderSide; - final EdgeInsetsGeometry insets; - final StrokeCap strokeCap; // 控制器的边角形状 - final double width; // 控制器的宽度 + final BorderSide? borderSide; + final EdgeInsetsGeometry? insets; + final StrokeCap? strokeCap; // 控制器的边角形状 + final double? width; // 控制器的宽度 const CustomUnderlineTabIndicator({ this.borderSide = const BorderSide(width: 2, color: Colors.white), @@ -23,21 +22,21 @@ class CustomUnderlineTabIndicator extends Decoration { assert(insets != null); @override - Decoration lerpFrom(Decoration a, double t) { + Decoration? lerpFrom(Decoration? a, double t) { if (a is CustomUnderlineTabIndicator) { return CustomUnderlineTabIndicator( - borderSide: BorderSide.lerp(a.borderSide, borderSide, t), - insets: EdgeInsetsGeometry.lerp(a.insets, insets, t), + borderSide: BorderSide.lerp(a.borderSide!, borderSide!, t), + insets: EdgeInsetsGeometry.lerp(a.insets!, insets!, t), ); } - return super.lerpFrom(a, t); + return lerpFrom(a, t); } @override - Decoration lerpTo(Decoration b, double t) { + Decoration? lerpTo(Decoration? b, double t) { if (b is CustomUnderlineTabIndicator) { return CustomUnderlineTabIndicator( - borderSide: BorderSide.lerp(borderSide, b.borderSide, t), + borderSide: BorderSide.lerp(borderSide!, b.borderSide!, t), insets: EdgeInsetsGeometry.lerp(insets, b.insets, t), ); } @@ -45,8 +44,8 @@ class CustomUnderlineTabIndicator extends Decoration { } @override - _UnderlinePainter createBoxPainter([VoidCallback onChanged]) { - return _UnderlinePainter(this, onChanged); + _UnderlinePainter createBoxPainter([VoidCallback? onChanged]) { + return _UnderlinePainter(this, onChanged!); } @override @@ -54,18 +53,18 @@ class CustomUnderlineTabIndicator extends Decoration { return Path()..addRect(_indicatorRectFor(rect, textDirection)); } - Rect _indicatorRectFor(Rect rect, TextDirection textDirection) { + Rect _indicatorRectFor(Rect? rect, TextDirection? textDirection) { assert(rect != null); assert(textDirection != null); - final Rect indicator = insets.resolve(textDirection).deflateRect(rect); + final Rect indicator = insets!.resolve(textDirection).deflateRect(rect!); // 希望的宽度 - double wantWidth = this.width; + double wantWidth = width!; // 取中间坐标 double cw = (indicator.left + indicator.right) / 2; // 这里是核心代码 return Rect.fromLTWH(cw - wantWidth / 2, - indicator.bottom - borderSide.width, wantWidth, borderSide.width); + indicator.bottom - borderSide!.width, wantWidth, borderSide!.width); } } @@ -74,19 +73,19 @@ class _UnderlinePainter extends BoxPainter { : assert(decoration != null), super(onChanged); - final CustomUnderlineTabIndicator decoration; + final CustomUnderlineTabIndicator? decoration; @override void paint(Canvas canvas, Offset offset, ImageConfiguration configuration) { assert(configuration != null); assert(configuration.size != null); - final Rect rect = offset & configuration.size; - final TextDirection textDirection = configuration.textDirection; - final Rect indicator = decoration + final Rect rect = offset & configuration.size!; + final TextDirection textDirection = configuration.textDirection!; + final Rect indicator = decoration! ._indicatorRectFor(rect, textDirection) - .deflate(decoration.borderSide.width / 2); - final Paint paint = decoration.borderSide.toPaint() - ..strokeCap = decoration.strokeCap; // 这里修改控制器边角的形状 + .deflate(decoration!.borderSide!.width / 2); + final Paint paint = decoration!.borderSide!.toPaint() + ..strokeCap = decoration!.strokeCap!; // 这里修改控制器边角的形状 canvas.drawLine(indicator.bottomLeft, indicator.bottomRight, paint); } } \ No newline at end of file diff --git a/star_lock/lib/tools/app_manager.dart b/star_lock/lib/tools/app_manager.dart index 7a5474a0..76e077f7 100644 --- a/star_lock/lib/tools/app_manager.dart +++ b/star_lock/lib/tools/app_manager.dart @@ -10,20 +10,20 @@ class AppManager { String platformName = ''; String get showVersion =>'$version.$buildNumber'; - static AppManager _manager; + static AppManager? _manager; AppManager._init(); - static AppManager shareManager(){ + static AppManager? shareManager(){ _manager ??= AppManager._init(); return _manager; } - factory AppManager() => shareManager(); - AppManager get manager => shareManager(); + factory AppManager() => shareManager()!; + AppManager? get manager => shareManager(); //当前应用的语言 String _languageCode = 'en-US'; - void setLanCode({String code})=>_languageCode = code; + void setLanCode({String? code})=>_languageCode = code!; String get languageCode => _languageCode; //设备唯一标识 diff --git a/star_lock/lib/tools/commonItem.dart b/star_lock/lib/tools/commonItem.dart index f0285f84..925e8e13 100644 --- a/star_lock/lib/tools/commonItem.dart +++ b/star_lock/lib/tools/commonItem.dart @@ -3,16 +3,16 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class CommonItem extends StatelessWidget { - String leftTitel; - String rightTitle; - bool isHaveDirection; - bool isHaveLine; - bool isHaveRightWidget; - Widget rightWidget; - Function action; - double allHeight; + String? leftTitel; + String? rightTitle; + bool? isHaveDirection; + bool? isHaveLine; + bool? isHaveRightWidget; + Widget? rightWidget; + Function()? action; + double? allHeight; - CommonItem({Key key,@required this.leftTitel, this.rightTitle, this.allHeight, this.isHaveDirection = false, this.isHaveLine = false, this.isHaveRightWidget = false, this.rightWidget, this.action}) : super(key: key); + CommonItem({Key? key,required this.leftTitel, this.rightTitle, this.allHeight = 45.0, this.isHaveDirection = false, this.isHaveLine = false, this.isHaveRightWidget = false, this.rightWidget, this.action}) : super(key: key); @override Widget build(BuildContext context) { @@ -28,21 +28,21 @@ class CommonItem extends StatelessWidget { child: Row( children: [ SizedBox(width:20.w), - Expanded(child: Text(leftTitel, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500))), + Expanded(child: Text(leftTitel!, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500))), SizedBox(width:20.w), Row( mainAxisAlignment: MainAxisAlignment.end, children: [ - isHaveRightWidget?rightWidget:Text(rightTitle, textAlign: TextAlign.end, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),) + isHaveRightWidget!?rightWidget!:Text(rightTitle!, textAlign: TextAlign.end, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),) ], ), SizedBox(width:5.w), - isHaveDirection?Image.asset('images/icon_right.png', width: 50.w, height: 50.w,):SizedBox(width:10.w), + isHaveDirection!?Image.asset('images/icon_right.png', width: 50.w, height: 50.w,):SizedBox(width:10.w), // SizedBox(width:10.w), ], ), ), - isHaveLine?Container(height: 0.5.h, color: Colors.grey,):Container() + isHaveLine!?Container(height: 0.5.h, color: Colors.grey,):Container() ], ), ); diff --git a/star_lock/lib/tools/device_info_service.dart b/star_lock/lib/tools/device_info_service.dart index 0ceaafdb..80e0368f 100644 --- a/star_lock/lib/tools/device_info_service.dart +++ b/star_lock/lib/tools/device_info_service.dart @@ -15,8 +15,9 @@ class DeviceInfoService extends GetxService { Future init() async { DeviceInfoPlugin deviceInfo = DeviceInfoPlugin(); - var dId = StoreService.to.getDeviceId(); - if(dId.isEmpty){ + // String dId = StoreService.to.getDeviceId(); + String dId = ""; + if(dId.isNotEmpty){ dId = const Uuid().v1(); print('初始化设备ID:$dId'); StoreService.to.saveDeviceId(dId); diff --git a/star_lock/lib/tools/forgetPwdInput.dart b/star_lock/lib/tools/forgetPwdInput.dart index 928f5df4..38de0872 100644 --- a/star_lock/lib/tools/forgetPwdInput.dart +++ b/star_lock/lib/tools/forgetPwdInput.dart @@ -3,14 +3,14 @@ import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class ForgetPwdInput extends StatelessWidget { - TextEditingController controller; - List inputFormatters; - TextInputType keyboardType; - String hintText; - String label; - Widget rightSlot; - bool isPwd; - ForgetPwdInput({Key key,this.rightSlot,this.isPwd,this.label,this.hintText,this.keyboardType,this.inputFormatters, @required this.controller}) : super(key: key); + TextEditingController? controller; + List? inputFormatters; + TextInputType? keyboardType; + String? hintText; + String? label; + Widget? rightSlot; + bool? isPwd; + ForgetPwdInput({Key? key, this.rightSlot, this.isPwd, this.label,this.hintText,this.keyboardType,this.inputFormatters, @required this.controller}) : super(key: key); @override Widget build(BuildContext context) { diff --git a/star_lock/lib/tools/jh_pop_menus.dart b/star_lock/lib/tools/jh_pop_menus.dart index 42f6fab7..2655503a 100644 --- a/star_lock/lib/tools/jh_pop_menus.dart +++ b/star_lock/lib/tools/jh_pop_menus.dart @@ -18,7 +18,7 @@ class JhPopMenus { /// 显示pop static void show( BuildContext context, { - Function(int selectIndex, String selectText) clickCallback, + Function(int selectIndex, String selectText)? clickCallback, }) { // Cell Widget buildMenuCell(dataArr) { @@ -72,7 +72,7 @@ class JhPopMenus { } /// 显示带线带背景 pop - static void showLinePop(BuildContext context, {bool isShowBg = false, Function(int selectIndex, String selectText) clickCallback,}) { + static void showLinePop(BuildContext context, {bool isShowBg = false, Function(int selectIndex, String selectText)? clickCallback,}) { // 带线 Widget buildMenuLineCell(dataArr) { return ListView.separated( @@ -148,10 +148,7 @@ class JhPopMenus { class _BasePopMenus extends Dialog { final child; - const _BasePopMenus({ - Key key, - this.child, - }) : super(key: key); + const _BasePopMenus({Key? key, this.child,}) : super(key: key); @override Widget build(BuildContext context) { @@ -188,7 +185,7 @@ class CustomDialog extends Dialog { final child; const CustomDialog({ - Key key, + Key? key, this.child, this.clickBgHidden = false, // 点击背景隐藏,默认不隐藏 }) : super(key: key); diff --git a/star_lock/lib/tools/loginInput.dart b/star_lock/lib/tools/loginInput.dart index 9c6a39fd..c6790038 100644 --- a/star_lock/lib/tools/loginInput.dart +++ b/star_lock/lib/tools/loginInput.dart @@ -9,16 +9,16 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; class LoginInput extends StatelessWidget { - TextEditingController controller; - List inputFormatters; - TextInputType keyboardType; - Color background; - String hintText; - String leftImg; - String label; - bool isPwd; - Widget rightSlot; - LoginInput({Key key, @required this.controller,this.rightSlot,this.label,this.isPwd,this.inputFormatters,this.keyboardType,this.background,this.hintText, this.leftImg}) : super(key: key); + TextEditingController? controller; + List? inputFormatters; + TextInputType? keyboardType; + Color? background; + String? hintText; + String? leftImg; + String? label; + bool? isPwd; + Widget? rightSlot; + LoginInput({Key? key, required this.controller,this.rightSlot,this.label,this.isPwd,this.inputFormatters,this.keyboardType,this.background,this.hintText, this.leftImg}) : super(key: key); @override Widget build(BuildContext context) { @@ -42,9 +42,9 @@ class LoginInput extends StatelessWidget { //不需要输入框下划线 border: InputBorder.none, //左边图标设置 - icon: (leftImg.isNotEmpty)?Padding( + icon: (leftImg!.isNotEmpty)?Padding( padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 5.w), - child: Image.asset(leftImg, width: 40.w, height: 40.w,), + child: Image.asset(leftImg!, width: 40.w, height: 40.w,), ):SizedBox(width: 65.w, height: 40.w,), ), ), diff --git a/star_lock/lib/tools/noData.dart b/star_lock/lib/tools/noData.dart index 377d0d00..cf4cf53a 100644 --- a/star_lock/lib/tools/noData.dart +++ b/star_lock/lib/tools/noData.dart @@ -2,7 +2,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class NoData extends StatelessWidget { - const NoData({Key key}) : super(key: key); + const NoData({Key? key}) : super(key: key); @override Widget build(BuildContext context) { diff --git a/star_lock/lib/tools/platform_info_services.dart b/star_lock/lib/tools/platform_info_services.dart index c01304fd..95e82558 100644 --- a/star_lock/lib/tools/platform_info_services.dart +++ b/star_lock/lib/tools/platform_info_services.dart @@ -4,7 +4,7 @@ import 'package:package_info_plus/package_info_plus.dart'; class PlatformInfoService extends GetxService { static PlatformInfoService get to => Get.find(); - PackageInfo _packageInfo; + late PackageInfo _packageInfo; PackageInfo get info => _packageInfo; Future init() async { PackageInfo packageInfo = await PackageInfo.fromPlatform(); diff --git a/star_lock/lib/tools/showBottomSheetTool.dart b/star_lock/lib/tools/showBottomSheetTool.dart index 186492e4..86ff18db 100644 --- a/star_lock/lib/tools/showBottomSheetTool.dart +++ b/star_lock/lib/tools/showBottomSheetTool.dart @@ -29,37 +29,37 @@ class ShowBottomSheetTool { ///单列 void showSingleRowPicker( BuildContext context, { - @required List data, - String title, - String cancelTitle, - String sureTitle, - int normalIndex, - PickerDataAdapter adapter, - @required StringClickCallback clickCallBack, + required List data, + String? title, + String? cancelTitle, + String? sureTitle, + int? normalIndex, + PickerDataAdapter? adapter, + required StringClickCallback clickCallBack, }) { openPicker(context, - title: title, - cancelTitle: cancelTitle, - sureTitle: sureTitle, + title: title!, + cancelTitle: cancelTitle!, + sureTitle: sureTitle!, selecteds: [normalIndex ?? 0], adapter: adapter ?? PickerDataAdapter(pickerData: data, isArray: false), clickCallBack: (Picker picker, List selecteds) { - clickCallBack(selecteds[0], data[selecteds[0]]); + clickCallBack(selecteds[0], data[selecteds[0]] as Object); }); } ///多列 void showArrayPicker( BuildContext context, { - @required List data, - String title, - List normalIndex, - PickerDataAdapter adapter, - @required ArrayClickCallback clickCallBack, + required List data, + String? title, + List? normalIndex, + PickerDataAdapter? adapter, + required ArrayClickCallback clickCallBack, }) { openPicker(context, - selecteds: normalIndex, - title: title, + selecteds: normalIndex!, + title: title!, adapter: adapter ?? PickerDataAdapter(pickerData: data, isArray: true), clickCallBack: (Picker picker, List selecteds) { clickCallBack(selecteds, picker.getSelectedValues()); @@ -68,12 +68,12 @@ class ShowBottomSheetTool { void openPicker( BuildContext context, { - @required PickerAdapter adapter, - String title, - String cancelTitle, - String sureTitle, - List selecteds, - @required PickerConfirmCallback clickCallBack, + required PickerAdapter adapter, + String? title, + String? cancelTitle, + String? sureTitle, + List? selecteds, + required PickerConfirmCallback clickCallBack, }) { Picker( adapter: adapter, diff --git a/star_lock/lib/tools/showCalendar.dart b/star_lock/lib/tools/showCalendar.dart index 75f776ad..f457b809 100644 --- a/star_lock/lib/tools/showCalendar.dart +++ b/star_lock/lib/tools/showCalendar.dart @@ -6,10 +6,10 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; typedef SeletDateCallback(DateTime dateTime); class ShowCalendar extends StatelessWidget { - SeletDateCallback seletAction; - DatePickerMode datePickerMode; + SeletDateCallback? seletAction; + DatePickerMode? datePickerMode; - ShowCalendar({Key key, this.seletAction, this.datePickerMode}) : super(key: key); + ShowCalendar({Key? key, this.seletAction, this.datePickerMode}) : super(key: key); @override Widget build(BuildContext context) { @@ -24,7 +24,7 @@ class ShowCalendar extends StatelessWidget { //需要在内部限制下高度和宽度才能更好的显示 height: 350, width: 1.sw - 40.w, - child: _calendarDatePicker(datePickerMode), + child: _calendarDatePicker(datePickerMode!), ), ); } @@ -37,7 +37,7 @@ class ShowCalendar extends StatelessWidget { lastDate: DateTime(2100, 1, 1), // 结束日期 initialCalendarMode: mode, // 日期选择样式 // 选中日期改变回调函数 - onDateChanged:seletAction, + onDateChanged:seletAction!, // 月份改变回调函数 onDisplayedMonthChanged: (dateTime){ print("onDisplayedMonthChanged $dateTime"); diff --git a/star_lock/lib/tools/showSeletDateTime.dart b/star_lock/lib/tools/showSeletDateTime.dart index f47b2c20..9e734ec5 100644 --- a/star_lock/lib/tools/showSeletDateTime.dart +++ b/star_lock/lib/tools/showSeletDateTime.dart @@ -21,9 +21,9 @@ class ShowSeletDateTime { context, onMonthChangeStartWithFirstDate: true, pickerTheme: DateTimePickerTheme( - cancel: Text(TranslationLoader.lanKeys.cancel.tr, style: const TextStyle(color: Colors.black)), + cancel: Text(TranslationLoader.lanKeys!.cancel!.tr, style: const TextStyle(color: Colors.black)), showTitle: true, - confirm: Text(TranslationLoader.lanKeys.sure.tr, style: const TextStyle(color: Colors.black)), + confirm: Text(TranslationLoader.lanKeys!.sure!.tr, style: const TextStyle(color: Colors.black)), ), minDateTime: DateTime.parse(minT), maxDateTime: DateTime.parse(maxT), diff --git a/star_lock/lib/tools/showTFView.dart b/star_lock/lib/tools/showTFView.dart index 9bcc2d92..1f05b803 100644 --- a/star_lock/lib/tools/showTFView.dart +++ b/star_lock/lib/tools/showTFView.dart @@ -6,18 +6,18 @@ import 'package:get/get.dart'; import '../translations/trans_lib.dart'; class ShowTFView extends StatelessWidget { - String title; - String tipTitle; - TextEditingController controller; + String? title; + String? tipTitle; + TextEditingController? controller; - ShowTFView({Key key, this.title, this.tipTitle, this.controller}) : super(key: key); + ShowTFView({Key? key, this.title, this.tipTitle, this.controller}) : super(key: key); @override Widget build(BuildContext context) { return Card( color: const Color(0x00FFFFFF), child: CupertinoAlertDialog( - title: Text(title), + title: Text(title!), content: Column( children: [ const SizedBox(height: 10,), @@ -66,14 +66,14 @@ class ShowTFView extends StatelessWidget { ), actions: [ CupertinoDialogAction( - child: Text(TranslationLoader.lanKeys.cancel.tr), + child: Text(TranslationLoader.lanKeys!.cancel!.tr), onPressed: () { Navigator.pop(context); // print("取消"); }, ), CupertinoDialogAction( - child: Text(TranslationLoader.lanKeys.sure.tr), + child: Text(TranslationLoader.lanKeys!.sure!.tr), onPressed: () { Navigator.pop(context); // print("确定"); diff --git a/star_lock/lib/tools/store_service.dart b/star_lock/lib/tools/store_service.dart index 1fd46669..38a1dae7 100644 --- a/star_lock/lib/tools/store_service.dart +++ b/star_lock/lib/tools/store_service.dart @@ -11,10 +11,10 @@ class StoreService extends GetxService { return this; } - Future save(String key, dynamic value) => box.write(key, value); - T read(String key) => box.read(key); - Future remove(String key) => box.remove(key); - bool hasData(String key) => box.hasData(key); + Future save(String? key, dynamic value) => box.write(key!, value); + T read(String? key) => box.read(key!); + Future remove(String? key) => box.remove(key!); + bool hasData(String? key) => box.hasData(key!); final String _loginUserInfoKey = 'LOGIN_USER_INFO'; @@ -40,18 +40,18 @@ class StoreService extends GetxService { // } // } - String getDeviceId() => hasData(_deviceUUID) ? read(_deviceUUID): ""; + // String getDeviceId() => hasData(_deviceUUID!) ? read(_deviceUUID!): ""; Future saveDeviceId(String uuid) => save(_deviceUUID, uuid); - String getLanguageCode() => hasData(_languageCode) ? read(_languageCode): ""; + // String getLanguageCode() => hasData(_languageCode) ? read(_languageCode): ""; Future saveLanguageCode(String code) => save(_languageCode, code); // bool get hadToken => loginEntity != null && loginEntity.data.token != null && loginEntity.data.token.isNotEmpty; // String get userToken => hadToken ? loginEntity.data.token : ""; - String getLastUserAccount() => hasData(_userAccount) ? read(_userAccount): ""; + // String getLastUserAccount() => hasData(_userAccount) ? read(_userAccount): ""; void removeLastUserAccount() => remove(_userAccount); - String get localUserAccount => getLastUserAccount(); + // String get localUserAccount => getLastUserAccount(); } diff --git a/star_lock/lib/tools/submitBtn.dart b/star_lock/lib/tools/submitBtn.dart index 44d7fef3..235d9294 100644 --- a/star_lock/lib/tools/submitBtn.dart +++ b/star_lock/lib/tools/submitBtn.dart @@ -11,25 +11,25 @@ import '../app_settings/app_colors.dart'; class SubmitBtn extends StatelessWidget { - String btnName; + String? btnName; - Function onClick; + Function()? onClick; - EdgeInsetsGeometry margin; + EdgeInsetsGeometry? margin; - EdgeInsetsGeometry padding; + EdgeInsetsGeometry? padding; - double width; + double? width; - double fontSize; + double? fontSize; - Color color; + Color? color; - List backgroundColorList; + List? backgroundColorList; - double borderRadius; + double? borderRadius; - SubmitBtn({Key key,@required this.btnName,this.borderRadius,this.color,this.padding,this.onClick,this.margin,this.width,this.backgroundColorList,this.fontSize}) : super(key: key); + SubmitBtn({Key? key, required this.btnName,this.borderRadius,this.color,this.padding,this.onClick,this.margin,this.width,this.backgroundColorList,this.fontSize}) : super(key: key); @override Widget build(BuildContext context) { @@ -52,7 +52,7 @@ class SubmitBtn extends StatelessWidget { ) ), child: Center( - child: Text(btnName,style: TextStyle( + child: Text(btnName!,style: TextStyle( fontSize: fontSize??36.sp, height: 1.3, decoration: TextDecoration.none, @@ -63,7 +63,7 @@ class SubmitBtn extends StatelessWidget { ), onTap: (){ if(onClick!=null){ - onClick(); + onClick!(); } }, ); diff --git a/star_lock/lib/tools/titleAppBar.dart b/star_lock/lib/tools/titleAppBar.dart index 35dd894d..449c912c 100644 --- a/star_lock/lib/tools/titleAppBar.dart +++ b/star_lock/lib/tools/titleAppBar.dart @@ -4,18 +4,18 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; class TitleAppBar extends AppBar { @override - final Color backgroundColor; - final String barTitle; - final Color titleColor; - final Color iconColor; - final bool haveTitleWidget; - final Widget titleWidget; - final bool haveBack; - final bool haveOtherLeftWidget; - final Widget leftWidget; - List actionsList; + final Color? backgroundColor; + final String? barTitle; + final Color? titleColor; + final Color? iconColor; + final bool? haveTitleWidget; + final Widget? titleWidget; + final bool? haveBack; + final bool? haveOtherLeftWidget; + final Widget? leftWidget; + List? actionsList; - TitleAppBar({Key key,this.barTitle,this.titleColor, this.haveTitleWidget = false, this.titleWidget, this.iconColor,this.backgroundColor,this.actionsList, this.haveBack, this.haveOtherLeftWidget = false , this.leftWidget}) : super(key: key); + TitleAppBar({Key? key,this.barTitle,this.titleColor, this.haveTitleWidget = false, this.titleWidget, this.iconColor,this.backgroundColor,this.actionsList, this.haveBack, this.haveOtherLeftWidget = false , this.leftWidget}) : super(key: key); @override _TitleAppBarState createState() => _TitleAppBarState(); @@ -27,12 +27,12 @@ class _TitleAppBarState extends State { Widget build(BuildContext context) { return AppBar( elevation: 0, - leading:widget.haveOtherLeftWidget?widget.leftWidget:(widget.haveBack?IconButton( + leading:widget.haveOtherLeftWidget!?widget.leftWidget:(widget.haveBack!?IconButton( icon: Icon(Icons.arrow_back_ios,color: widget.iconColor??Colors.white), onPressed: () => Navigator.of(context).pop(), ):Container()), backgroundColor: widget.backgroundColor??Colors.white, - title: widget.haveTitleWidget?widget.titleWidget:Text(widget.barTitle??'', style: TextStyle(color: widget.titleColor??Colors.white,fontSize: 36.sp, fontWeight:FontWeight.w500)), + title: widget.haveTitleWidget!?widget.titleWidget:Text(widget.barTitle??'', style: TextStyle(color: widget.titleColor??Colors.white,fontSize: 36.sp, fontWeight:FontWeight.w500)), centerTitle: true, actions: widget.actionsList??[] ); diff --git a/star_lock/lib/translations/app_dept.dart b/star_lock/lib/translations/app_dept.dart index 638defd5..f0ac80d9 100644 --- a/star_lock/lib/translations/app_dept.dart +++ b/star_lock/lib/translations/app_dept.dart @@ -52,10 +52,10 @@ extension ExtensionLanguageType on LanguageType { var str = ''; switch(this){ case LanguageType.english: - str = TranslationLoader.lanKeys.lanEnglish.tr; + str = TranslationLoader.lanKeys!.lanEnglish!.tr; break; case LanguageType.chinese: - str = TranslationLoader.lanKeys.lanChinese.tr; + str = TranslationLoader.lanKeys!.lanChinese!.tr; break; } diff --git a/star_lock/lib/translations/lanKeyEntity.dart b/star_lock/lib/translations/lanKeyEntity.dart index 959e3b31..7a34486e 100644 --- a/star_lock/lib/translations/lanKeyEntity.dart +++ b/star_lock/lib/translations/lanKeyEntity.dart @@ -498,254 +498,254 @@ class LanKeyEntity { countryAndRegion = json['countryAndRegion']; selet = json['selet']; } - String starLock; - String clickUnlockAndHoldDownClose; - String checkingIn; - String electronicKey; - String password; - String card; - String fingerprint; - String remoteControl; - String operatingRecord; - String number; - String additive; - String addTime; + String? starLock; + String? clickUnlockAndHoldDownClose; + String? checkingIn; + String? electronicKey; + String? password; + String? card; + String? fingerprint; + String? remoteControl; + String? operatingRecord; + String? number; + String? additive; + String? addTime; - String reset; - String sendKey; - String timeLimit; - String permanent; - String once; - String circulation; - String receiver; - String pleaseEnterNumberOrEmail; - String name; - String enterYourName; - String effectiveTime; - String failureTime; - String effectiveDate; - String failureDate; - String monday; - String tuesday; - String wednesday; - String thursday; - String friday; - String saturday; - String sunday; - String mondayShort; - String tuesdayShort; - String wednesdayShort; - String thursdayShort; - String fridayShort; - String saturdayShort; - String sundayShort; + String? reset; + String? sendKey; + String? timeLimit; + String? permanent; + String? once; + String? circulation; + String? receiver; + String? pleaseEnterNumberOrEmail; + String? name; + String? enterYourName; + String? effectiveTime; + String? failureTime; + String? effectiveDate; + String? failureDate; + String? monday; + String? tuesday; + String? wednesday; + String? thursday; + String? friday; + String? saturday; + String? sunday; + String? mondayShort; + String? tuesdayShort; + String? wednesdayShort; + String? thursdayShort; + String? fridayShort; + String? saturdayShort; + String? sundayShort; - String realNameAuthentication; - String sendKeyBottomTip; - String send; - String periodValidity; - String sendGroupKey; - String lock; - String pleaseAdd; - String pleaseSelet; - String remoteUnlockingAllowed; - String pleaseEnter; - String getPassword; - String custom; - String clearAll; - String recursiveDevice; - String pleaseNameYourPassword; - String pleaseEnterDigitsNumber; - String getPasswordTip1; - String getPasswordTip2; - String getPasswordTip3; - String getPasswordTip4; - String getPasswordTip5; - String getPasswordTip6; - String getTip; - String addTip; - String sender; - String senderTime; - String keyDetail; - String detail; - String delete; - String passwordDetail; - String share; - String amend; - String sure; - String cancel; - String add; - String accountNumber; - String volumeAuthorizationLock; - String authorizedAdminTip; - String lockOperatingRecordTip; - String remoteUnlockingPageTip; - String currentMode; - String delayTime; - String automaticBlockingTip; - String time; - String normallyOpen; - String date; - String begin; - String end; - String allDay; - String save; - String normallyOpenModeTip; - String pleaseSeletLockVolume; - String lockSoundTip; - String low; - String lower; - String medium; - String high; - String higher; - String burglarAlarmTip; - String resetButtonTip; - String calibrationTime; - String setTheDSTMode; - String diagnoseTip; - String uploading; - String uploadDataTip; - String importOtherLockDataTip; - String haveNewVersion; - String currentVersion; - String newVersion; - String upgrade; - String leisure; - String checkedIn; - String rankingList; - String earlyArrivalList; - String lateList; - String hardWorkingList; - String company; - String staff; - String work; - String workday; - String holidays; - String punchingMode; - String whetherTheEmployeeHasAKey; - String selectKey; - String officeHours; - String closingTime; - String thisWeek; - String singleDayWeekend; - String twoDaysOff; - String oddOrEvenDaysOff; - String year; - String month; - String libertyDay; - String coverDate; - String addedHoliday; - String startDate; - String accessDate; - String mustFillIn; - String endDate; - String dailyCharts; - String monthlyLeaderboard; - String noAttendanceRecord; - String everyoneIsVeryMotivated; - String workingHoursWereNotReleased; - String beLate; - String leaveEarly; - String noCardPunched; + String? realNameAuthentication; + String? sendKeyBottomTip; + String? send; + String? periodValidity; + String? sendGroupKey; + String? lock; + String? pleaseAdd; + String? pleaseSelet; + String? remoteUnlockingAllowed; + String? pleaseEnter; + String? getPassword; + String? custom; + String? clearAll; + String? recursiveDevice; + String? pleaseNameYourPassword; + String? pleaseEnterDigitsNumber; + String? getPasswordTip1; + String? getPasswordTip2; + String? getPasswordTip3; + String? getPasswordTip4; + String? getPasswordTip5; + String? getPasswordTip6; + String? getTip; + String? addTip; + String? sender; + String? senderTime; + String? keyDetail; + String? detail; + String? delete; + String? passwordDetail; + String? share; + String? amend; + String? sure; + String? cancel; + String? add; + String? accountNumber; + String? volumeAuthorizationLock; + String? authorizedAdminTip; + String? lockOperatingRecordTip; + String? remoteUnlockingPageTip; + String? currentMode; + String? delayTime; + String? automaticBlockingTip; + String? time; + String? normallyOpen; + String? date; + String? begin; + String? end; + String? allDay; + String? save; + String? normallyOpenModeTip; + String? pleaseSeletLockVolume; + String? lockSoundTip; + String? low; + String? lower; + String? medium; + String? high; + String? higher; + String? burglarAlarmTip; + String? resetButtonTip; + String? calibrationTime; + String? setTheDSTMode; + String? diagnoseTip; + String? uploading; + String? uploadDataTip; + String? importOtherLockDataTip; + String? haveNewVersion; + String? currentVersion; + String? newVersion; + String? upgrade; + String? leisure; + String? checkedIn; + String? rankingList; + String? earlyArrivalList; + String? lateList; + String? hardWorkingList; + String? company; + String? staff; + String? work; + String? workday; + String? holidays; + String? punchingMode; + String? whetherTheEmployeeHasAKey; + String? selectKey; + String? officeHours; + String? closingTime; + String? thisWeek; + String? singleDayWeekend; + String? twoDaysOff; + String? oddOrEvenDaysOff; + String? year; + String? month; + String? libertyDay; + String? coverDate; + String? addedHoliday; + String? startDate; + String? accessDate; + String? mustFillIn; + String? endDate; + String? dailyCharts; + String? monthlyLeaderboard; + String? noAttendanceRecord; + String? everyoneIsVeryMotivated; + String? workingHoursWereNotReleased; + String? beLate; + String? leaveEarly; + String? noCardPunched; - String basicInformation; - String wirelessKeyboard; - String doorMagnetic; - String remoteUnlocking; - String automaticBlocking; - String normallyOpenMode; - String lockSound; - String burglarAlarm; - String resetButton; - String lockTime; - String diagnose; - String uploadData; - String importOtherLockData; - String lockEscalation; - String markedHouseState; - String unlockReminder; - String unlockQRCode; - String lockNumber; - String electricQuantity; - String lockName; - String lockGrouping; - String adminOpenLockPassword; - String update; - String updateElectricQuantityTip; - String adminOpenLockPasswordTip; - String updateLockAdminPassword; - String whenScreenFlashesClickNext; - String theScreenNeverFlickered; - String enterNumberOrPressSet; - String theLocationOfTheSetKeyWillBeDifferent; - String pressAndHoldTheResetButtonTwoSeconds; - String nearbyEquipment; - String noData; - String doorMagneticListTopTip; + String? basicInformation; + String? wirelessKeyboard; + String? doorMagnetic; + String? remoteUnlocking; + String? automaticBlocking; + String? normallyOpenMode; + String? lockSound; + String? burglarAlarm; + String? resetButton; + String? lockTime; + String? diagnose; + String? uploadData; + String? importOtherLockData; + String? lockEscalation; + String? markedHouseState; + String? unlockReminder; + String? unlockQRCode; + String? lockNumber; + String? electricQuantity; + String? lockName; + String? lockGrouping; + String? adminOpenLockPassword; + String? update; + String? updateElectricQuantityTip; + String? adminOpenLockPasswordTip; + String? updateLockAdminPassword; + String? whenScreenFlashesClickNext; + String? theScreenNeverFlickered; + String? enterNumberOrPressSet; + String? theLocationOfTheSetKeyWillBeDifferent; + String? pressAndHoldTheResetButtonTwoSeconds; + String? nearbyEquipment; + String? noData; + String? doorMagneticListTopTip; - String lanEnglish; - String lanChinese; - String multilingual; - String addLock; - String gateway; - String message; - String supportStaff; - String set; - String moreServices; + String? lanEnglish; + String? lanChinese; + String? multilingual; + String? addLock; + String? gateway; + String? message; + String? supportStaff; + String? set; + String? moreServices; - String moreSet; - String prompTone; - String touchUnlock; - String pushNotification; - String lockUserManagement; - String authorizedAdmin; - String lockGroup; - String transferSmartLock; - String transferGateway; + String? moreSet; + String? prompTone; + String? touchUnlock; + String? pushNotification; + String? lockUserManagement; + String? authorizedAdmin; + String? lockGroup; + String? transferSmartLock; + String? transferGateway; - String multiLanguage; - String lockScreen; - String closed; - String opened; - String hideInvalidUnlockPermissions; - String appUnlockRequiresMobilePhoneAccessToTheLock; - String valueAddedServices; - String about; - String userAgreement; - String privacyPolicy; - String personalInformationCollectionList; - String applicationPermissionDescription; - String thirdPartyInformationSharingList; - String logout; - String deleteAccount; + String? multiLanguage; + String? lockScreen; + String? closed; + String? opened; + String? hideInvalidUnlockPermissions; + String? appUnlockRequiresMobilePhoneAccessToTheLock; + String? valueAddedServices; + String? about; + String? userAgreement; + String? privacyPolicy; + String? personalInformationCollectionList; + String? applicationPermissionDescription; + String? thirdPartyInformationSharingList; + String? logout; + String? deleteAccount; - String allLock; - String searchAllLockType; - String doorLock; - String padlock; - String safeLock; - String intelligentLockCore; - String parkingLock; - String bicycleLock; - String longRangeControl; - String lightTouchScreen; - String lightTouchScreenTip; - String next; - String nearbyLock; - String addSuccessfullyPleaseRename; - String whenAddingLockThePhoneMustBeNextToTheLock; + String? allLock; + String? searchAllLockType; + String? doorLock; + String? padlock; + String? safeLock; + String? intelligentLockCore; + String? parkingLock; + String? bicycleLock; + String? longRangeControl; + String? lightTouchScreen; + String? lightTouchScreenTip; + String? next; + String? nearbyLock; + String? addSuccessfullyPleaseRename; + String? whenAddingLockThePhoneMustBeNextToTheLock; - String login; - String register; - String forgetPassword; - String readAndAgree; - String verificationCode; - String registerPasswordTip; - String iphone; - String email; - String countryAndRegion; - String selet; + String? login; + String? register; + String? forgetPassword; + String? readAndAgree; + String? verificationCode; + String? registerPasswordTip; + String? iphone; + String? email; + String? countryAndRegion; + String? selet; Map toJson() { final map = {}; diff --git a/star_lock/lib/translations/translation_loader.dart b/star_lock/lib/translations/translation_loader.dart index 9fb726b5..47e12bef 100644 --- a/star_lock/lib/translations/translation_loader.dart +++ b/star_lock/lib/translations/translation_loader.dart @@ -4,8 +4,8 @@ part of lib_trans; class TranslationLoader { - static bool get isZh => Get.locale?.languageCode?.toLowerCase() == 'zh'; - static bool get isEn => Get.locale?.languageCode?.toLowerCase() == 'en'; + static bool get isZh => Get.locale?.languageCode.toLowerCase() == 'zh'; + static bool get isEn => Get.locale?.languageCode.toLowerCase() == 'en'; static Map _zhMap = {}, @@ -15,16 +15,16 @@ class TranslationLoader { static Map get zhDic => _zhMap; static Map get enDic => _enMap; - static LanKeyEntity _lanKeyEntity; - static LanKeyEntity get lanKeys => _lanKeyEntity; + static LanKeyEntity? _lanKeyEntity; + static LanKeyEntity? get lanKeys => _lanKeyEntity; static Future loadTranslation({ - String zhSource, - String enSource, - String keySource,}) async { - _zhMap = await _loadJsonFile(zhSource); - _enMap = await _loadJsonFile(enSource); - _keyMap = await _loadJsonFile(keySource); + String? zhSource, + String? enSource, + String? keySource,}) async { + _zhMap = await _loadJsonFile(zhSource!); + _enMap = await _loadJsonFile(enSource!); + _keyMap = await _loadJsonFile(keySource!); _lanKeyEntity = LanKeyEntity.fromJson(_keyMap); } diff --git a/star_lock/pubspec.yaml b/star_lock/pubspec.yaml index ac72deda..8b737eb5 100644 --- a/star_lock/pubspec.yaml +++ b/star_lock/pubspec.yaml @@ -20,7 +20,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: '>=2.7.0 <3.0.0' + sdk: '>=2.12.0 <3.0.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions @@ -61,7 +61,7 @@ dependencies: #底部选择 flutter_pickers: ^2.1.9 #万年历 - syncfusion_flutter_datepicker: ^18.4.48 + syncfusion_flutter_datepicker: ^22.1.38 dev_dependencies: flutter_test: sdk: flutter