完成SDK更新到最新

This commit is contained in:
魏少阳 2023-07-15 15:11:28 +08:00
parent f73c7984a5
commit fc40b171c5
115 changed files with 1144 additions and 1107 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -15,7 +15,7 @@ DEPENDENCIES:
- Flutter (from `Flutter`) - Flutter (from `Flutter`)
- flutter_native_contact_picker (from `.symlinks/plugins/flutter_native_contact_picker/ios`) - flutter_native_contact_picker (from `.symlinks/plugins/flutter_native_contact_picker/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/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: EXTERNAL SOURCES:
device_info_plus: device_info_plus:
@ -27,7 +27,7 @@ EXTERNAL SOURCES:
package_info_plus: package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios" :path: ".symlinks/plugins/package_info_plus/ios"
path_provider_foundation: path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/ios" :path: ".symlinks/plugins/path_provider_foundation/darwin"
SPEC CHECKSUMS: SPEC CHECKSUMS:
device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed

View File

@ -3,7 +3,7 @@
archiveVersion = 1; archiveVersion = 1;
classes = { classes = {
}; };
objectVersion = 50; objectVersion = 54;
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
@ -230,10 +230,12 @@
}; };
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
inputPaths = ( inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
); );
name = "Thin Binary"; name = "Thin Binary";
outputPaths = ( outputPaths = (
@ -244,6 +246,7 @@
}; };
9740EEB61CF901F6004384FC /* Run Script */ = { 9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );

View File

@ -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/addDoorMagnetic/addDoorMagnetic_page.dart';
import 'main/lockDetail/lcokSet/doorMagnetic/doorMagneticList/doorMagnetic_page.dart'; import 'main/lockDetail/lcokSet/doorMagnetic/doorMagneticList/doorMagnetic_page.dart';
import 'main/lockDetail/lcokSet/doorMagnetic/nearbyDoorMagnetic/nearbyDoorMagnetic_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/lockEscalation/lockEscalation_page.dart';
import 'main/lockDetail/lcokSet/lockSet/lockSet_page.dart'; import 'main/lockDetail/lcokSet/lockSet/lockSet_page.dart';
import 'main/lockDetail/lcokSet/lockSoundSet/lockSoundSet_page.dart'; import 'main/lockDetail/lcokSet/lockSoundSet/lockSoundSet_page.dart';

View File

@ -5,11 +5,11 @@ class AppLog {
static bool _printLog = false; static bool _printLog = false;
static bool _onlyError = false; static bool _onlyError = false;
static showLog({@required bool printLog, bool onlyError}){ static showLog({required bool printLog, bool? onlyError}){
_printLog = printLog ?? false; _printLog = printLog ?? false;
_onlyError = onlyError ?? false; _onlyError = onlyError ?? false;
} }
static log(String msg,{bool error}){ static log(String msg,{bool? error}){
if(!kDebugMode)return; if(!kDebugMode)return;
error = error ?? false; error = error ?? false;
if(!_printLog)return; if(!_printLog)return;

View File

@ -17,7 +17,7 @@ class AppStyle {
static Size get btnMinSize2 => Size(60.w, 44.h); static Size get btnMinSize2 => Size(60.w, 44.h);
static Size get btnMinSize3 => Size(60.w, 53.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, fontSize: fontSize ?? 18.sp,
color: textColor ?? AppColors.buttonEnableTextColor, color: textColor ?? AppColors.buttonEnableTextColor,
fontWeight: fontWeight ?? FontWeight.normal, 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), minimumSize: MaterialStateProperty.resolveWith((states) => btnMinSize),
shape: MaterialStateProperty.resolveWith((states) => buttonShape_16), shape: MaterialStateProperty.resolveWith((states) => buttonShape_16),
backgroundColor: MaterialStateProperty.resolveWith((states){ backgroundColor: MaterialStateProperty.resolveWith((states){
bgColor ??= AppColors.normalTextColor; 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; return bgColor;
}), }),
overlayColor: MaterialStateProperty.resolveWith((states){ overlayColor: MaterialStateProperty.resolveWith((states){
textColor ??= AppColors.buttonEnableColor; textColor ??= AppColors.buttonEnableColor;
if(states.contains(MaterialState.pressed)) return textColor.withOpacity(0.1); if(states.contains(MaterialState.pressed)) return textColor?.withOpacity(0.1);
return textColor.withOpacity(0.1); return textColor?.withOpacity(0.1);
}), }),
foregroundColor: MaterialStateProperty.resolveWith((states){ foregroundColor: MaterialStateProperty.resolveWith((states){
textColor ??= AppColors.buttonEnableColor; 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; return textColor;
}), }),
textStyle: MaterialStateProperty.resolveWith((states){ textStyle: MaterialStateProperty.resolveWith((states){
@ -190,8 +190,8 @@ class AppStyle {
); );
static TextStyle appTextStyle({ static TextStyle appTextStyle({
Color textColor, Color? textColor,
double fontSize, double? fontSize,
}) => AppStyle.textStyle( }) => AppStyle.textStyle(
textColor: textColor, textColor: textColor,
fontSize: fontSize, fontSize: fontSize,

View File

@ -37,7 +37,7 @@ mixin BaseWidget{
), ),
Padding( Padding(
padding: const EdgeInsets.only(top: 10), 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)),
) )
], ],
), ),

View File

@ -15,7 +15,7 @@ import '../../tools/titleAppBar.dart';
import '../../translations/trans_lib.dart'; import '../../translations/trans_lib.dart';
class StarLockForgetPasswordPage extends StatefulWidget { class StarLockForgetPasswordPage extends StatefulWidget {
const StarLockForgetPasswordPage({Key key}) : super(key: key); const StarLockForgetPasswordPage({Key? key}) : super(key: key);
@override @override
State<StarLockForgetPasswordPage> createState() => _StarLockForgetPasswordPageState(); State<StarLockForgetPasswordPage> createState() => _StarLockForgetPasswordPageState();
@ -26,7 +26,7 @@ class _StarLockForgetPasswordPageState extends State<StarLockForgetPasswordPage>
final TextEditingController _pwdController = TextEditingController(); final TextEditingController _pwdController = TextEditingController();
final TextEditingController _codeController = TextEditingController(); final TextEditingController _codeController = TextEditingController();
Timer _timer; late Timer _timer;
int _seconds = 60; int _seconds = 60;
@ -35,7 +35,7 @@ class _StarLockForgetPasswordPageState extends State<StarLockForgetPasswordPage>
return Scaffold( return Scaffold(
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: const Color(0xFFFFFFFF), 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( body:ListView(
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: 40.h, top: 40.h,
@ -43,22 +43,22 @@ class _StarLockForgetPasswordPageState extends State<StarLockForgetPasswordPage>
right: 40.w right: 40.w
), ),
children: [ 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]')), FilteringTextInputFormatter.allow(RegExp('[0-9]')),
LengthLimitingTextInputFormatter(20), LengthLimitingTextInputFormatter(20),
]), ]),
SizedBox(height: 10.w), 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), LengthLimitingTextInputFormatter(20),
]), ]),
SizedBox(height: 15.w), 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), 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), LengthLimitingTextInputFormatter(20),
]), ]),
SizedBox(height: 10.w), 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]')), FilteringTextInputFormatter.allow(RegExp('[0-9]')),
LengthLimitingTextInputFormatter(6), LengthLimitingTextInputFormatter(6),
],rightSlot: Container( ],rightSlot: Container(
@ -73,7 +73,7 @@ class _StarLockForgetPasswordPageState extends State<StarLockForgetPasswordPage>
borderRadius: BorderRadius.circular(5) borderRadius: BorderRadius.circular(5)
), ),
child: Center( 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, color: Colors.white,
fontSize: 26.sp, fontSize: 26.sp,
)), )),
@ -89,7 +89,7 @@ class _StarLockForgetPasswordPageState extends State<StarLockForgetPasswordPage>
), ),
)), )),
SizedBox(height: 50.w), 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: (){
}), }),
], ],

View File

@ -12,7 +12,7 @@ import '../../tools/titleAppBar.dart';
import '../../translations/trans_lib.dart'; import '../../translations/trans_lib.dart';
class StarLockLoginPage extends StatefulWidget { class StarLockLoginPage extends StatefulWidget {
const StarLockLoginPage({Key key}) : super(key: key); const StarLockLoginPage({Key? key}) : super(key: key);
@override @override
State<StarLockLoginPage> createState() => _StarLockLoginPageState(); State<StarLockLoginPage> createState() => _StarLockLoginPageState();
@ -27,9 +27,9 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
return Scaffold( return Scaffold(
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: const Color(0xFFFFFFFF), 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( 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: (){ onPressed: (){
Navigator.pushNamed(context, Routers.starLockRegisterPage); Navigator.pushNamed(context, Routers.starLockRegisterPage);
},), },),
@ -48,12 +48,12 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
) )
), ),
SizedBox(height: 50.w), 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]')), FilteringTextInputFormatter.allow(RegExp('[0-9]')),
LengthLimitingTextInputFormatter(20), LengthLimitingTextInputFormatter(20),
]), ]),
SizedBox(height: 50.w), 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), LengthLimitingTextInputFormatter(20),
]), ]),
SizedBox(height: 20.h), SizedBox(height: 20.h),
@ -71,7 +71,7 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
Flexible( Flexible(
child: RichText( child: RichText(
text: TextSpan( text: TextSpan(
text: TranslationLoader.lanKeys.readAndAgree.tr, text: TranslationLoader.lanKeys!.readAndAgree!.tr,
style: TextStyle( style: TextStyle(
color: const Color(0xff333333), color: const Color(0xff333333),
fontSize: 26.sp fontSize: 26.sp
@ -80,7 +80,7 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
WidgetSpan( WidgetSpan(
alignment: PlaceholderAlignment.middle, alignment: PlaceholderAlignment.middle,
child: GestureDetector( child: GestureDetector(
child: Text('${TranslationLoader.lanKeys.userAgreement.tr}',style: TextStyle( child: Text('${TranslationLoader.lanKeys!.userAgreement!.tr}',style: TextStyle(
color: AppColors.mainColor, color: AppColors.mainColor,
fontSize: 26.sp fontSize: 26.sp
)), )),
@ -92,7 +92,7 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
WidgetSpan( WidgetSpan(
alignment: PlaceholderAlignment.middle, alignment: PlaceholderAlignment.middle,
child: GestureDetector( child: GestureDetector(
child: Text('${TranslationLoader.lanKeys.privacyPolicy.tr}',style: TextStyle( child: Text('${TranslationLoader.lanKeys!.privacyPolicy!.tr}',style: TextStyle(
color: AppColors.mainColor, color: AppColors.mainColor,
fontSize: 26.sp fontSize: 26.sp
)), )),
@ -108,7 +108,7 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
], ],
), ),
SizedBox(height: 50.w), 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), SizedBox(height: 50.w),
@ -121,7 +121,7 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
height: 50.h, height: 50.h,
// color: Colors.red, // color: Colors.red,
child: Center( 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: (){ onTap: (){

View File

@ -15,7 +15,7 @@ import '../../tools/titleAppBar.dart';
import '../../translations/trans_lib.dart'; import '../../translations/trans_lib.dart';
class StarLockRegisterPage extends StatefulWidget { class StarLockRegisterPage extends StatefulWidget {
const StarLockRegisterPage({Key key}) : super(key: key); const StarLockRegisterPage({Key? key}) : super(key: key);
@override @override
State<StarLockRegisterPage> createState() => _StarLockRegisterPageState(); State<StarLockRegisterPage> createState() => _StarLockRegisterPageState();
@ -26,7 +26,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
final TextEditingController _pwdController = TextEditingController(); final TextEditingController _pwdController = TextEditingController();
final TextEditingController _codeController = TextEditingController(); final TextEditingController _codeController = TextEditingController();
Timer _timer; late Timer _timer;
int _seconds = 60; int _seconds = 60;
@ -35,7 +35,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
return Scaffold( return Scaffold(
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: const Color(0xFFFFFFFF), 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( body:ListView(
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: 40.h, top: 40.h,
@ -45,7 +45,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
children: [ children: [
topSeletCountryAndRegionWidget (), topSeletCountryAndRegionWidget (),
middleTFWidget (), 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<StarLockRegisterPage> {
bottom: BorderSide(width: 1.0, color: Color(0xffC0C0C0)), 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( Expanded(
@ -113,7 +113,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
// bottom: BorderSide(width: 1.0, color: Color(0xffC0C0C0)), // 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<StarLockRegisterPage> {
child: Row( child: Row(
children: [ children: [
SizedBox(width:5.w), 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), SizedBox(width:20.w),
Row( Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
@ -157,22 +157,22 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
Widget middleTFWidget (){ Widget middleTFWidget (){
return Column( return Column(
children: [ 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]')), FilteringTextInputFormatter.allow(RegExp('[0-9]')),
LengthLimitingTextInputFormatter(20), LengthLimitingTextInputFormatter(20),
]), ]),
SizedBox(height: 10.w), 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), LengthLimitingTextInputFormatter(20),
]), ]),
SizedBox(height: 15.w), 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), 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), LengthLimitingTextInputFormatter(20),
]), ]),
SizedBox(height: 10.w), 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]')), FilteringTextInputFormatter.allow(RegExp('[0-9]')),
LengthLimitingTextInputFormatter(6), LengthLimitingTextInputFormatter(6),
],rightSlot: Container( ],rightSlot: Container(
@ -187,7 +187,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
borderRadius: BorderRadius.circular(5) borderRadius: BorderRadius.circular(5)
), ),
child: Center( 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, color: Colors.white,
fontSize: 26.sp fontSize: 26.sp
)), )),

View File

@ -7,7 +7,7 @@ import '../../tools/titleAppBar.dart';
import '../../translations/trans_lib.dart'; import '../../translations/trans_lib.dart';
class SeletCountryRegionPage extends StatefulWidget { class SeletCountryRegionPage extends StatefulWidget {
const SeletCountryRegionPage({Key key}) : super(key: key); const SeletCountryRegionPage({Key? key}) : super(key: key);
@override @override
State<SeletCountryRegionPage> createState() => _SeletCountryRegionPageState(); State<SeletCountryRegionPage> createState() => _SeletCountryRegionPageState();
@ -19,7 +19,7 @@ class _SeletCountryRegionPageState extends State<SeletCountryRegionPage> {
return Scaffold( return Scaffold(
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: const Color(0xFFFFFFFF), 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( body:ListView(
padding: EdgeInsets.only(top: 40.h, left: 40.w, right: 40.w), padding: EdgeInsets.only(top: 40.h, left: 40.w, right: 40.w),
children: [ children: [

View File

@ -23,7 +23,7 @@ void main() async {
} }
class MyApp extends StatefulWidget { class MyApp extends StatefulWidget {
const MyApp({GlobalKey key}):super(key: key); const MyApp({GlobalKey? key}):super(key: key);
@override @override
State<MyApp> createState() => _MyAppState(); State<MyApp> createState() => _MyAppState();
@ -49,7 +49,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver, BaseWidget {
], ],
localeResolutionCallback: (locale,supportedLocales){ localeResolutionCallback: (locale,supportedLocales){
if(!supportedLocales.contains(locale)) { 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) { if(idx != -1) {
locale = appSupportedLocales[idx]; locale = appSupportedLocales[idx];
}else { }else {
@ -57,7 +57,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver, BaseWidget {
} }
} }
// print("localelocalelocalelocalelocale locale:${locale} locale.languageCode:${locale.languageCode} locale.countryCode:${locale.countryCode} supportedLocales:${supportedLocales}"); // 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; return locale;
}, },
// locale: StoreService.to.getLanguageCode().isNotEmpty ? appDept.deptSupportedLocales.where((element) => element.languageCode == StoreService.to.getLanguageCode()).first : Get.deviceLocale, // locale: StoreService.to.getLanguageCode().isNotEmpty ? appDept.deptSupportedLocales.where((element) => element.languageCode == StoreService.to.getLanguageCode()).first : Get.deviceLocale,

View File

@ -8,7 +8,7 @@ import '../../../../../translations/trans_lib.dart';
import 'authorizedAdminManage_tabbar.dart'; import 'authorizedAdminManage_tabbar.dart';
class AuthorizedAdminManagePage extends StatefulWidget { class AuthorizedAdminManagePage extends StatefulWidget {
const AuthorizedAdminManagePage({Key key}) : super(key: key); const AuthorizedAdminManagePage({Key? key}) : super(key: key);
@override @override
State<AuthorizedAdminManagePage> createState() => _AuthorizedAdminManagePageState(); State<AuthorizedAdminManagePage> createState() => _AuthorizedAdminManagePageState();
@ -21,7 +21,7 @@ class _AuthorizedAdminManagePageState extends State<AuthorizedAdminManagePage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body: Column(
children: [ children: [
AuthorizedAdminManageTabbar(initialIndex: index,), AuthorizedAdminManageTabbar(initialIndex: index,),

View File

@ -11,18 +11,18 @@ import '../authorizedAdmin_page.dart';
class AuthorizedAdminManageTabbar extends StatefulWidget { class AuthorizedAdminManageTabbar extends StatefulWidget {
var initialIndex=1; var initialIndex=1;
AuthorizedAdminManageTabbar({Key key, @required this.initialIndex}) : super(key: key); AuthorizedAdminManageTabbar({Key? key, required this.initialIndex}) : super(key: key);
@override @override
State<AuthorizedAdminManageTabbar> createState() => _AuthorizedAdminManageTabbarState(); State<AuthorizedAdminManageTabbar> createState() => _AuthorizedAdminManageTabbarState();
} }
class _AuthorizedAdminManageTabbarState extends State<AuthorizedAdminManageTabbar> with SingleTickerProviderStateMixin { class _AuthorizedAdminManageTabbarState extends State<AuthorizedAdminManageTabbar> with SingleTickerProviderStateMixin {
TabController _tabController; late TabController _tabController;
final List<ItemView> _itemTabs= <ItemView>[ final List<ItemView> _itemTabs= <ItemView>[
ItemView(title: TranslationLoader.lanKeys.timeLimit.tr, type: "0"), ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: "0"),
ItemView(title: TranslationLoader.lanKeys.permanent.tr, type: "1"), ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: "1"),
]; ];
@override @override
@ -82,7 +82,7 @@ class _AuthorizedAdminManageTabbarState extends State<AuthorizedAdminManageTabba
} }
class ItemView { class ItemView {
const ItemView({@required this.title, @required this.type}); const ItemView({required this.title, required this.type});
final String title; final String title;
final String type; final String type;

View File

@ -11,7 +11,7 @@ import '../../../../translations/trans_lib.dart';
class AuthorizedAdminPage extends StatefulWidget { class AuthorizedAdminPage extends StatefulWidget {
final String type; final String type;
AuthorizedAdminPage({Key key, @required this.type}) : super(key: key); AuthorizedAdminPage({Key? key, required this.type}) : super(key: key);
@override @override
State<AuthorizedAdminPage> createState() => _AuthorizedAdminPageState(); State<AuthorizedAdminPage> createState() => _AuthorizedAdminPageState();
@ -19,7 +19,7 @@ class AuthorizedAdminPage extends StatefulWidget {
class _AuthorizedAdminPageState extends State<AuthorizedAdminPage> { class _AuthorizedAdminPageState extends State<AuthorizedAdminPage> {
final FlutterContactPicker _contactPicker = FlutterContactPicker(); final FlutterContactPicker _contactPicker = FlutterContactPicker();
Contact _contact; late Contact _contact;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -44,25 +44,19 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage> {
keyInfoWidget(), keyInfoWidget(),
keyTimeWidget(), keyTimeWidget(),
keyRealNameWidget(), 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: default:
break; //
return Column(
children: [
keyInfoWidget(),
keyRealNameWidget(),
keyBottomWidget(TranslationLoader.lanKeys!.authorizedAdminTip!.tr)
],
);
} }
} }
@ -71,8 +65,8 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage> {
return Column( return Column(
children: [ children: [
Container(height: 10.h), 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!.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!.name!.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: getTFWidget(false, TranslationLoader.lanKeys!.pleaseEnter!.tr)),
Container(height: 10.h), Container(height: 10.h),
], ],
); );
@ -82,10 +76,10 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage> {
Widget keyTimeWidget(){ Widget keyTimeWidget(){
return Column( return Column(
children: [ 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(); // _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(); // _showDatePicker();
}), }),
Container(height: 10.h), Container(height: 10.h),
@ -97,7 +91,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage> {
Widget keyRealNameWidget(){ Widget keyRealNameWidget(){
return Column( return Column(
children: [ 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), Container(height: 10.h),
@ -117,7 +111,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage> {
], ],
), ),
), ),
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: (){ onClick: (){
} }
@ -130,7 +124,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage> {
children: [ children: [
TextButton(onPressed: (){ TextButton(onPressed: (){
Navigator.pushNamed(context, Routers.volumeAuthorizationLockManagePage); 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<AuthorizedAdminPage> {
alignment: Alignment.center, alignment: Alignment.center,
child: InkWell( child: InkWell(
onTap: () async { onTap: () async {
Contact contact = await _contactPicker.selectContact(); Contact? contact = await _contactPicker.selectContact();
setState(() { setState(() {
_contact = contact; _contact = contact!;
// print("object111111111111 ${_contact.fullName} ${_contact.phoneNumbers}"); // print("object111111111111 ${_contact.fullName} ${_contact.phoneNumbers}");
}); });
}, },

View File

@ -12,7 +12,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class AuthorizedAdminDetailPage extends StatefulWidget { class AuthorizedAdminDetailPage extends StatefulWidget {
const AuthorizedAdminDetailPage({Key key}) : super(key: key); const AuthorizedAdminDetailPage({Key? key}) : super(key: key);
@override @override
State<AuthorizedAdminDetailPage> createState() => _AuthorizedAdminDetailPageState(); State<AuthorizedAdminDetailPage> createState() => _AuthorizedAdminDetailPageState();
@ -23,38 +23,38 @@ class _AuthorizedAdminDetailPageState extends State<AuthorizedAdminDetailPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( TextButton(
child: Text(TranslationLoader.lanKeys.share.tr, style: TextStyle(color: Colors.white),), child: Text(TranslationLoader.lanKeys!.share!.tr, style: TextStyle(color: Colors.white),),
onPressed: (){ onPressed: (){
},), },),
],), ],),
body: Column( body: Column(
children: [ 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); 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); 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); Navigator.pushNamed(context, Routers.electronicKeyDetailChangeDate);
}), }),
Container(height: 10.h), 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), 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), Container(height: 40.h),
SubmitBtn( SubmitBtn(
btnName: TranslationLoader.lanKeys.delete.tr, btnName: TranslationLoader.lanKeys!.delete!.tr,
borderRadius: 20.w, borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.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), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
@ -67,7 +67,7 @@ class _AuthorizedAdminDetailPageState extends State<AuthorizedAdminDetailPage> {
); );
} }
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( return GestureDetector(
onTap: action, onTap: action,
child: Column( child: Column(
@ -86,7 +86,7 @@ class _AuthorizedAdminDetailPageState extends State<AuthorizedAdminDetailPage> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: [ 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),)
], ],
), ),
), ),

View File

@ -10,7 +10,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class AuthorizedAdminListPage extends StatefulWidget { class AuthorizedAdminListPage extends StatefulWidget {
const AuthorizedAdminListPage({Key key}) : super(key: key); const AuthorizedAdminListPage({Key? key}) : super(key: key);
@override @override
State<AuthorizedAdminListPage> createState() => _AuthorizedAdminListPageState(); State<AuthorizedAdminListPage> createState() => _AuthorizedAdminListPageState();
@ -21,9 +21,9 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( 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: (){ onPressed: (){
},), },),
@ -33,7 +33,7 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
_searchWidget(), _searchWidget(),
Expanded(child: _buildMainUI()), Expanded(child: _buildMainUI()),
SubmitBtn( SubmitBtn(
btnName: TranslationLoader.lanKeys.authorizedAdmin.tr, btnName: TranslationLoader.lanKeys!.authorizedAdmin!.tr,
borderRadius: 20.w, borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.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), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
@ -62,7 +62,7 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
// //
contentPadding: const EdgeInsets.only( contentPadding: const EdgeInsets.only(
top: 12.0, left: -19.0, right: -15.0, bottom: 8.0), 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, border: InputBorder.none,
// //
@ -86,7 +86,7 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
); );
} }
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( return GestureDetector(
onTap: action, onTap: action,
child: Container( child: Container(

View File

@ -7,7 +7,7 @@ import '../../../../../tools/titleAppBar.dart';
import '../../../../../translations/trans_lib.dart'; import '../../../../../translations/trans_lib.dart';
class VolumeAuthorizationLockManagePage extends StatefulWidget { class VolumeAuthorizationLockManagePage extends StatefulWidget {
const VolumeAuthorizationLockManagePage({Key key}):super(key:key); const VolumeAuthorizationLockManagePage({Key? key}):super(key:key);
@override @override
State<VolumeAuthorizationLockManagePage> createState() => _VolumeAuthorizationLockManagePageState(); State<VolumeAuthorizationLockManagePage> createState() => _VolumeAuthorizationLockManagePageState();
@ -20,7 +20,7 @@ class _VolumeAuthorizationLockManagePageState extends State<VolumeAuthorizationL
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.add.tr} ${TranslationLoader.lanKeys.authorizedAdmin.tr}", haveBack:true, backgroundColor: AppColors.mainColor), appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.add!.tr} ${TranslationLoader.lanKeys!.authorizedAdmin!.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
body: Column( body: Column(
children: [ children: [
VolumeAuthorizationLockManageTabbar(initialIndex: index,), VolumeAuthorizationLockManageTabbar(initialIndex: index,),

View File

@ -10,18 +10,18 @@ import '../volumeAuthorizationLock_page.dart';
class VolumeAuthorizationLockManageTabbar extends StatefulWidget { class VolumeAuthorizationLockManageTabbar extends StatefulWidget {
var initialIndex=1; var initialIndex=1;
VolumeAuthorizationLockManageTabbar({Key key, @required this.initialIndex}) : super(key: key); VolumeAuthorizationLockManageTabbar({Key? key, required this.initialIndex}) : super(key: key);
@override @override
State<VolumeAuthorizationLockManageTabbar> createState() => _VolumeAuthorizationLockManageTabbarState(); State<VolumeAuthorizationLockManageTabbar> createState() => _VolumeAuthorizationLockManageTabbarState();
} }
class _VolumeAuthorizationLockManageTabbarState extends State<VolumeAuthorizationLockManageTabbar> with SingleTickerProviderStateMixin { class _VolumeAuthorizationLockManageTabbarState extends State<VolumeAuthorizationLockManageTabbar> with SingleTickerProviderStateMixin {
TabController _tabController; late TabController _tabController;
final List<ItemView> _itemTabs= <ItemView>[ final List<ItemView> _itemTabs= <ItemView>[
ItemView(title: TranslationLoader.lanKeys.permanent.tr, type: "0"), ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: "0"),
ItemView(title: TranslationLoader.lanKeys.timeLimit.tr, type: "1"), ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: "1"),
]; ];
@override @override
@ -81,7 +81,7 @@ class _VolumeAuthorizationLockManageTabbarState extends State<VolumeAuthorizatio
} }
class ItemView { class ItemView {
const ItemView({@required this.title, @required this.type}); const ItemView({required this.title, required this.type});
final String title; final String title;
final String type; final String type;

View File

@ -12,7 +12,7 @@ import '../../../../translations/trans_lib.dart';
class VolumeAuthorizationLockPage extends StatefulWidget { class VolumeAuthorizationLockPage extends StatefulWidget {
final String type; final String type;
const VolumeAuthorizationLockPage({Key key, @required this.type}):super(key:key); const VolumeAuthorizationLockPage({Key? key, required this.type}):super(key:key);
@override @override
State<VolumeAuthorizationLockPage> createState() => _VolumeAuthorizationLockPageState(); State<VolumeAuthorizationLockPage> createState() => _VolumeAuthorizationLockPageState();
@ -20,7 +20,7 @@ class VolumeAuthorizationLockPage extends StatefulWidget {
class _VolumeAuthorizationLockPageState extends State<VolumeAuthorizationLockPage> { class _VolumeAuthorizationLockPageState extends State<VolumeAuthorizationLockPage> {
final FlutterContactPicker _contactPicker = FlutterContactPicker(); final FlutterContactPicker _contactPicker = FlutterContactPicker();
Contact _contact; late Contact _contact;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -47,21 +47,16 @@ class _VolumeAuthorizationLockPageState extends State<VolumeAuthorizationLockPag
], ],
); );
} }
break;
case 1:
{
//
return Column(
children: [
keyInfoWidget(),
keyTimeWidget(),
remoteUnlockingWidget(),
keyBottomWidget()
],
);
}
break;
default: default:
//
return Column(
children: [
keyInfoWidget(),
keyTimeWidget(),
remoteUnlockingWidget(),
keyBottomWidget()
],
);
break; break;
} }
} }
@ -71,8 +66,8 @@ class _VolumeAuthorizationLockPageState extends State<VolumeAuthorizationLockPag
return Column( return Column(
children: [ children: [
Container(height: 10.h), Container(height: 10.h),
CommonItem(leftTitel:TranslationLoader.lanKeys.number.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(true, TranslationLoader.lanKeys.pleaseEnterNumberOrEmail.tr)), CommonItem(leftTitel:TranslationLoader.lanKeys!.number!.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!.name!.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: getTFWidget(false, TranslationLoader.lanKeys!.pleaseEnter!.tr)),
Container(height: 10.h), Container(height: 10.h),
], ],
); );
@ -82,8 +77,8 @@ class _VolumeAuthorizationLockPageState extends State<VolumeAuthorizationLockPag
Widget keyTimeWidget(){ Widget keyTimeWidget(){
return Column( return Column(
children: [ children: [
CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true), 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!.failureTime!.tr, rightTitle:"2020.06.20 11:49", ),
Container(height: 10.h), Container(height: 10.h),
], ],
); );
@ -93,11 +88,11 @@ class _VolumeAuthorizationLockPageState extends State<VolumeAuthorizationLockPag
Widget remoteUnlockingWidget(){ Widget remoteUnlockingWidget(){
return Column( return Column(
children: [ children: [
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), Container(height: 10.h),
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: SizedBox(width: 80.w, height: 50.h,child: _switch()), action:(){
}), }),
Container(height: 10.h), Container(height: 10.h),
@ -109,7 +104,7 @@ class _VolumeAuthorizationLockPageState extends State<VolumeAuthorizationLockPag
return Column( return Column(
children: [ children: [
SubmitBtn( SubmitBtn(
btnName: TranslationLoader.lanKeys.sure.tr, btnName: TranslationLoader.lanKeys!.sure!.tr,
borderRadius: 20.w, borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
@ -158,9 +153,9 @@ class _VolumeAuthorizationLockPageState extends State<VolumeAuthorizationLockPag
alignment: Alignment.center, alignment: Alignment.center,
child: InkWell( child: InkWell(
onTap: () async { onTap: () async {
Contact contact = await _contactPicker.selectContact(); Contact? contact = await _contactPicker.selectContact();
setState(() { setState(() {
_contact = contact; _contact = contact!;
// print("object111111111111 ${_contact.fullName} ${_contact.phoneNumbers}"); // print("object111111111111 ${_contact.fullName} ${_contact.phoneNumbers}");
}); });
}, },

View File

@ -10,7 +10,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class CheckingInAddHolidaysPage extends StatefulWidget { class CheckingInAddHolidaysPage extends StatefulWidget {
const CheckingInAddHolidaysPage({Key key}) : super(key: key); const CheckingInAddHolidaysPage({Key? key}) : super(key: key);
@override @override
State<CheckingInAddHolidaysPage> createState() => _CheckingInAddHolidaysPageState(); State<CheckingInAddHolidaysPage> createState() => _CheckingInAddHolidaysPageState();
@ -22,11 +22,11 @@ class _CheckingInAddHolidaysPageState extends State<CheckingInAddHolidaysPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body: Column(
children: [ children: [
CommonItem(leftTitel:TranslationLoader.lanKeys.name.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget("(${TranslationLoader.lanKeys.mustFillIn.tr})")), 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!.startDate!.tr, rightTitle:"(${TranslationLoader.lanKeys!.mustFillIn!.tr})", isHaveLine: true, isHaveDirection: false, action: () async {
await showDialog(context: context, await showDialog(context: context,
builder: (context) { builder: (context) {
return ShowCalendar(datePickerMode: DatePickerMode.day, seletAction: (dateTime){ return ShowCalendar(datePickerMode: DatePickerMode.day, seletAction: (dateTime){
@ -35,7 +35,7 @@ class _CheckingInAddHolidaysPageState extends State<CheckingInAddHolidaysPage> {
}); });
}); });
}), }),
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, await showDialog(context: context,
builder: (context) { builder: (context) {
return ShowCalendar(datePickerMode: DatePickerMode.day, seletAction: (dateTime){ return ShowCalendar(datePickerMode: DatePickerMode.day, seletAction: (dateTime){
@ -43,7 +43,7 @@ class _CheckingInAddHolidaysPageState extends State<CheckingInAddHolidaysPage> {
}); });
}); });
}), }),
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, await showDialog(context: context,
builder: (context) { builder: (context) {
return ShowCalendar(datePickerMode: DatePickerMode.day, seletAction: (dateTime){ return ShowCalendar(datePickerMode: DatePickerMode.day, seletAction: (dateTime){
@ -52,7 +52,7 @@ class _CheckingInAddHolidaysPageState extends State<CheckingInAddHolidaysPage> {
}); });
}), }),
SizedBox(height: 50.w,), 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: (){ onClick: (){
} }

View File

@ -7,7 +7,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class CheckingInDetailPage extends StatefulWidget { class CheckingInDetailPage extends StatefulWidget {
const CheckingInDetailPage({Key key}) : super(key: key); const CheckingInDetailPage({Key? key}) : super(key: key);
@override @override
_CheckingInDetailPageState createState() => _CheckingInDetailPageState(); _CheckingInDetailPageState createState() => _CheckingInDetailPageState();
@ -114,8 +114,8 @@ class _CheckingInDetailPageState extends State<CheckingInDetailPage> {
child: Container( child: Container(
// margin: EdgeInsets.only(left: 20.w), // margin: EdgeInsets.only(left: 20.w),
child: Image( child: Image(
width: 30.w, width: 40.w,
height: 30.w, height: 40.w,
image: const AssetImage("images/icon_left_black.png"), image: const AssetImage("images/icon_left_black.png"),
), ),
), ),
@ -130,8 +130,8 @@ class _CheckingInDetailPageState extends State<CheckingInDetailPage> {
child: Container( child: Container(
// margin: EdgeInsets.only(right: 20.sp), // margin: EdgeInsets.only(right: 20.sp),
child: Image( child: Image(
width: 30.w, width: 40.w,
height: 30.h, height: 40.h,
image: const AssetImage("images/icon_right_black.png"), image: const AssetImage("images/icon_right_black.png"),
), ),
), ),
@ -143,7 +143,14 @@ class _CheckingInDetailPageState extends State<CheckingInDetailPage> {
// //
Widget _weekHeader() { 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( return Container(
height: 50.h, height: 50.h,
child: GridView.builder( child: GridView.builder(
@ -202,7 +209,7 @@ class _CheckingInDetailPageState extends State<CheckingInDetailPage> {
for (int i = 0; i < _datas.length; i++) { for (int i = 0; i < _datas.length; i++) {
if (i == index) { if (i == index) {
// //
_day = _datas[i].day; _day = _datas[i].day!;
_datas[i].isSelect = true; _datas[i].isSelect = true;
// //
@ -224,7 +231,7 @@ class _CheckingInDetailPageState extends State<CheckingInDetailPage> {
width: 40.w, width: 40.w,
height: 40.w, height: 40.w,
// //
decoration: _datas[index].isSelect decoration: _datas[index].isSelect!
? const BoxDecoration( ? const BoxDecoration(
color: Color(0xFF2C91F6), color: Color(0xFF2C91F6),
shape: BoxShape.circle, shape: BoxShape.circle,
@ -238,7 +245,7 @@ class _CheckingInDetailPageState extends State<CheckingInDetailPage> {
: "", : "",
textAlign: TextAlign.center, textAlign: TextAlign.center,
// //
style: _datas[index].isSelect style: _datas[index].isSelect!
? TextStyle( ? TextStyle(
fontSize: 32.sp, color: const Color(0xFFFFFFFF)) fontSize: 32.sp, color: const Color(0xFFFFFFFF))
: (index % 7 == 5 || index % 7 == 6 : (index % 7 == 5 || index % 7 == 6
@ -325,7 +332,7 @@ class _CheckingInDetailPageState extends State<CheckingInDetailPage> {
} }
// //
int _getRowsForMonthYear({int year, int month}) { int _getRowsForMonthYear({int? year, int? month}) {
// //
var currentMonthDays = _getCurrentMonthDays(year: year, month: month); var currentMonthDays = _getCurrentMonthDays(year: year, month: month);
// //
@ -341,15 +348,15 @@ class _CheckingInDetailPageState extends State<CheckingInDetailPage> {
} }
// //
int _getPlaceholderDays({int year, int month}) { int _getPlaceholderDays({int? year, int? month}) {
return DateTime(year, month).weekday - 1 % 7; return DateTime(year!, month!).weekday - 1 % 7;
} }
// //
int _getCurrentMonthDays({int year, int month}) { int _getCurrentMonthDays({int? year, int? month}) {
if (month == 2) { if (month == 2) {
//2 //2
if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) { if (((year! % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) {
return 29; return 29;
} else { } else {
return 28; return 28;
@ -368,12 +375,12 @@ class _CheckingInDetailPageState extends State<CheckingInDetailPage> {
} }
/// ///
_setDatas({int year, int month}) { _setDatas({int? year, int? month}) {
/// ///
var lastYear = year; var lastYear = year;
var lastMonth = month - 1; var lastMonth = month! - 1;
if (month == 1) { if (month == 1) {
lastYear = year - 1; lastYear = (year! - 1)!;
lastMonth = 12; lastMonth = 12;
} }
@ -413,7 +420,7 @@ class _CheckingInDetailPageState extends State<CheckingInDetailPage> {
var nextYear = year; var nextYear = year;
var nextMonth = month + 1; var nextMonth = month + 1;
if (month == 12) { if (month == 12) {
nextYear = year + 1; nextYear = (year! + 1)!;
nextMonth = 1; nextMonth = 1;
} }
var nextPlaceholderDays = var nextPlaceholderDays =
@ -489,11 +496,11 @@ class _CheckingInDetailPageState extends State<CheckingInDetailPage> {
//bean //bean
class CalendarModel { class CalendarModel {
int year; int? year;
int month; int? month;
int day; int? day;
String workType = "";//012 String? workType = "";//012
bool isSelect = false; bool? isSelect = false;
CalendarModel( CalendarModel(
{this.year, this.month, this.day, this.isSelect, this.workType}); {this.year, this.month, this.day, this.isSelect, this.workType});

View File

@ -11,7 +11,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class CheckingInListPage extends StatefulWidget { class CheckingInListPage extends StatefulWidget {
const CheckingInListPage({Key key}) : super(key: key); const CheckingInListPage({Key? key}) : super(key: key);
@override @override
State<CheckingInListPage> createState() => _CheckingInListPageState(); State<CheckingInListPage> createState() => _CheckingInListPageState();
@ -53,7 +53,7 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
SizedBox(height: 30.h,), SizedBox(height: 30.h,),
Image.asset('images/main/icon_checkInRankingListTop.png', width: 145.w, height: 145.w), Image.asset('images/main/icon_checkInRankingListTop.png', width: 145.w, height: 145.w),
SizedBox(height: 10.h,), 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,), SizedBox(height: 30.h,),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -69,7 +69,7 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [ 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) Container(width: 20.w, height: 2.h, color: AppColors.mainColor)
], ],
), ),
@ -82,7 +82,7 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [ 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) Container(width: 20.w, height: 2.h, color: Colors.black)
], ],
), ),
@ -132,8 +132,8 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [ children: [
SizedBox(height: 5.h,), SizedBox(height: 5.h,),
Text("0", style: TextStyle(color: Colors.black)), const Text("0", style: TextStyle(color: Colors.black)),
Text(TranslationLoader.lanKeys.beLate.tr, style: TextStyle(color: Colors.black)), Text(TranslationLoader.lanKeys!.beLate!.tr, style: const TextStyle(color: Colors.black)),
SizedBox(height: 5.h,), SizedBox(height: 5.h,),
], ],
), ),
@ -147,7 +147,7 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
children: [ children: [
SizedBox(height: 5.h,), SizedBox(height: 5.h,),
Text("0", style: TextStyle(color: Colors.black)), 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,), SizedBox(height: 5.h,),
], ],
), ),
@ -161,7 +161,7 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
children: [ children: [
SizedBox(height: 5.h,), SizedBox(height: 5.h,),
Text("0", style: TextStyle(color: Colors.black)), 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,), SizedBox(height: 5.h,),
], ],
), ),
@ -186,7 +186,7 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
); );
} }
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( return GestureDetector(
onTap: action, onTap: action,
child: Container( child: Container(
@ -232,7 +232,7 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ 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,), SizedBox(width: 5.w,),
Image.asset('images/main/icon_lockDetail_checkIn_topTitle.png', width: 30.w, height: 16.w,) Image.asset('images/main/icon_lockDetail_checkIn_topTitle.png', width: 30.w, height: 16.w,)
], ],
@ -240,16 +240,16 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
); );
} }
Widget showListType(){ void showListType(){
var list = [TranslationLoader.lanKeys.earlyArrivalList.tr, TranslationLoader.lanKeys.lateList.tr, TranslationLoader.lanKeys.hardWorkingList.tr]; var list = [TranslationLoader.lanKeys!.earlyArrivalList!.tr, TranslationLoader.lanKeys!.lateList!.tr, TranslationLoader.lanKeys!.hardWorkingList!.tr];
ShowBottomSheetTool().showSingleRowPicker( ShowBottomSheetTool().showSingleRowPicker(
// //
context, context,
// //
normalIndex: 0, normalIndex: 0,
title: TranslationLoader.lanKeys.rankingList.tr, title: TranslationLoader.lanKeys!.rankingList!.tr,
cancelTitle: TranslationLoader.lanKeys.cancel.tr, cancelTitle: TranslationLoader.lanKeys!.cancel!.tr,
sureTitle: TranslationLoader.lanKeys.sure.tr, sureTitle: TranslationLoader.lanKeys!.sure!.tr,
// //
// //
//adapter: PickerAdapter(), //adapter: PickerAdapter(),

View File

@ -12,39 +12,39 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class CheckingInSetPage extends StatefulWidget { class CheckingInSetPage extends StatefulWidget {
const CheckingInSetPage({Key key}) : super(key: key); const CheckingInSetPage({Key? key}) : super(key: key);
@override @override
State<CheckingInSetPage> createState() => _CheckingInSetPageState(); State<CheckingInSetPage> createState() => _CheckingInSetPageState();
} }
class _CheckingInSetPageState extends State<CheckingInSetPage> { class _CheckingInSetPageState extends State<CheckingInSetPage> {
TextEditingController _changeNameController; late TextEditingController _changeNameController;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body: Column(
children: [ 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); 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); 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); 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); 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); Navigator.pushNamed(context, Routers.checkingInSetHolidaysPage);
}), }),
SizedBox(height: 30.h,), 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, borderRadius: 20.w,
fontSize: 32.sp, fontSize: 32.sp,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w), margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w),
@ -62,7 +62,7 @@ class _CheckingInSetPageState extends State<CheckingInSetPage> {
showDialog( showDialog(
context: context, context: context,
builder: (BuildContext 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);
}); });
} }
} }

View File

@ -11,7 +11,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class CheckingInAddStaffPage extends StatefulWidget { class CheckingInAddStaffPage extends StatefulWidget {
const CheckingInAddStaffPage({Key key}) : super(key: key); const CheckingInAddStaffPage({Key? key}) : super(key: key);
@override @override
State<CheckingInAddStaffPage> createState() => _CheckingInAddStaffPageState(); State<CheckingInAddStaffPage> createState() => _CheckingInAddStaffPageState();
@ -22,15 +22,15 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body: Column(
children: [ children: [
CommonItem(leftTitel:TranslationLoader.lanKeys.name.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(TranslationLoader.lanKeys.pleaseEnter.tr)), 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!.punchingMode!.tr, rightTitle:"APP", isHaveLine: false, isHaveDirection: true, action: (){
_showSeletClockInType(); _showSeletClockInType();
}), }),
SizedBox(height: 10.h,), 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: [ children: [
whetherTheEmployeeHasAKeyWidget("", (){ whetherTheEmployeeHasAKeyWidget("", (){
@ -43,16 +43,16 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
)), )),
Visibility( Visibility(
visible:true, 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( Visibility(
visible:true, 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(); _showSeletClockInType();
}), }),
), ),
SizedBox(height: 50.w,), 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: (){ onClick: (){
} }
@ -91,16 +91,16 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
); );
} }
Widget _showSeletClockInType(){ void _showSeletClockInType(){
var list = ["15080825640",]; var list = ["15080825640",];
ShowBottomSheetTool().showSingleRowPicker( ShowBottomSheetTool().showSingleRowPicker(
// //
context, context,
// //
normalIndex: 0, normalIndex: 0,
title: "选择钥匙", title: "选择钥匙",
cancelTitle: TranslationLoader.lanKeys.cancel.tr, cancelTitle: TranslationLoader.lanKeys!.cancel!.tr,
sureTitle: TranslationLoader.lanKeys.sure.tr, sureTitle: TranslationLoader.lanKeys!.sure!.tr,
// //
// //
//adapter: PickerAdapter(), //adapter: PickerAdapter(),

View File

@ -16,7 +16,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class CheckingInSetHolidaysPage extends StatefulWidget { class CheckingInSetHolidaysPage extends StatefulWidget {
const CheckingInSetHolidaysPage({Key key}) : super(key: key); const CheckingInSetHolidaysPage({Key? key}) : super(key: key);
@override @override
State<CheckingInSetHolidaysPage> createState() => _CheckingInSetHolidaysPageState(); State<CheckingInSetHolidaysPage> createState() => _CheckingInSetHolidaysPageState();
@ -48,7 +48,7 @@ class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
); );
} }
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( return GestureDetector(
onTap: action, onTap: action,
child: Container( child: Container(
@ -64,7 +64,7 @@ class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
color: const Color(0xFFAFB5D7), color: const Color(0xFFAFB5D7),
width: 100.w, width: 100.w,
height: 140.h, 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,), SizedBox(width: 30.w,),
Expanded( Expanded(
@ -85,7 +85,7 @@ class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ 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<CheckingInSetHolidaysPage> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ 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<CheckingInSetHolidaysPage> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ 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,), SizedBox(width: 5.w,),
Image.asset('images/main/icon_lockDetail_checkIn_topTitle.png', width: 30.w, height: 16.w,) Image.asset('images/main/icon_lockDetail_checkIn_topTitle.png', width: 30.w, height: 16.w,)
], ],
@ -124,7 +124,7 @@ class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
); );
} }
Widget showListType(){ void showListType(){
Pickers.showDatePicker( Pickers.showDatePicker(
context, context,
// //
@ -140,7 +140,7 @@ class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
padding: const EdgeInsets.only(left: 22, right: 12), 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( commitButton: GestureDetector(
@ -150,7 +150,7 @@ class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
padding: const EdgeInsets.only(left: 22, right: 12), 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)), style: const TextStyle(color: Colors.black, fontSize: 16.0)),
), ),
), ),

View File

@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class CheckingInStaffManagePage extends StatefulWidget { class CheckingInStaffManagePage extends StatefulWidget {
const CheckingInStaffManagePage({Key key}) : super(key: key); const CheckingInStaffManagePage({Key? key}) : super(key: key);
@override @override
State<CheckingInStaffManagePage> createState() => _CheckingInStaffManagePageState(); State<CheckingInStaffManagePage> createState() => _CheckingInStaffManagePageState();
@ -20,7 +20,7 @@ class _CheckingInStaffManagePageState extends State<CheckingInStaffManagePage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: Colors.white, 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( GestureDetector(
onTap: (){ onTap: (){
Navigator.pushNamed(context, Routers.checkingInAddStaffPage); Navigator.pushNamed(context, Routers.checkingInAddStaffPage);
@ -44,7 +44,7 @@ class _CheckingInStaffManagePageState extends State<CheckingInStaffManagePage> {
); );
} }
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( return GestureDetector(
onTap: action, onTap: action,
child: Container( child: Container(

View File

@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class CheckingInSetWorkTimePage extends StatefulWidget { class CheckingInSetWorkTimePage extends StatefulWidget {
const CheckingInSetWorkTimePage({Key key}) : super(key: key); const CheckingInSetWorkTimePage({Key? key}) : super(key: key);
@override @override
State<CheckingInSetWorkTimePage> createState() => _CheckingInSetWorkTimePageState(); State<CheckingInSetWorkTimePage> createState() => _CheckingInSetWorkTimePageState();
@ -21,7 +21,7 @@ class _CheckingInSetWorkTimePageState extends State<CheckingInSetWorkTimePage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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(), body: buildMainUI(),
); );
} }
@ -29,18 +29,18 @@ class _CheckingInSetWorkTimePageState extends State<CheckingInSetWorkTimePage> {
Widget buildMainUI(){ Widget buildMainUI(){
return Column( return Column(
children: [ 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<int> index) { // ShowSeletDateTime().showDatePicker(context, '2100-01-01 00:00', '1900-01-01 00:00', getNowDate(),'yyyy-MMMM-dd HH:mm', (dateTime, List<int> 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<int> index) { // ShowSeletDateTime().showDatePicker(context, '00:00', '00:00', getNowDate(),'HH:mm', (dateTime, List<int> index) {
// //
// }); // });
}), }),
SizedBox(height: 30.h,), SizedBox(height: 30.h,),
SubmitBtn(btnName: TranslationLoader.lanKeys.sure.tr, SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr,
borderRadius: 20.w, borderRadius: 20.w,
fontSize: 32.sp, fontSize: 32.sp,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w), margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w),

View File

@ -10,7 +10,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class CheckingInSetWorkdaySet extends StatefulWidget { class CheckingInSetWorkdaySet extends StatefulWidget {
const CheckingInSetWorkdaySet({Key key}) : super(key: key); const CheckingInSetWorkdaySet({Key? key}) : super(key: key);
@override @override
State<CheckingInSetWorkdaySet> createState() => _CheckingInSetWorkdaySetState(); State<CheckingInSetWorkdaySet> createState() => _CheckingInSetWorkdaySetState();
@ -21,7 +21,7 @@ class _CheckingInSetWorkdaySetState extends State<CheckingInSetWorkdaySet> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body: ListView(
children: [ children: [
topBtnWidget(), topBtnWidget(),
@ -34,7 +34,7 @@ class _CheckingInSetWorkdaySetState extends State<CheckingInSetWorkdaySet> {
child: bottomOddOrEvenDaysOffSeletBtn() child: bottomOddOrEvenDaysOffSeletBtn()
), ),
SizedBox(height: 50.h,), SizedBox(height: 50.h,),
SubmitBtn(btnName:TranslationLoader.lanKeys.sure.tr, SubmitBtn(btnName:TranslationLoader.lanKeys!.sure!.tr,
borderRadius: 20.w, borderRadius: 20.w,
fontSize: 32.sp, fontSize: 32.sp,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w), margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w),
@ -63,7 +63,7 @@ class _CheckingInSetWorkdaySetState extends State<CheckingInSetWorkdaySet> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ 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<CheckingInSetWorkdaySet> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ 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<CheckingInSetWorkdaySet> {
padding: EdgeInsets.only(left:10.w, right: 10.w), padding: EdgeInsets.only(left:10.w, right: 10.w),
child: Column( child: Column(
children: [ children: [
CommonItem(leftTitel:TranslationLoader.lanKeys.thisWeek.tr, rightTitle:"", allHeight:70.h, isHaveLine: 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, CommonItem(leftTitel:TranslationLoader.lanKeys!.singleDayWeekend!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
rightWidget: GestureDetector( rightWidget: GestureDetector(
onTap: (){ onTap: (){
}, },
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) 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( rightWidget: GestureDetector(
onTap: (){ onTap: (){
@ -116,49 +116,49 @@ class _CheckingInSetWorkdaySetState extends State<CheckingInSetWorkdaySet> {
padding: EdgeInsets.only(left:10.w, right: 10.w), padding: EdgeInsets.only(left:10.w, right: 10.w),
child: Column( child: Column(
children: [ 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( rightWidget: GestureDetector(
onTap: (){ onTap: (){
}, },
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) 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( rightWidget: GestureDetector(
onTap: (){ onTap: (){
}, },
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) 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( rightWidget: GestureDetector(
onTap: (){ onTap: (){
}, },
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) 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( rightWidget: GestureDetector(
onTap: (){ onTap: (){
}, },
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) 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( rightWidget: GestureDetector(
onTap: (){ onTap: (){
}, },
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) 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( rightWidget: GestureDetector(
onTap: (){ onTap: (){
}, },
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) 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( rightWidget: GestureDetector(
onTap: (){ onTap: (){

View File

@ -12,50 +12,50 @@ import '../../../../../tools/titleAppBar.dart';
import '../../../../../translations/trans_lib.dart'; import '../../../../../translations/trans_lib.dart';
class ElectronicKeyDetailPage extends StatefulWidget { class ElectronicKeyDetailPage extends StatefulWidget {
const ElectronicKeyDetailPage({Key key}) : super(key: key); const ElectronicKeyDetailPage({Key? key}) : super(key: key);
@override @override
State<ElectronicKeyDetailPage> createState() => _ElectronicKeyDetailPageState(); State<ElectronicKeyDetailPage> createState() => _ElectronicKeyDetailPageState();
} }
class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> { class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
TextEditingController _changeNameController; late TextEditingController _changeNameController;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: AppColors.mainBackgroundColor, 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( body: Column(
children: [ 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); 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); Navigator.pushNamed(context, Routers.electronicKeyDetailChangeDate);
}), }),
Container(height: 10.h), 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), 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), 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), Container(height: 40.h),
SubmitBtn( SubmitBtn(
btnName: TranslationLoader.lanKeys.delete, btnName: TranslationLoader.lanKeys!.delete!.tr,
borderRadius: 20.w, borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.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), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
@ -68,7 +68,7 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
); );
} }
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( return GestureDetector(
onTap: action, onTap: action,
child: Column( child: Column(
@ -87,7 +87,7 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: [ 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<ElectronicKeyDetailPage> {
showDialog( showDialog(
context: context, context: context,
builder: (BuildContext 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);
}); });
} }

View File

@ -10,7 +10,7 @@ import '../../../../../tools/titleAppBar.dart';
import '../../../../../translations/trans_lib.dart'; import '../../../../../translations/trans_lib.dart';
class ElectronicKeyDetailChangeDate extends StatefulWidget { class ElectronicKeyDetailChangeDate extends StatefulWidget {
const ElectronicKeyDetailChangeDate({Key key}) : super(key: key); const ElectronicKeyDetailChangeDate({Key? key}) : super(key: key);
@override @override
State<ElectronicKeyDetailChangeDate> createState() => _ElectronicKeyDetailChangeDateState(); State<ElectronicKeyDetailChangeDate> createState() => _ElectronicKeyDetailChangeDateState();
@ -22,8 +22,8 @@ class _ElectronicKeyDetailChangeDateState extends State<ElectronicKeyDetailChang
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.amend.tr} ${TranslationLoader.lanKeys.periodValidity.tr}", haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.amend!.tr} ${TranslationLoader.lanKeys!.periodValidity!.tr}", haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
TextButton(child: Text(TranslationLoader.lanKeys.sure.tr, style: const TextStyle(color: Colors.white),), onPressed: (){ TextButton(child: Text(TranslationLoader.lanKeys!.sure!.tr, style: const TextStyle(color: Colors.white),), onPressed: (){
},), },),
],), ],),
@ -34,12 +34,12 @@ class _ElectronicKeyDetailChangeDateState extends State<ElectronicKeyDetailChang
Widget buildMainUI(){ Widget buildMainUI(){
return Column( return Column(
children: [ children: [
CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, isHaveLine: true, action:(){ CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"2020.06.20 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<int> index) { ShowSeletDateTime().showDatePicker(context, '2100-01-01 00:00', '1900-01-01 00:00', getNowDate(),'yyyy-MMMM-dd HH:mm', (dateTime, List<int> 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<int> index) { ShowSeletDateTime().showDatePicker(context, '00:00', '00:00', getNowDate(),'HH:mm', (dateTime, List<int> index) {
}); });

View File

@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class ElectronicKeyListPage extends StatefulWidget { class ElectronicKeyListPage extends StatefulWidget {
const ElectronicKeyListPage({Key key}) : super(key: key); const ElectronicKeyListPage({Key? key}) : super(key: key);
@override @override
State<ElectronicKeyListPage> createState() => _ElectronicKeyListPageState(); State<ElectronicKeyListPage> createState() => _ElectronicKeyListPageState();
@ -20,9 +20,9 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( 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: (){ onPressed: (){
},), },),
@ -32,7 +32,7 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
_searchWidget(), _searchWidget(),
Expanded(child: _buildMainUI()), Expanded(child: _buildMainUI()),
SubmitBtn( SubmitBtn(
btnName: TranslationLoader.lanKeys.sendKey.tr, btnName: TranslationLoader.lanKeys!.sendKey!.tr,
borderRadius: 20.w, borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.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), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
@ -61,7 +61,7 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
// //
contentPadding: const EdgeInsets.only( contentPadding: const EdgeInsets.only(
top: 12.0, left: -19.0, right: -15.0, bottom: 8.0), 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, border: InputBorder.none,
// //
@ -85,7 +85,7 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
); );
} }
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( return GestureDetector(
onTap: action, onTap: action,
child: Container( child: Container(

View File

@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class ElectronicKeyPeriodValidityPage extends StatefulWidget { class ElectronicKeyPeriodValidityPage extends StatefulWidget {
const ElectronicKeyPeriodValidityPage({Key key}) : super(key: key); const ElectronicKeyPeriodValidityPage({Key? key}) : super(key: key);
@override @override
State<ElectronicKeyPeriodValidityPage> createState() => _ElectronicKeyPeriodValidityPageState(); State<ElectronicKeyPeriodValidityPage> createState() => _ElectronicKeyPeriodValidityPageState();
@ -20,7 +20,7 @@ class _ElectronicKeyPeriodValidityPageState extends State<ElectronicKeyPeriodVal
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.periodValidity.tr, haveBack:true, backgroundColor: AppColors.mainColor), appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.periodValidity!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
body: Column( body: Column(
children: [ children: [
topWidget(), topWidget(),
@ -43,7 +43,7 @@ class _ElectronicKeyPeriodValidityPageState extends State<ElectronicKeyPeriodVal
height: 60.h, height: 60.h,
// color: Colors.red, // color: Colors.red,
padding: EdgeInsets.only(left:15.h, top: 15.h), padding: EdgeInsets.only(left:15.h, top: 15.h),
child: Text(TranslationLoader.lanKeys.periodValidity.tr, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w600)) child: Text(TranslationLoader.lanKeys!.periodValidity!.tr, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w600))
), ),
Container( Container(
height: 90.h, height: 90.h,
@ -67,27 +67,28 @@ class _ElectronicKeyPeriodValidityPageState extends State<ElectronicKeyPeriodVal
String dateStr; String dateStr;
switch (index) { switch (index) {
case 0: case 0:
dateStr = TranslationLoader.lanKeys.sundayShort.tr; dateStr = TranslationLoader.lanKeys!.sundayShort!.tr;
break; break;
case 1: case 1:
dateStr = TranslationLoader.lanKeys.mondayShort.tr; dateStr = TranslationLoader.lanKeys!.mondayShort!.tr;
break; break;
case 2: case 2:
dateStr = TranslationLoader.lanKeys.tuesdayShort.tr; dateStr = TranslationLoader.lanKeys!.tuesdayShort!.tr;
break; break;
case 3: case 3:
dateStr = TranslationLoader.lanKeys.wednesdayShort.tr; dateStr = TranslationLoader.lanKeys!.wednesdayShort!.tr;
break; break;
case 4: case 4:
dateStr = TranslationLoader.lanKeys.thursdayShort.tr; dateStr = TranslationLoader.lanKeys!.thursdayShort!.tr;
break; break;
case 5: case 5:
dateStr = TranslationLoader.lanKeys.fridayShort.tr; dateStr = TranslationLoader.lanKeys!.fridayShort!.tr;
break; break;
case 6: case 6:
dateStr = TranslationLoader.lanKeys.saturdayShort.tr; dateStr = TranslationLoader.lanKeys!.saturdayShort!.tr;
break; break;
default: default:
dateStr = "";
break; break;
} }
return GestureDetector( return GestureDetector(
@ -111,22 +112,22 @@ class _ElectronicKeyPeriodValidityPageState extends State<ElectronicKeyPeriodVal
Widget bottomWidget(){ Widget bottomWidget(){
return Column( return Column(
children: [ children: [
CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"", isHaveDirection: true, isHaveLine: true, action:(){ CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"", isHaveDirection: true, isHaveLine: true, action:(){
}), }),
CommonItem(leftTitel:TranslationLoader.lanKeys.failureTime.tr, rightTitle:"", isHaveDirection: true, action:(){ CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"", isHaveDirection: true, action:(){
}), }),
Container(height: 10.h), Container(height: 10.h),
CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveDate.tr, rightTitle:"", isHaveDirection: true, isHaveLine: true, action:(){ CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveDate!.tr, rightTitle:"", isHaveDirection: true, isHaveLine: true, action:(){
}), }),
CommonItem(leftTitel:TranslationLoader.lanKeys.failureDate.tr, rightTitle:"", isHaveDirection: true, action:(){ CommonItem(leftTitel:TranslationLoader.lanKeys!.failureDate!.tr, rightTitle:"", isHaveDirection: true, action:(){
}), }),
Container(height: 40.h), Container(height: 40.h),
SubmitBtn( SubmitBtn(
btnName: TranslationLoader.lanKeys.sure.tr, btnName: TranslationLoader.lanKeys!.sure!.tr,
borderRadius: 20.w, borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),

View File

@ -13,7 +13,7 @@ import '../../../../translations/trans_lib.dart';
class MassSendElectronicKeyPage extends StatefulWidget { class MassSendElectronicKeyPage extends StatefulWidget {
final String type; final String type;
const MassSendElectronicKeyPage({Key key, @required this.type}) : super(key: key); const MassSendElectronicKeyPage({Key? key, required this.type}) : super(key: key);
@override @override
State<MassSendElectronicKeyPage> createState() => _MassSendElectronicKeyPageState(); State<MassSendElectronicKeyPage> createState() => _MassSendElectronicKeyPageState();
@ -21,7 +21,7 @@ class MassSendElectronicKeyPage extends StatefulWidget {
class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> { class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
final FlutterContactPicker _contactPicker = FlutterContactPicker(); final FlutterContactPicker _contactPicker = FlutterContactPicker();
Contact _contact; late Contact _contact;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -76,6 +76,7 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
} }
break; break;
default: default:
return Container();
break; break;
} }
} }
@ -85,10 +86,10 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
return Column( return Column(
children: [ children: [
Container(height: 10.h), 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), Container(height: 10.h),
@ -100,8 +101,8 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
Widget keyTimeWidget(){ Widget keyTimeWidget(){
return Column( return Column(
children: [ children: [
CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true), 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!.failureTime!.tr, rightTitle:"2020.06.20 11:49", ),
Container(height: 10.h), Container(height: 10.h),
], ],
); );
@ -111,7 +112,7 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
Widget remoteUnlockingWidget(){ Widget remoteUnlockingWidget(){
return Column( return Column(
children: [ 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), Container(height: 10.h),
@ -123,7 +124,7 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
Widget periodValidityWidget(){ Widget periodValidityWidget(){
return Column( return Column(
children: [ 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); Navigator.pushNamed(context, Routers.electronicKeyPeriodValidityPage);
}), }),
Container(height: 10.h), Container(height: 10.h),
@ -135,7 +136,7 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
return Column( return Column(
children: [ children: [
SubmitBtn( SubmitBtn(
btnName: TranslationLoader.lanKeys.send.tr, btnName: TranslationLoader.lanKeys!.send!.tr,
borderRadius: 20.w, borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),

View File

@ -7,7 +7,7 @@ import '../../../../../translations/trans_lib.dart';
import 'massSendElectronicKeyManage_tabbar.dart'; import 'massSendElectronicKeyManage_tabbar.dart';
class MassSendElectronicKeyManagePage extends StatefulWidget { class MassSendElectronicKeyManagePage extends StatefulWidget {
const MassSendElectronicKeyManagePage({Key key}) : super(key: key); const MassSendElectronicKeyManagePage({Key? key}) : super(key: key);
@override @override
State<MassSendElectronicKeyManagePage> createState() => _MassSendElectronicKeyManagePageState(); State<MassSendElectronicKeyManagePage> createState() => _MassSendElectronicKeyManagePageState();
@ -20,7 +20,7 @@ class _MassSendElectronicKeyManagePageState extends State<MassSendElectronicKeyM
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.sendGroupKey.tr, haveBack:true, backgroundColor: AppColors.mainColor), appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.sendGroupKey!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
body: Column( body: Column(
children: [ children: [
MassSendElectronicKeyManageTabbar(initialIndex: index,), MassSendElectronicKeyManageTabbar(initialIndex: index,),

View File

@ -10,19 +10,19 @@ import '../massSendElectronicKey_page.dart';
class MassSendElectronicKeyManageTabbar extends StatefulWidget { class MassSendElectronicKeyManageTabbar extends StatefulWidget {
var initialIndex=1; var initialIndex=1;
MassSendElectronicKeyManageTabbar({Key key, @required this.initialIndex}) : super(key: key); MassSendElectronicKeyManageTabbar({Key? key, required this.initialIndex}) : super(key: key);
@override @override
State<MassSendElectronicKeyManageTabbar> createState() => _MassSendElectronicKeyManageTabbarState(); State<MassSendElectronicKeyManageTabbar> createState() => _MassSendElectronicKeyManageTabbarState();
} }
class _MassSendElectronicKeyManageTabbarState extends State<MassSendElectronicKeyManageTabbar> with SingleTickerProviderStateMixin { class _MassSendElectronicKeyManageTabbarState extends State<MassSendElectronicKeyManageTabbar> with SingleTickerProviderStateMixin {
TabController _tabController; late TabController _tabController;
final List<ItemView> _itemTabs = <ItemView>[ final List<ItemView> _itemTabs = <ItemView>[
ItemView(title: TranslationLoader.lanKeys.timeLimit.tr, type: "0"), ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: "0"),
ItemView(title: TranslationLoader.lanKeys.permanent.tr, type: "1"), ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: "1"),
ItemView(title: TranslationLoader.lanKeys.circulation.tr, type: "2"), ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, type: "2"),
]; ];
@override @override
@ -82,7 +82,7 @@ class _MassSendElectronicKeyManageTabbarState extends State<MassSendElectronicKe
} }
class ItemView { class ItemView {
const ItemView({@required this.title, @required this.type}); const ItemView({required this.title, required this.type});
final String title; final String title;
final String type; final String type;

View File

@ -13,7 +13,7 @@ import '../../../../../translations/trans_lib.dart';
class SendElectronicKeyPage extends StatefulWidget { class SendElectronicKeyPage extends StatefulWidget {
final String type; final String type;
SendElectronicKeyPage({Key key, @required this.type}) : super(key: key); SendElectronicKeyPage({Key? key, required this.type}) : super(key: key);
@override @override
State<SendElectronicKeyPage> createState() => _SendElectronicKeyPageState(); State<SendElectronicKeyPage> createState() => _SendElectronicKeyPageState();
@ -21,7 +21,7 @@ class SendElectronicKeyPage extends StatefulWidget {
class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> { class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
final FlutterContactPicker _contactPicker = FlutterContactPicker(); final FlutterContactPicker _contactPicker = FlutterContactPicker();
Contact _contact; late Contact _contact;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -62,7 +62,6 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
], ],
); );
} }
break;
case 2: case 2:
{ {
// //
@ -74,7 +73,6 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
], ],
); );
} }
break;
case 3: case 3:
{ {
// //
@ -87,9 +85,8 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
], ],
); );
} }
break;
default: default:
break; return Container();
} }
} }
@ -98,8 +95,8 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
return Column( return Column(
children: [ children: [
Container(height: 10.h), 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!.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!.name!.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: getTFWidget(false, TranslationLoader.lanKeys!.enterYourName!.tr)),
Container(height: 10.h), Container(height: 10.h),
], ],
); );
@ -109,10 +106,10 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
Widget keyTimeWidget(){ Widget keyTimeWidget(){
return Column( return Column(
children: [ 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(); // _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(); // _showDatePicker();
}), }),
Container(height: 10.h), Container(height: 10.h),
@ -124,7 +121,7 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
Widget keyRealNameWidget(){ Widget keyRealNameWidget(){
return Column( return Column(
children: [ 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), Container(height: 10.h),
@ -136,7 +133,7 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
Widget keyPeriodValidityWidget(){ Widget keyPeriodValidityWidget(){
return Column( return Column(
children: [ 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); Navigator.pushNamed(context, Routers.electronicKeyPeriodValidityPage);
}), }),
], ],
@ -151,11 +148,11 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
child: Row( child: Row(
// crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: [ 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: (){ onClick: (){
} }
@ -168,7 +165,7 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
children: [ children: [
TextButton(onPressed: (){ TextButton(onPressed: (){
Navigator.pushNamed(context, Routers.massSendElectronicKeyManagePage); 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<SendElectronicKeyPage> {
alignment: Alignment.center, alignment: Alignment.center,
child: InkWell( child: InkWell(
onTap: () async { onTap: () async {
Contact contact = await _contactPicker.selectContact(); Contact? contact = await _contactPicker.selectContact();
setState(() { setState(() {
_contact = contact; _contact = contact!;
// print("object111111111111 ${_contact.fullName} ${_contact.phoneNumbers}"); // print("object111111111111 ${_contact.fullName} ${_contact.phoneNumbers}");
}); });
}, },

View File

@ -7,7 +7,7 @@ import '../../../../../translations/trans_lib.dart';
import 'sendElectronicKeyManage_tabbar.dart'; import 'sendElectronicKeyManage_tabbar.dart';
class SendElectronicKeyManagePage extends StatefulWidget { class SendElectronicKeyManagePage extends StatefulWidget {
const SendElectronicKeyManagePage({Key key}) : super(key: key); const SendElectronicKeyManagePage({Key? key}) : super(key: key);
@override @override
State<SendElectronicKeyManagePage> createState() => _SendElectronicKeyManagePageState(); State<SendElectronicKeyManagePage> createState() => _SendElectronicKeyManagePageState();
@ -20,7 +20,7 @@ class _SendElectronicKeyManagePageState extends State<SendElectronicKeyManagePag
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.sendKey.tr, haveBack:true, backgroundColor: AppColors.mainColor), appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.sendKey!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
body: Column( body: Column(
children: [ children: [
SendElectronicKeyManageTabbar(initialIndex: index,), SendElectronicKeyManageTabbar(initialIndex: index,),

View File

@ -10,20 +10,20 @@ import '../sendElectronicKey/sendElectronicKey_page.dart';
class SendElectronicKeyManageTabbar extends StatefulWidget { class SendElectronicKeyManageTabbar extends StatefulWidget {
var initialIndex=1; var initialIndex=1;
SendElectronicKeyManageTabbar({Key key, @required this.initialIndex}) : super(key: key); SendElectronicKeyManageTabbar({Key? key, required this.initialIndex}) : super(key: key);
@override @override
State<SendElectronicKeyManageTabbar> createState() => _SendElectronicKeyManageTabbarState(); State<SendElectronicKeyManageTabbar> createState() => _SendElectronicKeyManageTabbarState();
} }
class _SendElectronicKeyManageTabbarState extends State<SendElectronicKeyManageTabbar> with SingleTickerProviderStateMixin { class _SendElectronicKeyManageTabbarState extends State<SendElectronicKeyManageTabbar> with SingleTickerProviderStateMixin {
TabController _tabController; late TabController _tabController;
final List<ItemView> _itemTabs = <ItemView>[ final List<ItemView> _itemTabs = <ItemView>[
ItemView(title: TranslationLoader.lanKeys.timeLimit.tr, type: "0"), ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: "0"),
ItemView(title: TranslationLoader.lanKeys.permanent.tr, type: "1"), ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: "1"),
ItemView(title: TranslationLoader.lanKeys.once.tr, type: "2"), ItemView(title: TranslationLoader.lanKeys!.once!.tr, type: "2"),
ItemView(title: TranslationLoader.lanKeys.circulation.tr, type: "3"), ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, type: "3"),
]; ];
@override @override
@ -83,7 +83,7 @@ class _SendElectronicKeyManageTabbarState extends State<SendElectronicKeyManageT
} }
class ItemView { class ItemView {
const ItemView({@required this.title, @required this.type}); const ItemView({required this.title, required this.type});
final String title; final String title;
final String type; final String type;

View File

@ -7,7 +7,7 @@ import '../../../../tools/submitBtn.dart';
import '../../../../tools/titleAppBar.dart'; import '../../../../tools/titleAppBar.dart';
class SendEmailNotificationPage extends StatefulWidget { class SendEmailNotificationPage extends StatefulWidget {
const SendEmailNotificationPage({Key key}) : super(key: key); const SendEmailNotificationPage({Key? key}) : super(key: key);
@override @override
State<SendEmailNotificationPage> createState() => _SendEmailNotificationPageState(); State<SendEmailNotificationPage> createState() => _SendEmailNotificationPageState();

View File

@ -12,7 +12,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class AutomaticBlockingPage extends StatefulWidget { class AutomaticBlockingPage extends StatefulWidget {
const AutomaticBlockingPage({Key key}) : super(key: key); const AutomaticBlockingPage({Key? key}) : super(key: key);
@override @override
State<AutomaticBlockingPage> createState() => _AutomaticBlockingPageState(); State<AutomaticBlockingPage> createState() => _AutomaticBlockingPageState();
@ -25,23 +25,23 @@ class _AutomaticBlockingPageState extends State<AutomaticBlockingPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body:ListView(
children: [ 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,), Container(height: 10.h,),
Builder( Builder(
builder: (context) { builder: (context) {
return CommonItem(leftTitel:TranslationLoader.lanKeys.delayTime.tr, rightTitle:"5s", isHaveLine: false, isHaveDirection: true, action: (){ 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]; var list = ["5S", "10S", "15S", "30S", "60S", TranslationLoader.lanKeys!.custom!.tr];
ShowBottomSheetTool().showSingleRowPicker( ShowBottomSheetTool().showSingleRowPicker(
// //
context, context,
// //
normalIndex: 2, normalIndex: 2,
title: TranslationLoader.lanKeys.time.tr, title: TranslationLoader.lanKeys!.time!.tr,
cancelTitle: TranslationLoader.lanKeys.cancel.tr, cancelTitle: TranslationLoader.lanKeys!.cancel!.tr,
sureTitle: TranslationLoader.lanKeys.sure.tr, sureTitle: TranslationLoader.lanKeys!.sure!.tr,
// //
// //
//adapter: PickerAdapter(), //adapter: PickerAdapter(),
@ -62,7 +62,7 @@ class _AutomaticBlockingPageState extends State<AutomaticBlockingPage> {
child: Column( child: Column(
children: [ children: [
Row( Row(
children: [Text("${TranslationLoader.lanKeys.pleaseEnter.tr}${TranslationLoader.lanKeys.time.tr}(S)"),], children: [Text("${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.time!.tr}(S)"),],
), ),
TextField( TextField(
// //
@ -73,7 +73,7 @@ class _AutomaticBlockingPageState extends State<AutomaticBlockingPage> {
// //
contentPadding: const EdgeInsets.only( contentPadding: const EdgeInsets.only(
top: 12.0, bottom: 8.0), 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), hintStyle: TextStyle(fontSize: 30.sp),
//线 //线
border: InputBorder.none, border: InputBorder.none,
@ -89,7 +89,7 @@ class _AutomaticBlockingPageState extends State<AutomaticBlockingPage> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Expanded(child: Text(TranslationLoader.lanKeys.automaticBlockingTip.tr)), Expanded(child: Text(TranslationLoader.lanKeys!.automaticBlockingTip!.tr)),
], ],
), ),
) )

View File

@ -9,7 +9,7 @@ import '../../../../../tools/titleAppBar.dart';
import '../../../../../translations/trans_lib.dart'; import '../../../../../translations/trans_lib.dart';
class AdminOpenLockPasswordPage extends StatefulWidget { class AdminOpenLockPasswordPage extends StatefulWidget {
const AdminOpenLockPasswordPage({Key key}) : super(key: key); const AdminOpenLockPasswordPage({Key? key}) : super(key: key);
@override @override
State<AdminOpenLockPasswordPage> createState() => _AdminOpenLockPasswordPageState(); State<AdminOpenLockPasswordPage> createState() => _AdminOpenLockPasswordPageState();
@ -20,10 +20,10 @@ class _AdminOpenLockPasswordPageState extends State<AdminOpenLockPasswordPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body:Column(
children: [ 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( Container(
@ -33,7 +33,7 @@ class _AdminOpenLockPasswordPageState extends State<AdminOpenLockPasswordPage> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Expanded(child: Text(TranslationLoader.lanKeys.adminOpenLockPasswordTip.tr)), Expanded(child: Text(TranslationLoader.lanKeys!.adminOpenLockPasswordTip!.tr)),
], ],
), ),
SizedBox(height:10.h,), SizedBox(height:10.h,),
@ -44,7 +44,7 @@ class _AdminOpenLockPasswordPageState extends State<AdminOpenLockPasswordPage> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ 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),)),
], ],
), ),
), ),

View File

@ -11,7 +11,7 @@ import '../../../../../tools/titleAppBar.dart';
import '../../../../../translations/trans_lib.dart'; import '../../../../../translations/trans_lib.dart';
class BasicInformationPage extends StatefulWidget { class BasicInformationPage extends StatefulWidget {
const BasicInformationPage({Key key}) : super(key: key); const BasicInformationPage({Key? key}) : super(key: key);
@override @override
State<BasicInformationPage> createState() => _BasicInformationPageState(); State<BasicInformationPage> createState() => _BasicInformationPageState();
@ -22,27 +22,27 @@ class _BasicInformationPageState extends State<BasicInformationPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body:Column(
children: [ children: [
Expanded( Expanded(
child: ListView( child: ListView(
children: [ 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), CommonItem(leftTitel:"MAC/ID", rightTitle:"53:66:9F:06:31:8F/9418481", allHeight:70.h, isHaveLine: false),
SizedBox(height: 10.h,), 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); 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,), 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); 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); 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); Navigator.pushNamed(context, Routers.adminOpenLockPasswordPage);
}), }),
], ],

View File

@ -9,7 +9,7 @@ import '../../../../../tools/titleAppBar.dart';
import '../../../../../translations/trans_lib.dart'; import '../../../../../translations/trans_lib.dart';
class EditLockNamePage extends StatefulWidget { class EditLockNamePage extends StatefulWidget {
const EditLockNamePage({Key key}) : super(key: key); const EditLockNamePage({Key? key}) : super(key: key);
@override @override
State<EditLockNamePage> createState() => _EditLockNamePageState(); State<EditLockNamePage> createState() => _EditLockNamePageState();
@ -28,15 +28,15 @@ class _EditLockNamePageState extends State<EditLockNamePage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( 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: (){ onPressed: (){
},), },),
],), ],),
body:Container( 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), LengthLimitingTextInputFormatter(20),
]), ]),
) )

View File

@ -11,7 +11,7 @@ import '../../../../../tools/titleAppBar.dart';
import '../../../../../translations/trans_lib.dart'; import '../../../../../translations/trans_lib.dart';
class LockSeletGroupingPage extends StatefulWidget { class LockSeletGroupingPage extends StatefulWidget {
const LockSeletGroupingPage({Key key}) : super(key: key); const LockSeletGroupingPage({Key? key}) : super(key: key);
@override @override
State<LockSeletGroupingPage> createState() => _LockSeletGroupingPageState(); State<LockSeletGroupingPage> createState() => _LockSeletGroupingPageState();
@ -22,12 +22,12 @@ class _LockSeletGroupingPageState extends State<LockSeletGroupingPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body:Column(
children: [ children: [
Expanded(child: _buildMainUI()), Expanded(child: _buildMainUI()),
SubmitBtn( SubmitBtn(
btnName: TranslationLoader.lanKeys.sure.tr, btnName: TranslationLoader.lanKeys!.sure!.tr,
borderRadius: 20.w, borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.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), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),

View File

@ -8,7 +8,7 @@ import '../../../../../tools/titleAppBar.dart';
import '../../../../../translations/trans_lib.dart'; import '../../../../../translations/trans_lib.dart';
class UploadElectricQuantityPage extends StatefulWidget { class UploadElectricQuantityPage extends StatefulWidget {
const UploadElectricQuantityPage({Key key}) : super(key: key); const UploadElectricQuantityPage({Key? key}) : super(key: key);
@override @override
State<UploadElectricQuantityPage> createState() => _UploadElectricQuantityPageState(); State<UploadElectricQuantityPage> createState() => _UploadElectricQuantityPageState();
@ -19,7 +19,7 @@ class _UploadElectricQuantityPageState extends State<UploadElectricQuantityPage>
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body:Container(
padding: EdgeInsets.all(30.w), padding: EdgeInsets.all(30.w),
child: Column( child: Column(
@ -27,18 +27,18 @@ class _UploadElectricQuantityPageState extends State<UploadElectricQuantityPage>
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Expanded(child: Text(TranslationLoader.lanKeys.updateElectricQuantityTip.tr)), Expanded(child: Text(TranslationLoader.lanKeys!.updateElectricQuantityTip!.tr)),
], ],
), ),
SizedBox(height: 20.h,), SizedBox(height: 20.h,),
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Expanded(child: Text("${TranslationLoader.lanKeys.electricQuantity.tr} 100%")), Expanded(child: Text("${TranslationLoader.lanKeys!.electricQuantity!.tr} 100%")),
], ],
), ),
SizedBox(height: 30.h,), SizedBox(height: 30.h,),
SubmitBtn(btnName: TranslationLoader.lanKeys.update.tr, SubmitBtn(btnName: TranslationLoader.lanKeys!.update!.tr,
borderRadius: 20.w, borderRadius: 20.w,
fontSize: 32.sp, fontSize: 32.sp,
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),

View File

@ -8,7 +8,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class BurglarAlarmPage extends StatefulWidget { class BurglarAlarmPage extends StatefulWidget {
const BurglarAlarmPage({Key key}) : super(key: key); const BurglarAlarmPage({Key? key}) : super(key: key);
@override @override
State<BurglarAlarmPage> createState() => _BurglarAlarmPageState(); State<BurglarAlarmPage> createState() => _BurglarAlarmPageState();
@ -19,7 +19,7 @@ class _BurglarAlarmPageState extends State<BurglarAlarmPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: Colors.white, 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( body:Container(
padding: EdgeInsets.all(30.w), padding: EdgeInsets.all(30.w),
child: Column( child: Column(
@ -27,18 +27,18 @@ class _BurglarAlarmPageState extends State<BurglarAlarmPage> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Expanded(child: Text(TranslationLoader.lanKeys.burglarAlarmTip.tr)), Expanded(child: Text(TranslationLoader.lanKeys!.burglarAlarmTip!.tr)),
], ],
), ),
SizedBox(height: 20.h,), SizedBox(height: 20.h,),
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ 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,), SizedBox(height: 30.h,),
SubmitBtn(btnName: TranslationLoader.lanKeys.closed.tr, SubmitBtn(btnName: TranslationLoader.lanKeys!.closed!.tr,
borderRadius: 20.w, borderRadius: 20.w,
fontSize: 32.sp, fontSize: 32.sp,
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),

View File

@ -8,7 +8,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class DiagnosePage extends StatefulWidget { class DiagnosePage extends StatefulWidget {
const DiagnosePage({Key key}) : super(key: key); const DiagnosePage({Key? key}) : super(key: key);
@override @override
State<DiagnosePage> createState() => _DiagnosePageState(); State<DiagnosePage> createState() => _DiagnosePageState();
@ -19,7 +19,7 @@ class _DiagnosePageState extends State<DiagnosePage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: Colors.white, 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( body:Container(
padding: EdgeInsets.all(30.w), padding: EdgeInsets.all(30.w),
child: Column( child: Column(
@ -27,11 +27,11 @@ class _DiagnosePageState extends State<DiagnosePage> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Expanded(child: Text(TranslationLoader.lanKeys.diagnoseTip.tr)), Expanded(child: Text(TranslationLoader.lanKeys!.diagnoseTip!.tr)),
], ],
), ),
SizedBox(height: 30.h,), SizedBox(height: 30.h,),
SubmitBtn(btnName: TranslationLoader.lanKeys.uploading.tr, SubmitBtn(btnName: TranslationLoader.lanKeys!.uploading!.tr,
borderRadius: 20.w, borderRadius: 20.w,
fontSize: 32.sp, fontSize: 32.sp,
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),

View File

@ -10,7 +10,7 @@ import '../../../../../tools/titleAppBar.dart';
import '../../../../../translations/trans_lib.dart'; import '../../../../../translations/trans_lib.dart';
class AddDoorMagneticPage extends StatefulWidget { class AddDoorMagneticPage extends StatefulWidget {
const AddDoorMagneticPage({Key key}) : super(key: key); const AddDoorMagneticPage({Key? key}) : super(key: key);
@override @override
State<AddDoorMagneticPage> createState() => _AddDoorMagneticPageState(); State<AddDoorMagneticPage> createState() => _AddDoorMagneticPageState();
@ -22,7 +22,7 @@ class _AddDoorMagneticPageState extends State<AddDoorMagneticPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body: ListView(
children: [ children: [
SizedBox(height: 100.h,), SizedBox(height: 100.h,),
@ -33,7 +33,7 @@ class _AddDoorMagneticPageState extends State<AddDoorMagneticPage> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ 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<AddDoorMagneticPage> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ 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,), SizedBox(height: 90.h,),
SubmitBtn( SubmitBtn(
btnName: TranslationLoader.lanKeys.next.tr, btnName: TranslationLoader.lanKeys!.next!.tr,
borderRadius: 10.w, borderRadius: 10.w,
fontSize: 28.sp, fontSize: 28.sp,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w), margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),

View File

@ -11,7 +11,7 @@ import '../../../../../tools/titleAppBar.dart';
import '../../../../../translations/trans_lib.dart'; import '../../../../../translations/trans_lib.dart';
class DoorMagneticPage extends StatefulWidget { class DoorMagneticPage extends StatefulWidget {
const DoorMagneticPage({Key key}) : super(key: key); const DoorMagneticPage({Key? key}) : super(key: key);
@override @override
State<DoorMagneticPage> createState() => _DoorMagneticPageState(); State<DoorMagneticPage> createState() => _DoorMagneticPageState();
@ -22,7 +22,7 @@ class _DoorMagneticPageState extends State<DoorMagneticPage> with BaseWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: Colors.white, 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( body: Column(
children: [ children: [
Container( Container(
@ -31,13 +31,13 @@ class _DoorMagneticPageState extends State<DoorMagneticPage> with BaseWidget {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ 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()), Expanded(child: _buildMainUI()),
SubmitBtn( SubmitBtn(
btnName: "${TranslationLoader.lanKeys.add.tr} ${TranslationLoader.lanKeys.doorMagnetic.tr}", btnName: "${TranslationLoader.lanKeys!.add!.tr} ${TranslationLoader.lanKeys!.doorMagnetic!.tr}",
borderRadius: 20.w, borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.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), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
@ -62,7 +62,7 @@ class _DoorMagneticPageState extends State<DoorMagneticPage> with BaseWidget {
return emptyView(); 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( return GestureDetector(
onTap: action, onTap: action,
child: Container( child: Container(

View File

@ -8,7 +8,7 @@ import '../../../../../tools/titleAppBar.dart';
import '../../../../../translations/trans_lib.dart'; import '../../../../../translations/trans_lib.dart';
class NearbyDoorMagneticPage extends StatefulWidget { class NearbyDoorMagneticPage extends StatefulWidget {
const NearbyDoorMagneticPage({Key key}) : super(key: key); const NearbyDoorMagneticPage({Key? key}) : super(key: key);
@override @override
State<NearbyDoorMagneticPage> createState() => _NearbyDoorMagneticPageState(); State<NearbyDoorMagneticPage> createState() => _NearbyDoorMagneticPageState();
@ -19,7 +19,7 @@ class _NearbyDoorMagneticPageState extends State<NearbyDoorMagneticPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body: ListView.builder(
itemCount:20, itemCount:20,
itemBuilder: (c, index){ itemBuilder: (c, index){
@ -31,7 +31,7 @@ class _NearbyDoorMagneticPageState extends State<NearbyDoorMagneticPage> {
); );
} }
Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function action){ Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function() action){
return GestureDetector( return GestureDetector(
onTap: action, onTap: action,
child: Column( child: Column(

View File

@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class ImportOtherLockDataPage extends StatefulWidget { class ImportOtherLockDataPage extends StatefulWidget {
const ImportOtherLockDataPage({Key key}) : super(key: key); const ImportOtherLockDataPage({Key? key}) : super(key: key);
@override @override
State<ImportOtherLockDataPage> createState() => _ImportOtherLockDataPageState(); State<ImportOtherLockDataPage> createState() => _ImportOtherLockDataPageState();
@ -20,7 +20,7 @@ class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body:Container(
padding: EdgeInsets.all(30.w), padding: EdgeInsets.all(30.w),
child: Column( child: Column(
@ -28,14 +28,14 @@ class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Expanded(child: Text(TranslationLoader.lanKeys.importOtherLockDataTip.tr)), Expanded(child: Text(TranslationLoader.lanKeys!.importOtherLockDataTip!.tr)),
], ],
), ),
SizedBox(height: 20.h,), SizedBox(height: 20.h,),
_searchWidget(), _searchWidget(),
SizedBox(height: 10.h,), SizedBox(height: 10.h,),
Expanded(child: _buildMainUI()), Expanded(child: _buildMainUI()),
SubmitBtn(btnName: TranslationLoader.lanKeys.sure.tr, SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr,
borderRadius: 20.w, borderRadius: 20.w,
fontSize: 32.sp, fontSize: 32.sp,
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
@ -66,7 +66,7 @@ class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
// //
contentPadding: EdgeInsets.only( contentPadding: EdgeInsets.only(
top: 8.h, left: -25.0.h, right: -15.0.h, bottom: 8.0.h), 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, border: InputBorder.none,
// //
@ -90,7 +90,7 @@ class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
); );
} }
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( return GestureDetector(
onTap: action, onTap: action,
child: Container( child: Container(

View File

@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class LockEscalationPage extends StatefulWidget { class LockEscalationPage extends StatefulWidget {
const LockEscalationPage({Key key}) : super(key: key); const LockEscalationPage({Key? key}) : super(key: key);
@override @override
State<LockEscalationPage> createState() => _LockEscalationPageState(); State<LockEscalationPage> createState() => _LockEscalationPageState();
@ -20,7 +20,7 @@ class _LockEscalationPageState extends State<LockEscalationPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: Colors.white, 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( body:Container(
padding: EdgeInsets.all(30.w), padding: EdgeInsets.all(30.w),
child: Column( child: Column(
@ -31,15 +31,15 @@ class _LockEscalationPageState extends State<LockEscalationPage> {
children: [ children: [
Image.asset('images/main/icon_main_lockSet_lockEscalation.png', width: 40.w, height: 40.w,), Image.asset('images/main/icon_main_lockSet_lockEscalation.png', width: 40.w, height: 40.w,),
SizedBox(width: 10.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,), SizedBox(height: 30.h,),
Text("${TranslationLoader.lanKeys.currentVersion.tr}1.0.0"), Text("${TranslationLoader.lanKeys!.currentVersion!.tr}1.0.0"),
SizedBox(height: 10.h,), 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,), SizedBox(height: 30.h,),
SubmitBtn(btnName: TranslationLoader.lanKeys.upgrade.tr, SubmitBtn(btnName: TranslationLoader.lanKeys!.upgrade!.tr,
borderRadius: 20.w, borderRadius: 20.w,
fontSize: 32.sp, fontSize: 32.sp,
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),

View File

@ -11,7 +11,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class LockSetPage extends StatefulWidget { class LockSetPage extends StatefulWidget {
const LockSetPage({Key key}) : super(key: key); const LockSetPage({Key? key}) : super(key: key);
@override @override
State<LockSetPage> createState() => _LockSetPageState(); State<LockSetPage> createState() => _LockSetPageState();
@ -22,58 +22,58 @@ class _LockSetPageState extends State<LockSetPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body:Column(
children: [ children: [
Expanded( Expanded(
child: ListView( child: ListView(
children: [ 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); Navigator.pushNamed(context, Routers.basicInformationPage);
}), }),
SizedBox(height: 10.h,), 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); 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); Navigator.pushNamed(context, Routers.doorMagneticPage);
}), }),
SizedBox(height: 10.h,), 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); 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); 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); 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); 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); 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); 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); Navigator.pushNamed(context, Routers.unlockQRCodePage);
}), }),
SizedBox(height: 10.h,), 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); 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); 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); 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); 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); Navigator.pushNamed(context, Routers.lockEscalationPage);
}), }),
SizedBox(height: 10.h,), SizedBox(height: 10.h,),
@ -84,13 +84,13 @@ class _LockSetPageState extends State<LockSetPage> {
}), }),
SizedBox(height: 10.h,), 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); 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!.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!.unlockReminder!.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
SizedBox(height: 30.h,), SizedBox(height: 30.h,),
SubmitBtn(btnName: TranslationLoader.lanKeys.delete.tr, SubmitBtn(btnName: TranslationLoader.lanKeys!.delete!.tr,
borderRadius: 20.w, borderRadius: 20.w,
fontSize: 32.sp, fontSize: 32.sp,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w), margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w),

View File

@ -10,7 +10,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class LockSoundSetPage extends StatefulWidget { class LockSoundSetPage extends StatefulWidget {
const LockSoundSetPage({Key key}) : super(key: key); const LockSoundSetPage({Key? key}) : super(key: key);
@override @override
State<LockSoundSetPage> createState() => _LockSoundSetPageState(); State<LockSoundSetPage> createState() => _LockSoundSetPageState();
@ -22,10 +22,10 @@ class _LockSoundSetPageState extends State<LockSoundSetPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body:ListView(
children: [ 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(height: 10.h,),
Container( Container(
padding: EdgeInsets.all(30.w), padding: EdgeInsets.all(30.w),
@ -33,7 +33,7 @@ class _LockSoundSetPageState extends State<LockSoundSetPage> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Expanded(child: Text(TranslationLoader.lanKeys.lockSoundTip.tr)), Expanded(child: Text(TranslationLoader.lanKeys!.lockSoundTip!.tr)),
], ],
), ),
), ),
@ -44,36 +44,36 @@ class _LockSoundSetPageState extends State<LockSoundSetPage> {
color: Colors.white, color: Colors.white,
child: Column( child: Column(
children: [ children: [
CommonItem(leftTitel:TranslationLoader.lanKeys.pleaseSeletLockVolume.tr, rightTitle:"", isHaveLine: true), CommonItem(leftTitel:TranslationLoader.lanKeys!.pleaseSeletLockVolume!.tr, rightTitle:"", isHaveLine: true),
CommonItem(leftTitel:TranslationLoader.lanKeys.low.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, CommonItem(leftTitel:TranslationLoader.lanKeys!.low!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true,
rightWidget: GestureDetector( rightWidget: GestureDetector(
onTap: (){ onTap: (){
}, },
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) 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( rightWidget: GestureDetector(
onTap: (){ onTap: (){
}, },
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) 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( rightWidget: GestureDetector(
onTap: (){ onTap: (){
}, },
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) 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( rightWidget: GestureDetector(
onTap: (){ onTap: (){
}, },
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) 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( rightWidget: GestureDetector(
onTap: (){ onTap: (){
@ -85,7 +85,7 @@ class _LockSoundSetPageState extends State<LockSoundSetPage> {
) )
), ),
SubmitBtn( SubmitBtn(
btnName: TranslationLoader.lanKeys.save.tr, btnName: TranslationLoader.lanKeys!.save!.tr,
borderRadius: 20.w, borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),

View File

@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class LockTimePage extends StatefulWidget { class LockTimePage extends StatefulWidget {
const LockTimePage({Key key}) : super(key: key); const LockTimePage({Key? key}) : super(key: key);
@override @override
State<LockTimePage> createState() => _LockTimePageState(); State<LockTimePage> createState() => _LockTimePageState();
@ -21,7 +21,7 @@ class _LockTimePageState extends State<LockTimePage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: Colors.white, 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( body:Container(
padding: EdgeInsets.all(30.w), padding: EdgeInsets.all(30.w),
child: Column( child: Column(
@ -34,7 +34,7 @@ class _LockTimePageState extends State<LockTimePage> {
], ],
), ),
SizedBox(height: 60.h,), SizedBox(height: 60.h,),
SubmitBtn(btnName: TranslationLoader.lanKeys.calibrationTime.tr, SubmitBtn(btnName: TranslationLoader.lanKeys!.calibrationTime!.tr,
borderRadius: 20.w, borderRadius: 20.w,
fontSize: 32.sp, fontSize: 32.sp,
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
@ -49,7 +49,7 @@ class _LockTimePageState extends State<LockTimePage> {
}, },
child: Container( 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))
), ),
), ),
], ],

View File

@ -10,7 +10,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class MarkedHouseStatePage extends StatefulWidget { class MarkedHouseStatePage extends StatefulWidget {
const MarkedHouseStatePage({Key key}) : super(key: key); const MarkedHouseStatePage({Key? key}) : super(key: key);
@override @override
State<MarkedHouseStatePage> createState() => _MarkedHouseStatePageState(); State<MarkedHouseStatePage> createState() => _MarkedHouseStatePageState();
@ -21,18 +21,18 @@ class _MarkedHouseStatePageState extends State<MarkedHouseStatePage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body:Container(
child: Column( child: Column(
children: [ 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( rightWidget: GestureDetector(
onTap: (){ onTap: (){
}, },
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) 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( rightWidget: GestureDetector(
onTap: (){ onTap: (){
@ -40,7 +40,7 @@ class _MarkedHouseStatePageState extends State<MarkedHouseStatePage> {
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
), ),
SizedBox(height: 60.h,), SizedBox(height: 60.h,),
SubmitBtn(btnName: TranslationLoader.lanKeys.sure.tr, SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr,
borderRadius: 20.w, borderRadius: 20.w,
fontSize: 32.sp, fontSize: 32.sp,
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),

View File

@ -10,7 +10,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class NormallyOpenModePage extends StatefulWidget { class NormallyOpenModePage extends StatefulWidget {
const NormallyOpenModePage({Key key}) : super(key: key); const NormallyOpenModePage({Key? key}) : super(key: key);
@override @override
State<NormallyOpenModePage> createState() => _NormallyOpenModePageState(); State<NormallyOpenModePage> createState() => _NormallyOpenModePageState();
@ -22,10 +22,10 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body:ListView(
children: [ 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(height: 10.h,),
Container( Container(
padding: EdgeInsets.all(30.w), padding: EdgeInsets.all(30.w),
@ -33,7 +33,7 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Expanded(child: Text(TranslationLoader.lanKeys.normallyOpenModeTip.tr)), Expanded(child: Text(TranslationLoader.lanKeys!.normallyOpenModeTip!.tr)),
], ],
), ),
), ),
@ -52,7 +52,7 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> {
) )
), ),
SubmitBtn( SubmitBtn(
btnName: TranslationLoader.lanKeys.save.tr, btnName: TranslationLoader.lanKeys!.save!.tr,
borderRadius: 20.w, borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
@ -77,7 +77,7 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> {
height: 60.h, height: 60.h,
// color: Colors.red, // color: Colors.red,
padding: EdgeInsets.only(left:20.h, top: 15.h), 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( Container(
height: 90.h, height: 90.h,
@ -102,27 +102,28 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> {
String dateStr; String dateStr;
switch (index) { switch (index) {
case 0: case 0:
dateStr = TranslationLoader.lanKeys.sundayShort.tr; dateStr = TranslationLoader.lanKeys!.sundayShort!.tr;
break; break;
case 1: case 1:
dateStr = TranslationLoader.lanKeys.mondayShort.tr; dateStr = TranslationLoader.lanKeys!.mondayShort!.tr;
break; break;
case 2: case 2:
dateStr = TranslationLoader.lanKeys.tuesdayShort.tr; dateStr = TranslationLoader.lanKeys!.tuesdayShort!.tr;
break; break;
case 3: case 3:
dateStr = TranslationLoader.lanKeys.wednesdayShort.tr; dateStr = TranslationLoader.lanKeys!.wednesdayShort!.tr;
break; break;
case 4: case 4:
dateStr = TranslationLoader.lanKeys.thursdayShort.tr; dateStr = TranslationLoader.lanKeys!.thursdayShort!.tr;
break; break;
case 5: case 5:
dateStr = TranslationLoader.lanKeys.fridayShort.tr; dateStr = TranslationLoader.lanKeys!.fridayShort!.tr;
break; break;
case 6: case 6:
dateStr = TranslationLoader.lanKeys.saturdayShort.tr; dateStr = TranslationLoader.lanKeys!.saturdayShort!.tr;
break; break;
default: default:
dateStr = "";
break; break;
} }
return GestureDetector( return GestureDetector(
@ -147,14 +148,14 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> {
return Column( return Column(
children: [ children: [
Container(color: AppColors.mainBackgroundColor, height: 10.h,), 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( rightWidget: GestureDetector(
onTap: (){ onTap: (){
}, },
child: Row( child: Row(
children: [ children: [
Text(TranslationLoader.lanKeys.allDay.tr), Text(TranslationLoader.lanKeys!.allDay!.tr),
SizedBox(width: 5.w,), SizedBox(width: 5.w,),
Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,), Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),
], ],
@ -166,10 +167,10 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> {
color: Colors.white, color: Colors.white,
child: Column( child: Column(
children: [ 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), Container(height: 10.h),

View File

@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class RemoteUnlockingPage extends StatefulWidget { class RemoteUnlockingPage extends StatefulWidget {
const RemoteUnlockingPage({Key key}) : super(key: key); const RemoteUnlockingPage({Key? key}) : super(key: key);
@override @override
State<RemoteUnlockingPage> createState() => _RemoteUnlockingPageState(); State<RemoteUnlockingPage> createState() => _RemoteUnlockingPageState();
@ -20,7 +20,7 @@ class _RemoteUnlockingPageState extends State<RemoteUnlockingPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body:Container(
padding: EdgeInsets.all(30.w), padding: EdgeInsets.all(30.w),
child: Column( child: Column(
@ -28,18 +28,18 @@ class _RemoteUnlockingPageState extends State<RemoteUnlockingPage> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Expanded(child: Text(TranslationLoader.lanKeys.remoteUnlockingPageTip.tr)), Expanded(child: Text(TranslationLoader.lanKeys!.remoteUnlockingPageTip!.tr)),
], ],
), ),
SizedBox(height: 20.h,), SizedBox(height: 20.h,),
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ 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,), SizedBox(height: 30.h,),
SubmitBtn(btnName: TranslationLoader.lanKeys.closed.tr, SubmitBtn(btnName: TranslationLoader.lanKeys!.closed!.tr,
borderRadius: 20.w, borderRadius: 20.w,
fontSize: 32.sp, fontSize: 32.sp,
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),

View File

@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class ResetButtonPage extends StatefulWidget { class ResetButtonPage extends StatefulWidget {
const ResetButtonPage({Key key}) : super(key: key); const ResetButtonPage({Key? key}) : super(key: key);
@override @override
State<ResetButtonPage> createState() => _ResetButtonPageState(); State<ResetButtonPage> createState() => _ResetButtonPageState();
@ -20,7 +20,7 @@ class _ResetButtonPageState extends State<ResetButtonPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: Colors.white, 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( body:Container(
padding: EdgeInsets.all(30.w), padding: EdgeInsets.all(30.w),
child: Column( child: Column(
@ -28,18 +28,18 @@ class _ResetButtonPageState extends State<ResetButtonPage> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Expanded(child: Text(TranslationLoader.lanKeys.resetButtonTip.tr)), Expanded(child: Text(TranslationLoader.lanKeys!.resetButtonTip!.tr)),
], ],
), ),
SizedBox(height: 20.h,), SizedBox(height: 20.h,),
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ 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,), SizedBox(height: 30.h,),
SubmitBtn(btnName: TranslationLoader.lanKeys.closed.tr, SubmitBtn(btnName: TranslationLoader.lanKeys!.closed!.tr,
borderRadius: 20.w, borderRadius: 20.w,
fontSize: 32.sp, fontSize: 32.sp,
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),

View File

@ -9,7 +9,7 @@ import '../../../../translations/trans_lib.dart';
import 'package:qr_flutter/qr_flutter.dart'; import 'package:qr_flutter/qr_flutter.dart';
class UnlockQRCodePage extends StatefulWidget { class UnlockQRCodePage extends StatefulWidget {
const UnlockQRCodePage({Key key}) : super(key: key); const UnlockQRCodePage({Key? key}) : super(key: key);
@override @override
State<UnlockQRCodePage> createState() => _UnlockQRCodePageState(); State<UnlockQRCodePage> createState() => _UnlockQRCodePageState();
@ -20,7 +20,7 @@ class _UnlockQRCodePageState extends State<UnlockQRCodePage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body:Column(
children: [ children: [
Container( Container(
@ -49,7 +49,7 @@ class _UnlockQRCodePageState extends State<UnlockQRCodePage> {
// ), // ),
QrImage(data: 'www.baidu.com', size: 300.w), QrImage(data: 'www.baidu.com', size: 300.w),
SizedBox(height: 50.w,), SizedBox(height: 50.w,),
SubmitBtn(btnName: TranslationLoader.lanKeys.share.tr, SubmitBtn(btnName: TranslationLoader.lanKeys!.share!.tr,
borderRadius: 20.w, borderRadius: 20.w,
fontSize: 32.sp, fontSize: 32.sp,
width: 250.w, width: 250.w,

View File

@ -8,7 +8,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class UploadDataPage extends StatefulWidget { class UploadDataPage extends StatefulWidget {
const UploadDataPage({Key key}) : super(key: key); const UploadDataPage({Key? key}) : super(key: key);
@override @override
State<UploadDataPage> createState() => _UploadDataPageState(); State<UploadDataPage> createState() => _UploadDataPageState();
@ -19,7 +19,7 @@ class _UploadDataPageState extends State<UploadDataPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: Colors.white, 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( body:Container(
padding: EdgeInsets.all(30.w), padding: EdgeInsets.all(30.w),
child: Column( child: Column(
@ -27,11 +27,11 @@ class _UploadDataPageState extends State<UploadDataPage> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Expanded(child: Text(TranslationLoader.lanKeys.uploadDataTip.tr)), Expanded(child: Text(TranslationLoader.lanKeys!.uploadDataTip!.tr)),
], ],
), ),
SizedBox(height: 30.h,), SizedBox(height: 30.h,),
SubmitBtn(btnName: TranslationLoader.lanKeys.begin.tr, SubmitBtn(btnName: TranslationLoader.lanKeys!.begin!.tr,
borderRadius: 20.w, borderRadius: 20.w,
fontSize: 32.sp, fontSize: 32.sp,
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),

View File

@ -10,7 +10,7 @@ import '../../../../../tools/titleAppBar.dart';
import '../../../../../translations/trans_lib.dart'; import '../../../../../translations/trans_lib.dart';
class AddWirelessKeyboardPage extends StatefulWidget { class AddWirelessKeyboardPage extends StatefulWidget {
const AddWirelessKeyboardPage({Key key}) : super(key: key); const AddWirelessKeyboardPage({Key? key}) : super(key: key);
@override @override
State<AddWirelessKeyboardPage> createState() => _AddWirelessKeyboardPageState(); State<AddWirelessKeyboardPage> createState() => _AddWirelessKeyboardPageState();
@ -22,7 +22,7 @@ class _AddWirelessKeyboardPageState extends State<AddWirelessKeyboardPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body: ListView(
// mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center, // crossAxisAlignment: CrossAxisAlignment.center,
@ -31,7 +31,7 @@ Widget build(BuildContext context) {
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ 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,), SizedBox(height: 90.h,),
@ -40,12 +40,12 @@ Widget build(BuildContext context) {
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ 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,), SizedBox(height: 90.h,),
SubmitBtn( SubmitBtn(
btnName: TranslationLoader.lanKeys.next.tr, btnName: TranslationLoader.lanKeys!.next!.tr,
borderRadius: 10.w, borderRadius: 10.w,
fontSize: 28.sp, fontSize: 28.sp,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w), 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,), // SizedBox(height: 20.h,),
SubmitBtn( SubmitBtn(
btnName:TranslationLoader.lanKeys.theScreenNeverFlickered.tr, btnName:TranslationLoader.lanKeys!.theScreenNeverFlickered!.tr,
borderRadius: 10.w, borderRadius: 10.w,
fontSize: 28.sp, fontSize: 28.sp,
margin: EdgeInsets.only(left: 30.w, right: 30.w), margin: EdgeInsets.only(left: 30.w, right: 30.w),

View File

@ -10,7 +10,7 @@ import '../../../../../tools/titleAppBar.dart';
import '../../../../../translations/trans_lib.dart'; import '../../../../../translations/trans_lib.dart';
class AddWirelessKeyboardScreenNotLightOnPage extends StatefulWidget { class AddWirelessKeyboardScreenNotLightOnPage extends StatefulWidget {
const AddWirelessKeyboardScreenNotLightOnPage({Key key}) : super(key: key); const AddWirelessKeyboardScreenNotLightOnPage({Key? key}) : super(key: key);
@override @override
State<AddWirelessKeyboardScreenNotLightOnPage> createState() => _AddWirelessKeyboardScreenNotLightOnPageState(); State<AddWirelessKeyboardScreenNotLightOnPage> createState() => _AddWirelessKeyboardScreenNotLightOnPageState();
@ -22,7 +22,7 @@ class _AddWirelessKeyboardScreenNotLightOnPageState extends State<AddWirelessKey
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body: ListView(
// mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center, // crossAxisAlignment: CrossAxisAlignment.center,
@ -31,14 +31,14 @@ class _AddWirelessKeyboardScreenNotLightOnPageState extends State<AddWirelessKey
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Text(TranslationLoader.lanKeys.enterNumberOrPressSet.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),), Text(TranslationLoader.lanKeys!.enterNumberOrPressSet!.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),),
], ],
), ),
SizedBox(height: 20.h,), SizedBox(height: 20.h,),
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Text("(${TranslationLoader.lanKeys.theLocationOfTheSetKeyWillBeDifferent.tr})", style: TextStyle(fontSize: 26.sp, fontWeight: FontWeight.w500),), Text("(${TranslationLoader.lanKeys!.theLocationOfTheSetKeyWillBeDifferent!.tr})", style: TextStyle(fontSize: 26.sp, fontWeight: FontWeight.w500),),
], ],
), ),
SizedBox(height: 90.h,), SizedBox(height: 90.h,),
@ -47,12 +47,12 @@ class _AddWirelessKeyboardScreenNotLightOnPageState extends State<AddWirelessKey
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ 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,), SizedBox(height: 90.h,),
SubmitBtn( SubmitBtn(
btnName: TranslationLoader.lanKeys.next.tr, btnName: TranslationLoader.lanKeys!.next!.tr,
borderRadius: 10.w, borderRadius: 10.w,
fontSize: 28.sp, fontSize: 28.sp,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w), margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),

View File

@ -8,7 +8,7 @@ import '../../../../../tools/titleAppBar.dart';
import '../../../../../translations/trans_lib.dart'; import '../../../../../translations/trans_lib.dart';
class SeletWirelessKeyboardPage extends StatefulWidget { class SeletWirelessKeyboardPage extends StatefulWidget {
const SeletWirelessKeyboardPage({Key key}) : super(key: key); const SeletWirelessKeyboardPage({Key? key}) : super(key: key);
@override @override
State<SeletWirelessKeyboardPage> createState() => _SeletWirelessKeyboardPageState(); State<SeletWirelessKeyboardPage> createState() => _SeletWirelessKeyboardPageState();
@ -19,7 +19,7 @@ class _SeletWirelessKeyboardPageState extends State<SeletWirelessKeyboardPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body: ListView.builder(
itemCount:20, itemCount:20,
itemBuilder: (c, index){ itemBuilder: (c, index){
@ -31,7 +31,7 @@ class _SeletWirelessKeyboardPageState extends State<SeletWirelessKeyboardPage> {
); );
} }
Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function action){ Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function() action){
return GestureDetector( return GestureDetector(
onTap: action, onTap: action,
child: Column( child: Column(

View File

@ -10,7 +10,7 @@ import '../../../../../tools/titleAppBar.dart';
import '../../../../../translations/trans_lib.dart'; import '../../../../../translations/trans_lib.dart';
class WirelessKeyboardPage extends StatefulWidget { class WirelessKeyboardPage extends StatefulWidget {
const WirelessKeyboardPage({Key key}) : super(key: key); const WirelessKeyboardPage({Key? key}) : super(key: key);
@override @override
State<WirelessKeyboardPage> createState() => _WirelessKeyboardPageState(); State<WirelessKeyboardPage> createState() => _WirelessKeyboardPageState();
@ -21,9 +21,9 @@ class _WirelessKeyboardPageState extends State<WirelessKeyboardPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( 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: (){ onPressed: (){
},), },),
@ -32,7 +32,7 @@ class _WirelessKeyboardPageState extends State<WirelessKeyboardPage> {
children: [ children: [
Expanded(child: _buildMainUI()), Expanded(child: _buildMainUI()),
SubmitBtn( SubmitBtn(
btnName: "${TranslationLoader.lanKeys.add.tr} ${TranslationLoader.lanKeys.wirelessKeyboard.tr}", btnName: "${TranslationLoader.lanKeys!.add!.tr} ${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}",
borderRadius: 20.w, borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.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), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
@ -56,7 +56,7 @@ class _WirelessKeyboardPageState extends State<WirelessKeyboardPage> {
); );
} }
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( return GestureDetector(
onTap: action, onTap: action,
child: Container( child: Container(

View File

@ -9,7 +9,7 @@ import '../../../tools/titleAppBar.dart';
import '../../../translations/trans_lib.dart'; import '../../../translations/trans_lib.dart';
class LockDetailPage extends StatefulWidget { class LockDetailPage extends StatefulWidget {
const LockDetailPage({Key key}) : super(key: key); const LockDetailPage({Key? key}) : super(key: key);
@override @override
State<LockDetailPage> createState() => _LockDetailPageState(); State<LockDetailPage> createState() => _LockDetailPageState();
@ -20,7 +20,7 @@ class _LockDetailPageState extends State<LockDetailPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: Colors.white, 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( body: Column(
children: [ children: [
topWidget(), topWidget(),
@ -70,7 +70,7 @@ class _LockDetailPageState extends State<LockDetailPage> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ 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,), SizedBox(height: 40.h,),
@ -91,31 +91,31 @@ class _LockDetailPageState extends State<LockDetailPage> {
mainAxisSpacing: 10.h, mainAxisSpacing: 10.h,
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
children: [ 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); 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); 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); 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); 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); 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); 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); 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); 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); Navigator.pushNamed(context, Routers.lockSetPage);
}), }),
], ],
@ -124,7 +124,7 @@ class _LockDetailPageState extends State<LockDetailPage> {
); );
} }
Widget bottomItem(String iconUrl,String name, Function onClick){ Widget bottomItem(String iconUrl,String name, Function() onClick){
var width = 65.w; var width = 65.w;
var height = 70.h; var height = 70.h;
return GestureDetector( return GestureDetector(

View File

@ -9,7 +9,7 @@ import '../../../tools/titleAppBar.dart';
import '../../../translations/trans_lib.dart'; import '../../../translations/trans_lib.dart';
class LockOperatingRecordPage extends StatefulWidget { class LockOperatingRecordPage extends StatefulWidget {
const LockOperatingRecordPage({Key key}) : super(key: key); const LockOperatingRecordPage({Key? key}) : super(key: key);
@override @override
State<LockOperatingRecordPage> createState() => _LockOperatingRecordPageState(); State<LockOperatingRecordPage> createState() => _LockOperatingRecordPageState();
@ -20,7 +20,7 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( TextButton(
child: const Text("操作", style: TextStyle(color: Colors.white),), child: const Text("操作", style: TextStyle(color: Colors.white),),
onPressed: (){ onPressed: (){
@ -42,7 +42,7 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
Container( Container(
// crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
padding: EdgeInsets.all(20.h), padding: EdgeInsets.all(20.h),
child: Text(TranslationLoader.lanKeys.lockOperatingRecordTip.tr, textAlign: TextAlign.start,), child: Text(TranslationLoader.lanKeys!.lockOperatingRecordTip!.tr, textAlign: TextAlign.start,),
), ),
_searchWidget(), _searchWidget(),
Expanded(child: _buildMainUI()), Expanded(child: _buildMainUI()),
@ -67,7 +67,7 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
// //
contentPadding: const EdgeInsets.only( contentPadding: const EdgeInsets.only(
top: 12.0, left: -22.0, right: -15.0, bottom: 10.0), 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), hintStyle: TextStyle(fontSize: 28.sp),
//线 //线
border: InputBorder.none, border: InputBorder.none,
@ -109,7 +109,7 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
); );
} }
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( return GestureDetector(
onTap: action, onTap: action,
child: Container( child: Container(

View File

@ -10,7 +10,7 @@ import '../../../../translations/trans_lib.dart';
class OtherTypeAddKeyPage extends StatefulWidget { class OtherTypeAddKeyPage extends StatefulWidget {
final String seletType; final String seletType;
final int lockType; 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 @override
State<OtherTypeAddKeyPage> createState() => _OtherTypeAddKeyPageState(); State<OtherTypeAddKeyPage> createState() => _OtherTypeAddKeyPageState();
@ -33,31 +33,29 @@ class _OtherTypeAddKeyPageState extends State<OtherTypeAddKeyPage> {
// return sendElectronicKeySucceed(); // return sendElectronicKeySucceed();
return Column( return Column(
children: [ children: [
perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseEnter.tr, _controller), perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseEnter!.tr, _controller),
keyBottomWidget() keyBottomWidget()
], ],
); );
} }
break;
case 1: case 1:
{ {
// //
return Column( return Column(
children: [ children: [
perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseEnter.tr, _controller), perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseEnter!.tr, _controller),
keyTimeLimitWidget(), keyTimeLimitWidget(),
keyBottomWidget() keyBottomWidget()
], ],
); );
} }
break;
case 2: case 2:
{ {
// //
return Column( return Column(
children: [ children: [
perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseEnter.tr, _controller), perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseEnter!.tr, _controller),
CommonItem(leftTitel:TranslationLoader.lanKeys.failureTime.tr, rightTitle:"", isHaveDirection: true, action:(){ CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"", isHaveDirection: true, action:(){
// _showDatePicker(); // _showDatePicker();
}), }),
keyBottomWidget() keyBottomWidget()
@ -66,7 +64,7 @@ class _OtherTypeAddKeyPageState extends State<OtherTypeAddKeyPage> {
} }
break; break;
default: default:
break; return Container();
} }
} }
@ -85,10 +83,10 @@ class _OtherTypeAddKeyPageState extends State<OtherTypeAddKeyPage> {
Widget keyTimeLimitWidget(){ Widget keyTimeLimitWidget(){
return Column( return Column(
children: [ 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(); // _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(); // _showDatePicker();
}), }),
Container(height: 10.h), Container(height: 10.h),
@ -108,7 +106,7 @@ class _OtherTypeAddKeyPageState extends State<OtherTypeAddKeyPage> {
// ], // ],
// ), // ),
// ), // ),
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: (){ onClick: (){
} }
@ -154,15 +152,16 @@ class _OtherTypeAddKeyPageState extends State<OtherTypeAddKeyPage> {
String title; String title;
switch (type) { switch (type) {
case 0: case 0:
title = TranslationLoader.lanKeys.card.tr; title = TranslationLoader.lanKeys!.card!.tr;
break; break;
case 1: case 1:
title = TranslationLoader.lanKeys.fingerprint.tr; title = TranslationLoader.lanKeys!.fingerprint!.tr;
break; break;
case 2: case 2:
title = TranslationLoader.lanKeys.remoteControl.tr; title = TranslationLoader.lanKeys!.remoteControl!.tr;
break; break;
default: default:
title = "";
break; break;
} }
return title; return title;

View File

@ -11,7 +11,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class OtherTypeKeyDetailPage extends StatefulWidget { class OtherTypeKeyDetailPage extends StatefulWidget {
const OtherTypeKeyDetailPage({Key key}) : super(key: key); const OtherTypeKeyDetailPage({Key? key}) : super(key: key);
@override @override
State<OtherTypeKeyDetailPage> createState() => _OtherTypeKeyDetailPageState(); State<OtherTypeKeyDetailPage> createState() => _OtherTypeKeyDetailPageState();
@ -20,42 +20,42 @@ class OtherTypeKeyDetailPage extends StatefulWidget {
class _OtherTypeKeyDetailPageState extends State<OtherTypeKeyDetailPage> { class _OtherTypeKeyDetailPageState extends State<OtherTypeKeyDetailPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var type = ModalRoute.of(context)?.settings?.arguments; var type = ModalRoute.of(context)?.settings.arguments as int;
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( 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: (){ onPressed: (){
},), },),
],), ],),
body: Column( body: Column(
children: [ 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); 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); 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); Navigator.pushNamed(context, Routers.electronicKeyDetailChangeDate);
}), }),
Container(height: 10.h), 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), 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), Container(height: 40.h),
SubmitBtn( SubmitBtn(
btnName: TranslationLoader.lanKeys.delete.tr, btnName: TranslationLoader.lanKeys!.delete!.tr,
borderRadius: 20.w, borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.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), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
@ -69,16 +69,16 @@ class _OtherTypeKeyDetailPageState extends State<OtherTypeKeyDetailPage> {
} }
String getAppBarTitle(int type){ String getAppBarTitle(int type){
String title; String title = "";
switch (type) { switch (type) {
case 0: case 0:
title = TranslationLoader.lanKeys.card.tr; title = TranslationLoader.lanKeys!.card!.tr;
break; break;
case 1: case 1:
title = TranslationLoader.lanKeys.fingerprint.tr; title = TranslationLoader.lanKeys!.fingerprint!.tr;
break; break;
case 2: case 2:
title = TranslationLoader.lanKeys.remoteControl.tr; title = TranslationLoader.lanKeys!.remoteControl!.tr;
break; break;
default: default:
break; break;
@ -86,7 +86,7 @@ class _OtherTypeKeyDetailPageState extends State<OtherTypeKeyDetailPage> {
return title; 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( return GestureDetector(
onTap: action, onTap: action,
child: Column( child: Column(
@ -105,7 +105,7 @@ class _OtherTypeKeyDetailPageState extends State<OtherTypeKeyDetailPage> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: [ 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),)
], ],
), ),
), ),

View File

@ -10,7 +10,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class OtherTypeKeyListPage extends StatefulWidget { class OtherTypeKeyListPage extends StatefulWidget {
const OtherTypeKeyListPage({Key key}) : super(key: key); const OtherTypeKeyListPage({Key? key}) : super(key: key);
@override @override
State<OtherTypeKeyListPage> createState() => _OtherTypeKeyListPageState(); State<OtherTypeKeyListPage> createState() => _OtherTypeKeyListPageState();
@ -20,12 +20,12 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var type = ModalRoute.of(context)?.settings?.arguments; var type = ModalRoute.of(context)?.settings.arguments as int;
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle: getAppBarTitle(type), haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ appBar: TitleAppBar(barTitle: getAppBarTitle(type), haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
TextButton( 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: (){ onPressed: (){
},), },),
@ -35,7 +35,7 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
_searchWidget(), _searchWidget(),
Expanded(child: _buildMainUI(type)), Expanded(child: _buildMainUI(type)),
SubmitBtn( SubmitBtn(
btnName: '${TranslationLoader.lanKeys.getTip.tr} ${getAppBarTitle(type)}', btnName: '${TranslationLoader.lanKeys!.getTip!.tr} ${getAppBarTitle(type)}',
borderRadius: 20.w, borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.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), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
@ -49,16 +49,16 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
} }
String getAppBarTitle(int type){ String getAppBarTitle(int type){
String title; String title = "";
switch (type) { switch (type) {
case 0: case 0:
title = TranslationLoader.lanKeys.card.tr; title = TranslationLoader.lanKeys!.card!.tr;
break; break;
case 1: case 1:
title = TranslationLoader.lanKeys.fingerprint.tr; title = TranslationLoader.lanKeys!.fingerprint!.tr;
break; break;
case 2: case 2:
title = TranslationLoader.lanKeys.remoteControl.tr; title = TranslationLoader.lanKeys!.remoteControl!.tr;
break; break;
default: default:
break; break;
@ -82,7 +82,7 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
// //
contentPadding: const EdgeInsets.only( contentPadding: const EdgeInsets.only(
top: 12.0, left: -19.0, right: -15.0, bottom: 8.0), 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, border: InputBorder.none,
// //
@ -106,7 +106,7 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
); );
} }
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( return GestureDetector(
onTap: action, onTap: action,
child: Container( child: Container(

View File

@ -7,7 +7,7 @@ import '../../../../translations/trans_lib.dart';
import 'otherTypeKeyManage_tabbar.dart'; import 'otherTypeKeyManage_tabbar.dart';
class OtherTypeKeyManagePage extends StatefulWidget { class OtherTypeKeyManagePage extends StatefulWidget {
const OtherTypeKeyManagePage({Key key}) : super(key: key); const OtherTypeKeyManagePage({Key? key}) : super(key: key);
@override @override
State<OtherTypeKeyManagePage> createState() => _OtherTypeKeyManagePageState(); State<OtherTypeKeyManagePage> createState() => _OtherTypeKeyManagePageState();
@ -18,10 +18,10 @@ class _OtherTypeKeyManagePageState extends State<OtherTypeKeyManagePage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var lockType = ModalRoute.of(context)?.settings?.arguments; var lockType = ModalRoute.of(context)?.settings.arguments as int;
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body: Column(
children: [ children: [
OtherTypeKeyManageTabbar(initialIndex: index, lockType: lockType), OtherTypeKeyManageTabbar(initialIndex: index, lockType: lockType),
@ -31,16 +31,16 @@ class _OtherTypeKeyManagePageState extends State<OtherTypeKeyManagePage> {
} }
String getAppBarTitle(int type){ String getAppBarTitle(int type){
String title; String title = "";
switch (type) { switch (type) {
case 0: case 0:
title = TranslationLoader.lanKeys.card.tr; title = TranslationLoader.lanKeys!.card!.tr;
break; break;
case 1: case 1:
title = TranslationLoader.lanKeys.fingerprint.tr; title = TranslationLoader.lanKeys!.fingerprint!.tr;
break; break;
case 2: case 2:
title = TranslationLoader.lanKeys.remoteControl.tr; title = TranslationLoader.lanKeys!.remoteControl!.tr;
break; break;
default: default:
break; break;

View File

@ -10,19 +10,19 @@ import '../otherTypeAddKey/otherTypeAddKey_page.dart';
class OtherTypeKeyManageTabbar extends StatefulWidget { class OtherTypeKeyManageTabbar extends StatefulWidget {
var initialIndex=1; var initialIndex=1;
var lockType=0; 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 @override
State<OtherTypeKeyManageTabbar> createState() => _OtherTypeKeyManageTabbarState(); State<OtherTypeKeyManageTabbar> createState() => _OtherTypeKeyManageTabbarState();
} }
class _OtherTypeKeyManageTabbarState extends State<OtherTypeKeyManageTabbar> with SingleTickerProviderStateMixin { class _OtherTypeKeyManageTabbarState extends State<OtherTypeKeyManageTabbar> with SingleTickerProviderStateMixin {
TabController _tabController; late TabController _tabController;
final List<ItemView> _itemTabs = <ItemView>[ final List<ItemView> _itemTabs = <ItemView>[
ItemView(title: TranslationLoader.lanKeys.permanent.tr, seletType: "0"), ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, seletType: "0"),
ItemView(title: TranslationLoader.lanKeys.timeLimit.tr, seletType: "1"), ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, seletType: "1"),
ItemView(title: TranslationLoader.lanKeys.circulation.tr, seletType: "2"), ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, seletType: "2"),
]; ];
@override @override
@ -74,7 +74,7 @@ class _OtherTypeKeyManageTabbarState extends State<OtherTypeKeyManageTabbar> wit
} }
class ItemView { class ItemView {
const ItemView({@required this.title, @required this.seletType}); const ItemView({required this.title, required this.seletType});
final String title; final String title;
final String seletType; final String seletType;

View File

@ -11,7 +11,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class PasswordKeyDetailPage extends StatefulWidget { class PasswordKeyDetailPage extends StatefulWidget {
const PasswordKeyDetailPage({Key key}) : super(key: key); const PasswordKeyDetailPage({Key? key}) : super(key: key);
@override @override
State<PasswordKeyDetailPage> createState() => _PasswordKeyDetailPageState(); State<PasswordKeyDetailPage> createState() => _PasswordKeyDetailPageState();
@ -22,7 +22,7 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( TextButton(
child: const Text("分享", style: TextStyle(color: Colors.white),), child: const Text("分享", style: TextStyle(color: Colors.white),),
onPressed: (){ onPressed: (){
@ -31,29 +31,29 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
],), ],),
body: Column( body: Column(
children: [ 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); 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); 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); Navigator.pushNamed(context, Routers.electronicKeyDetailChangeDate);
}), }),
Container(height: 10.h), 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), 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), Container(height: 40.h),
SubmitBtn( SubmitBtn(
btnName: TranslationLoader.lanKeys.delete.tr, btnName: TranslationLoader.lanKeys!.delete!.tr,
borderRadius: 20.w, borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.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), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
@ -66,7 +66,7 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
); );
} }
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( return GestureDetector(
onTap: action, onTap: action,
child: Column( child: Column(
@ -85,7 +85,7 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: [ 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<PasswordKeyDetailPage> {
return Card( return Card(
color: const Color(0x00FFFFFF), color: const Color(0x00FFFFFF),
child: CupertinoAlertDialog( child: CupertinoAlertDialog(
title: Text("${TranslationLoader.lanKeys.amend.tr} ${TranslationLoader.lanKeys.password.tr}"), title: Text("${TranslationLoader.lanKeys!.amend!.tr} ${TranslationLoader.lanKeys!.password!.tr}"),
content: Column( content: Column(
children: <Widget>[ children: <Widget>[
const SizedBox(height: 10,), const SizedBox(height: 10,),
@ -125,7 +125,7 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
// //
// contentPadding: const EdgeInsets.only( // contentPadding: const EdgeInsets.only(
// top: 12.0, left: -19.0, right: -15.0, bottom: 8.0), // 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, border: InputBorder.none,
// //
@ -153,14 +153,14 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
), ),
actions: <Widget>[ actions: <Widget>[
CupertinoDialogAction( CupertinoDialogAction(
child: Text(TranslationLoader.lanKeys.cancel.tr), child: Text(TranslationLoader.lanKeys!.cancel!.tr),
onPressed: () { onPressed: () {
Navigator.pop(context); Navigator.pop(context);
// print("取消"); // print("取消");
}, },
), ),
CupertinoDialogAction( CupertinoDialogAction(
child: Text(TranslationLoader.lanKeys.sure.tr), child: Text(TranslationLoader.lanKeys!.sure!.tr),
onPressed: () { onPressed: () {
Navigator.pop(context); Navigator.pop(context);
// print("确定"); // print("确定");

View File

@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class PasswordKeyListPage extends StatefulWidget { class PasswordKeyListPage extends StatefulWidget {
const PasswordKeyListPage({Key key}) : super(key: key); const PasswordKeyListPage({Key? key}) : super(key: key);
@override @override
State<PasswordKeyListPage> createState() => _PasswordKeyListPageState(); State<PasswordKeyListPage> createState() => _PasswordKeyListPageState();
@ -20,9 +20,9 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( 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: (){ onPressed: (){
},), },),
@ -32,7 +32,7 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
_searchWidget(), _searchWidget(),
Expanded(child: _buildMainUI()), Expanded(child: _buildMainUI()),
SubmitBtn( SubmitBtn(
btnName: TranslationLoader.lanKeys.getPassword.tr, btnName: TranslationLoader.lanKeys!.getPassword!.tr,
borderRadius: 20.w, borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.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), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
@ -61,7 +61,7 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
// //
contentPadding: const EdgeInsets.only( contentPadding: const EdgeInsets.only(
top: 12.0, left: -19.0, right: -15.0, bottom: 8.0), 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, border: InputBorder.none,
// //
@ -85,7 +85,7 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
); );
} }
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( return GestureDetector(
onTap: action, onTap: action,
child: Container( child: Container(

View File

@ -8,7 +8,7 @@ import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart'; import '../../../../translations/trans_lib.dart';
class PasswordKeyManagePage extends StatefulWidget { class PasswordKeyManagePage extends StatefulWidget {
const PasswordKeyManagePage({Key key}) : super(key: key); const PasswordKeyManagePage({Key? key}) : super(key: key);
@override @override
State<PasswordKeyManagePage> createState() => _PasswordKeyManagePageState(); State<PasswordKeyManagePage> createState() => _PasswordKeyManagePageState();
@ -21,7 +21,7 @@ class _PasswordKeyManagePageState extends State<PasswordKeyManagePage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body: Column(
children: [ children: [
PasswordKeyManageTabbarPage(initialIndex: index,), PasswordKeyManageTabbarPage(initialIndex: index,),

View File

@ -10,21 +10,21 @@ import '../passwordKey_Perpetual/passwordKey_perpetual_page.dart';
class PasswordKeyManageTabbarPage extends StatefulWidget { class PasswordKeyManageTabbarPage extends StatefulWidget {
var initialIndex=1; var initialIndex=1;
PasswordKeyManageTabbarPage({Key key, @required this.initialIndex}) : super(key: key); PasswordKeyManageTabbarPage({Key? key, required this.initialIndex}) : super(key: key);
@override @override
State<PasswordKeyManageTabbarPage> createState() => _PasswordKeyManageTabbarPageState(); State<PasswordKeyManageTabbarPage> createState() => _PasswordKeyManageTabbarPageState();
} }
class _PasswordKeyManageTabbarPageState extends State<PasswordKeyManageTabbarPage> with SingleTickerProviderStateMixin { class _PasswordKeyManageTabbarPageState extends State<PasswordKeyManageTabbarPage> with SingleTickerProviderStateMixin {
TabController _tabController; late TabController _tabController;
final List<ItemView> _itemTabs = <ItemView>[ final List<ItemView> _itemTabs = <ItemView>[
ItemView(title: TranslationLoader.lanKeys.permanent.tr, type: "0"), ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: "0"),
ItemView(title: TranslationLoader.lanKeys.timeLimit.tr, type: "1"), ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: "1"),
ItemView(title: TranslationLoader.lanKeys.once.tr, type: "2"), ItemView(title: TranslationLoader.lanKeys!.once!.tr, type: "2"),
ItemView(title: TranslationLoader.lanKeys.custom.tr, type: "3"), ItemView(title: TranslationLoader.lanKeys!.custom!.tr, type: "3"),
ItemView(title: TranslationLoader.lanKeys.circulation.tr, type: "4"), ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, type: "4"),
ItemView(title: TranslationLoader.lanKeys.clearAll.tr, type: "5"), ItemView(title: TranslationLoader.lanKeys!.clearAll!.tr, type: "5"),
]; ];
@override @override
@ -84,7 +84,7 @@ class _PasswordKeyManageTabbarPageState extends State<PasswordKeyManageTabbarPag
} }
class ItemView { class ItemView {
const ItemView({@required this.title, @required this.type}); const ItemView({required this.title, required this.type});
final String title; final String title;
final String type; final String type;

View File

@ -11,7 +11,7 @@ import '../../../../translations/trans_lib.dart';
class PasswordKeyPerpetualPage extends StatefulWidget { class PasswordKeyPerpetualPage extends StatefulWidget {
final String type; final String type;
const PasswordKeyPerpetualPage({Key key, @required this.type}) : super(key: key); const PasswordKeyPerpetualPage({Key? key, required this.type}) : super(key: key);
@override @override
State<PasswordKeyPerpetualPage> createState() => _PasswordKeyPerpetualPageState(); State<PasswordKeyPerpetualPage> createState() => _PasswordKeyPerpetualPageState();
} }
@ -40,8 +40,8 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
// return sendElectronicKeySucceed(); // return sendElectronicKeySucceed();
return Column( return Column(
children: [ children: [
perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseNameYourPassword.tr, _controller), perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, _controller),
keyBottomWidget(TranslationLoader.lanKeys.getPasswordTip1.tr) keyBottomWidget(TranslationLoader.lanKeys!.getPasswordTip1!.tr)
], ],
); );
} }
@ -52,8 +52,8 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
return Column( return Column(
children: [ children: [
keyTimeLimitWidget(), keyTimeLimitWidget(),
perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseNameYourPassword.tr, _controller), perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, _controller),
keyBottomWidget(TranslationLoader.lanKeys.getPasswordTip2.tr) keyBottomWidget(TranslationLoader.lanKeys!.getPasswordTip2!.tr)
], ],
); );
} }
@ -63,8 +63,8 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
// //
return Column( return Column(
children: [ children: [
perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseNameYourPassword.tr, _controller), perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, _controller),
keyBottomWidget(TranslationLoader.lanKeys.getPasswordTip3.tr) keyBottomWidget(TranslationLoader.lanKeys!.getPasswordTip3!.tr)
], ],
); );
} }
@ -75,9 +75,9 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
return Column( return Column(
children: [ children: [
keyIfPerpetualWidget(), keyIfPerpetualWidget(),
perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseNameYourPassword.tr, _controller), perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, _controller),
perpetualKeyWidget(TranslationLoader.lanKeys.password.tr, "请输入6-9位数字", _controller), perpetualKeyWidget(TranslationLoader.lanKeys!.password!.tr, "请输入6-9位数字", _controller),
keyBottomWidget(TranslationLoader.lanKeys.getPasswordTip4.tr) keyBottomWidget(TranslationLoader.lanKeys!.getPasswordTip4!.tr)
], ],
); );
} }
@ -88,8 +88,8 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
return Column( return Column(
children: [ children: [
keyCirculationWidget(), keyCirculationWidget(),
perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseNameYourPassword.tr, _controller), perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, _controller),
keyBottomWidget(TranslationLoader.lanKeys.getPasswordTip5.tr) keyBottomWidget(TranslationLoader.lanKeys!.getPasswordTip5!.tr)
], ],
); );
} }
@ -99,13 +99,14 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
// //
return Column( return Column(
children: [ children: [
perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseNameYourPassword.tr, _controller), perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, _controller),
keyBottomWidget(TranslationLoader.lanKeys.getPasswordTip6.tr) keyBottomWidget(TranslationLoader.lanKeys!.getPasswordTip6!.tr)
], ],
); );
} }
break; break;
default: default:
return Container();
break; break;
} }
} }
@ -125,10 +126,10 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
Widget keyTimeLimitWidget(){ Widget keyTimeLimitWidget(){
return Column( return Column(
children: [ 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(); // _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(); // _showDatePicker();
}), }),
Container(height: 10.h), Container(height: 10.h),
@ -140,7 +141,7 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
Widget keyIfPerpetualWidget(){ Widget keyIfPerpetualWidget(){
return Column( return Column(
children: [ 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), Container(height: 10.h),
@ -152,13 +153,13 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
Widget keyCirculationWidget(){ Widget keyCirculationWidget(){
return Column( return Column(
children: [ 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<PasswordKeyPerpetualPage> {
], ],
), ),
), ),
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: (){ onClick: (){
} }

View File

@ -11,7 +11,7 @@ import '../../tools/titleAppBar.dart';
import '../../translations/trans_lib.dart'; import '../../translations/trans_lib.dart';
class StarLockMain extends StatefulWidget { class StarLockMain extends StatefulWidget {
const StarLockMain({Key key}) : super(key: key); const StarLockMain({Key? key}) : super(key: key);
@override @override
State<StarLockMain> createState() => _StarLockMainState(); State<StarLockMain> createState() => _StarLockMainState();
@ -22,7 +22,7 @@ class _StarLockMainState extends State<StarLockMain> with BaseWidget{
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: const Color(0xFFF5F5F5), 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( builder: (context) => IconButton(
icon: Image.asset("images/main/mainLeft_menu_icon.png",color:Colors.white, width: 60.w, height: 60.w,), icon: Image.asset("images/main/mainLeft_menu_icon.png",color:Colors.white, width: 60.w, height: 60.w,),
onPressed: () { onPressed: () {
@ -50,7 +50,7 @@ class _StarLockMainState extends State<StarLockMain> with BaseWidget{
); );
} }
Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function action){ Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function() action){
return GestureDetector( return GestureDetector(
onTap: action, onTap: action,
child: Container( child: Container(
@ -131,7 +131,7 @@ class _StarLockMainState extends State<StarLockMain> with BaseWidget{
SizedBox(height: h(50.h),), SizedBox(height: h(50.h),),
Container( Container(
padding: EdgeInsets.all(30.w), 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),)
) )
], ],
); );

View File

@ -10,7 +10,7 @@ import '../../../tools/titleAppBar.dart';
import '../../../translations/trans_lib.dart'; import '../../../translations/trans_lib.dart';
class AddLockPage extends StatefulWidget { class AddLockPage extends StatefulWidget {
const AddLockPage({Key key}) : super(key: key); const AddLockPage({Key? key}) : super(key: key);
@override @override
State<AddLockPage> createState() => _AddLockPageState(); State<AddLockPage> createState() => _AddLockPageState();
@ -22,7 +22,7 @@ class _AddLockPageState extends State<AddLockPage> with BaseWidget{
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body: Column(
// mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center, // crossAxisAlignment: CrossAxisAlignment.center,
@ -31,7 +31,7 @@ class _AddLockPageState extends State<AddLockPage> with BaseWidget{
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ 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,), SizedBox(height: 120.h,),
@ -40,12 +40,12 @@ class _AddLockPageState extends State<AddLockPage> with BaseWidget{
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ 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,), SizedBox(height: 120.h,),
SubmitBtn( SubmitBtn(
btnName: TranslationLoader.lanKeys.next.tr, btnName: TranslationLoader.lanKeys!.next!.tr,
borderRadius: 20.w, borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.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), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),

View File

@ -8,7 +8,7 @@ import '../../../tools/titleAppBar.dart';
import '../../../translations/trans_lib.dart'; import '../../../translations/trans_lib.dart';
class LockAddressPage extends StatefulWidget { class LockAddressPage extends StatefulWidget {
const LockAddressPage({Key key}) : super(key: key); const LockAddressPage({Key? key}) : super(key: key);
@override @override
State<LockAddressPage> createState() => _LockAddressPageState(); State<LockAddressPage> createState() => _LockAddressPageState();

View File

@ -7,7 +7,7 @@ import '../../../tools/titleAppBar.dart';
import '../../../translations/trans_lib.dart'; import '../../../translations/trans_lib.dart';
class NearbyLockPage extends StatefulWidget { class NearbyLockPage extends StatefulWidget {
const NearbyLockPage({Key key}) : super(key: key); const NearbyLockPage({Key? key}) : super(key: key);
@override @override
State<NearbyLockPage> createState() => _NearbyLockPageState(); State<NearbyLockPage> createState() => _NearbyLockPageState();
@ -18,7 +18,7 @@ class _NearbyLockPageState extends State<NearbyLockPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body: ListView.builder(
itemCount:20, itemCount:20,
itemBuilder: (c, index){ itemBuilder: (c, index){
@ -30,7 +30,7 @@ class _NearbyLockPageState extends State<NearbyLockPage> {
); );
} }
Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function action){ Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function() action){
return GestureDetector( return GestureDetector(
onTap: action, onTap: action,
child: Column( child: Column(

View File

@ -8,7 +8,7 @@ import '../../../tools/titleAppBar.dart';
import '../../../translations/trans_lib.dart'; import '../../../translations/trans_lib.dart';
class SaveLockPage extends StatefulWidget { class SaveLockPage extends StatefulWidget {
const SaveLockPage({Key key}) : super(key: key); const SaveLockPage({Key? key}) : super(key: key);
@override @override
State<SaveLockPage> createState() => _SaveLockPageState(); State<SaveLockPage> createState() => _SaveLockPageState();
@ -19,7 +19,7 @@ class _SaveLockPageState extends State<SaveLockPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body: Column(
// mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center, // crossAxisAlignment: CrossAxisAlignment.center,
@ -28,7 +28,7 @@ class _SaveLockPageState extends State<SaveLockPage> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ 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,), SizedBox(height: 80.h,),
@ -75,7 +75,7 @@ class _SaveLockPageState extends State<SaveLockPage> {
), ),
SizedBox(height: 120.h,), SizedBox(height: 120.h,),
SubmitBtn( SubmitBtn(
btnName: TranslationLoader.lanKeys.sure.tr, btnName: TranslationLoader.lanKeys!.sure!.tr,
borderRadius: 20.w, borderRadius: 20.w,
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 50.w, left: 50.w,

View File

@ -9,7 +9,7 @@ import '../../../tools/titleAppBar.dart';
import '../../../translations/trans_lib.dart'; import '../../../translations/trans_lib.dart';
class SeletLockTypePage extends StatefulWidget { class SeletLockTypePage extends StatefulWidget {
const SeletLockTypePage({Key key}) : super(key: key); const SeletLockTypePage({Key? key}) : super(key: key);
@override @override
State<SeletLockTypePage> createState() => _SeletLockTypePageState(); State<SeletLockTypePage> createState() => _SeletLockTypePageState();
@ -20,7 +20,7 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget{
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body: Column(
children: [ children: [
allLock(), allLock(),
@ -33,25 +33,25 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget{
crossAxisSpacing: 10, crossAxisSpacing: 10,
mainAxisSpacing: 10, mainAxisSpacing: 10,
children: [ children: [
lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys.doorLock.tr, (){ lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys!.doorLock!.tr, (){
Navigator.pushNamed(context, Routers.addLockPage); 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); 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); 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); 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); 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); 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); Navigator.pushNamed(context, Routers.addLockPage);
}), }),
], ],
@ -72,7 +72,7 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget{
child: Container( child: Container(
height: 150.h, height: 150.h,
color: Colors.white, color: Colors.white,
margin: EdgeInsets.all(10), margin: const EdgeInsets.all(10),
child: Row( child: Row(
children: [ children: [
SizedBox(width:40.w), SizedBox(width:40.w),
@ -83,8 +83,8 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget{
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text(TranslationLoader.lanKeys.allLock.tr, style: TextStyle(fontSize: 30.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)), Text(TranslationLoader.lanKeys!.searchAllLockType!.tr, style: TextStyle(fontSize: 26.sp, fontWeight: FontWeight.w500)),
], ],
), ),
), ),
@ -97,7 +97,7 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget{
); );
} }
Widget lockTypeItem(String lockTypeIcon, String lockTypeTitle, Function action){ Widget lockTypeItem(String lockTypeIcon, String lockTypeTitle, Function() action){
return GestureDetector( return GestureDetector(
onTap: action, onTap: action,
child: Container( child: Container(

View File

@ -10,7 +10,7 @@ import '../../translations/trans_lib.dart';
import 'mineMultiLanguage_logic.dart'; import 'mineMultiLanguage_logic.dart';
class MineMultiLanguagePage extends StatefulWidget { class MineMultiLanguagePage extends StatefulWidget {
const MineMultiLanguagePage({Key key}) : super(key: key); const MineMultiLanguagePage({Key? key}) : super(key: key);
@override @override
State<MineMultiLanguagePage> createState() => _MineMultiLanguagePageState(); State<MineMultiLanguagePage> createState() => _MineMultiLanguagePageState();
@ -26,7 +26,7 @@ class _MineMultiLanguagePageState extends State<MineMultiLanguagePage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,

View File

@ -11,14 +11,14 @@ class MineMultiLanguageState {
return appDept.deptSupportedLocales; return appDept.deptSupportedLocales;
} }
var currentLanguageType = ExtensionLanguageType.fromLanguageCode(Get.locale.languageCode).obs; var currentLanguageType = ExtensionLanguageType.fromLanguageCode(Get.locale!.languageCode).obs;
AppLanuageConfigState() { AppLanuageConfigState() {
resetLan(); resetLan();
} }
void resetLan() { void resetLan() {
currentLanguageType.value = ExtensionLanguageType.fromLanguageCode(Get.locale.languageCode); currentLanguageType.value = ExtensionLanguageType.fromLanguageCode(Get.locale!.languageCode);
StoreService.to.saveLanguageCode(Get.locale.languageCode); StoreService.to.saveLanguageCode(Get.locale!.languageCode);
} }
} }

View File

@ -10,7 +10,7 @@ import '../../tools/titleAppBar.dart';
import '../../translations/trans_lib.dart'; import '../../translations/trans_lib.dart';
class MineSetPage extends StatefulWidget { class MineSetPage extends StatefulWidget {
const MineSetPage({Key key}) : super(key: key); const MineSetPage({Key? key}) : super(key: key);
@override @override
State<MineSetPage> createState() => _MineSetPageState(); State<MineSetPage> createState() => _MineSetPageState();
@ -21,107 +21,107 @@ class _MineSetPageState extends State<MineSetPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, 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( body:Column(
children: [ children: [
Expanded( Expanded(
child: ListView( child: ListView(
children: [ 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!.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!.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!.pushNotification!.tr, rightTitle:"", isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
SizedBox(height: 10.h,), 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,), 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); 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,), 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,), 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() { // Widget keyBottomWidget() {
return Column( // return Column(
children: [ // children: [
SubmitBtn(btnName: TranslationLoader.lanKeys.logout.tr, // SubmitBtn(btnName: TranslationLoader.lanKeys!.logout!.tr,
borderRadius: 20.w, // borderRadius: 20.w,
fontSize: 32.sp, // fontSize: 32.sp,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w), // margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w),
padding: EdgeInsets.only(top: 20.w, bottom: 20.w), // padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
onClick: () { // onClick: () {
//
} // }
), // ),
Container( // Container(
padding: EdgeInsets.only(right: 30.w), // padding: EdgeInsets.only(right: 30.w),
// color: Colors.red, // // color: Colors.red,
child: Row( // child: Row(
mainAxisAlignment: MainAxisAlignment.end, // mainAxisAlignment: MainAxisAlignment.end,
children: [ // children: [
TextButton( // TextButton(
child: Text( TranslationLoader.lanKeys.deleteAccount.tr, style: TextStyle(color: AppColors.mainColor, fontWeight: FontWeight.w500),), // child: Text( TranslationLoader.lanKeys!.deleteAccount!.tr, style: TextStyle(color: AppColors.mainColor, fontWeight: FontWeight.w500),),
onPressed: () { // onPressed: () {
//
}, // },
), // ),
], // ],
), // ),
), // ),
SizedBox(height: 30.h,) // SizedBox(height: 30.h,)
], // ],
); // );
} // }
Switch _switch(){ Switch _switch(){
return Switch( return Switch(

View File

@ -6,11 +6,12 @@ import 'package:get/get.dart';
import '../appRouters.dart'; import '../appRouters.dart';
import '../app_settings/app_colors.dart'; import '../app_settings/app_colors.dart';
import '../baseWidget.dart'; import '../baseWidget.dart';
import '../tools/submitBtn.dart';
import '../tools/titleAppBar.dart'; import '../tools/titleAppBar.dart';
import '../translations/trans_lib.dart'; import '../translations/trans_lib.dart';
class StarLockMinePage extends StatefulWidget { class StarLockMinePage extends StatefulWidget {
const StarLockMinePage({Key key}) : super(key: key); const StarLockMinePage({Key? key}) : super(key: key);
@override @override
State<StarLockMinePage> createState() => _StarLockMinePageState(); State<StarLockMinePage> createState() => _StarLockMinePageState();
@ -26,7 +27,9 @@ class _StarLockMinePageState extends State<StarLockMinePage> with BaseWidget{
body: Column( body: Column(
children: [ children: [
topWidget(), topWidget(),
bottomListWidget() bottomListWidget(),
SizedBox(height: 40.h,),
keyBottomWidget()
], ],
), ),
); );
@ -68,24 +71,30 @@ class _StarLockMinePageState extends State<StarLockMinePage> with BaseWidget{
Widget bottomListWidget(){ Widget bottomListWidget(){
return Expanded( return Expanded(
child: ListView( 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: <Widget>[ children: <Widget>[
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); 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); 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<StarLockMinePage> 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( return GestureDetector(
onTap: action, onTap: action,
child: Row( child: Row(
@ -101,7 +142,7 @@ class _StarLockMinePageState extends State<StarLockMinePage> with BaseWidget{
Center( Center(
child: Container( child: Container(
height: 80.h, height: 80.h,
width: 300.w, // width: 300.w,
color: Colors.white, color: Colors.white,
child: Row( child: Row(
children: [ children: [

View File

@ -7,7 +7,7 @@ import 'app_settings/app_colors.dart';
import 'main/lockMian/lockMain_page.dart'; import 'main/lockMian/lockMain_page.dart';
class NavPages extends StatefulWidget { class NavPages extends StatefulWidget {
const NavPages({Key key}) : super(key: key); const NavPages({Key? key}) : super(key: key);
@override @override
State<NavPages> createState() => _NavPagesState(); State<NavPages> createState() => _NavPagesState();

View File

@ -4,7 +4,7 @@ import 'package:flutter/material.dart';
import 'navPages.dart'; import 'navPages.dart';
class StarLockApplication extends StatefulWidget { class StarLockApplication extends StatefulWidget {
const StarLockApplication({Key key}) : super(key: key); const StarLockApplication({Key? key}) : super(key: key);
@override @override
State<StarLockApplication> createState() => _StarLockApplicationState(); State<StarLockApplication> createState() => _StarLockApplicationState();

View File

@ -1,5 +1,4 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
// ------------------------------------------------------ // ------------------------------------------------------
// authorAllenSu // authorAllenSu
@ -9,10 +8,10 @@ import 'package:flutter/widgets.dart';
// ------------------------------------------------------ // ------------------------------------------------------
class CustomUnderlineTabIndicator extends Decoration { class CustomUnderlineTabIndicator extends Decoration {
final BorderSide borderSide; final BorderSide? borderSide;
final EdgeInsetsGeometry insets; final EdgeInsetsGeometry? insets;
final StrokeCap strokeCap; // final StrokeCap? strokeCap; //
final double width; // final double? width; //
const CustomUnderlineTabIndicator({ const CustomUnderlineTabIndicator({
this.borderSide = const BorderSide(width: 2, color: Colors.white), this.borderSide = const BorderSide(width: 2, color: Colors.white),
@ -23,21 +22,21 @@ class CustomUnderlineTabIndicator extends Decoration {
assert(insets != null); assert(insets != null);
@override @override
Decoration lerpFrom(Decoration a, double t) { Decoration? lerpFrom(Decoration? a, double t) {
if (a is CustomUnderlineTabIndicator) { if (a is CustomUnderlineTabIndicator) {
return CustomUnderlineTabIndicator( return CustomUnderlineTabIndicator(
borderSide: BorderSide.lerp(a.borderSide, borderSide, t), borderSide: BorderSide.lerp(a.borderSide!, borderSide!, t),
insets: EdgeInsetsGeometry.lerp(a.insets, insets, t), insets: EdgeInsetsGeometry.lerp(a.insets!, insets!, t),
); );
} }
return super.lerpFrom(a, t); return lerpFrom(a, t);
} }
@override @override
Decoration lerpTo(Decoration b, double t) { Decoration? lerpTo(Decoration? b, double t) {
if (b is CustomUnderlineTabIndicator) { if (b is CustomUnderlineTabIndicator) {
return CustomUnderlineTabIndicator( return CustomUnderlineTabIndicator(
borderSide: BorderSide.lerp(borderSide, b.borderSide, t), borderSide: BorderSide.lerp(borderSide!, b.borderSide!, t),
insets: EdgeInsetsGeometry.lerp(insets, b.insets, t), insets: EdgeInsetsGeometry.lerp(insets, b.insets, t),
); );
} }
@ -45,8 +44,8 @@ class CustomUnderlineTabIndicator extends Decoration {
} }
@override @override
_UnderlinePainter createBoxPainter([VoidCallback onChanged]) { _UnderlinePainter createBoxPainter([VoidCallback? onChanged]) {
return _UnderlinePainter(this, onChanged); return _UnderlinePainter(this, onChanged!);
} }
@override @override
@ -54,18 +53,18 @@ class CustomUnderlineTabIndicator extends Decoration {
return Path()..addRect(_indicatorRectFor(rect, textDirection)); return Path()..addRect(_indicatorRectFor(rect, textDirection));
} }
Rect _indicatorRectFor(Rect rect, TextDirection textDirection) { Rect _indicatorRectFor(Rect? rect, TextDirection? textDirection) {
assert(rect != null); assert(rect != null);
assert(textDirection != 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; double cw = (indicator.left + indicator.right) / 2;
// //
return Rect.fromLTWH(cw - wantWidth / 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), : assert(decoration != null),
super(onChanged); super(onChanged);
final CustomUnderlineTabIndicator decoration; final CustomUnderlineTabIndicator? decoration;
@override @override
void paint(Canvas canvas, Offset offset, ImageConfiguration configuration) { void paint(Canvas canvas, Offset offset, ImageConfiguration configuration) {
assert(configuration != null); assert(configuration != null);
assert(configuration.size != null); assert(configuration.size != null);
final Rect rect = offset & configuration.size; final Rect rect = offset & configuration.size!;
final TextDirection textDirection = configuration.textDirection; final TextDirection textDirection = configuration.textDirection!;
final Rect indicator = decoration final Rect indicator = decoration!
._indicatorRectFor(rect, textDirection) ._indicatorRectFor(rect, textDirection)
.deflate(decoration.borderSide.width / 2); .deflate(decoration!.borderSide!.width / 2);
final Paint paint = decoration.borderSide.toPaint() final Paint paint = decoration!.borderSide!.toPaint()
..strokeCap = decoration.strokeCap; // ..strokeCap = decoration!.strokeCap!; //
canvas.drawLine(indicator.bottomLeft, indicator.bottomRight, paint); canvas.drawLine(indicator.bottomLeft, indicator.bottomRight, paint);
} }
} }

View File

@ -10,20 +10,20 @@ class AppManager {
String platformName = ''; String platformName = '';
String get showVersion =>'$version.$buildNumber'; String get showVersion =>'$version.$buildNumber';
static AppManager _manager; static AppManager? _manager;
AppManager._init(); AppManager._init();
static AppManager shareManager(){ static AppManager? shareManager(){
_manager ??= AppManager._init(); _manager ??= AppManager._init();
return _manager; return _manager;
} }
factory AppManager() => shareManager(); factory AppManager() => shareManager()!;
AppManager get manager => shareManager(); AppManager? get manager => shareManager();
// //
String _languageCode = 'en-US'; String _languageCode = 'en-US';
void setLanCode({String code})=>_languageCode = code; void setLanCode({String? code})=>_languageCode = code!;
String get languageCode => _languageCode; String get languageCode => _languageCode;
// //

View File

@ -3,16 +3,16 @@ import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
class CommonItem extends StatelessWidget { class CommonItem extends StatelessWidget {
String leftTitel; String? leftTitel;
String rightTitle; String? rightTitle;
bool isHaveDirection; bool? isHaveDirection;
bool isHaveLine; bool? isHaveLine;
bool isHaveRightWidget; bool? isHaveRightWidget;
Widget rightWidget; Widget? rightWidget;
Function action; Function()? action;
double allHeight; 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 @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -28,21 +28,21 @@ class CommonItem extends StatelessWidget {
child: Row( child: Row(
children: [ children: [
SizedBox(width:20.w), 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), SizedBox(width:20.w),
Row( Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: [ 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), 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), // SizedBox(width:10.w),
], ],
), ),
), ),
isHaveLine?Container(height: 0.5.h, color: Colors.grey,):Container() isHaveLine!?Container(height: 0.5.h, color: Colors.grey,):Container()
], ],
), ),
); );

View File

@ -15,8 +15,9 @@ class DeviceInfoService extends GetxService {
Future<DeviceInfoService> init() async { Future<DeviceInfoService> init() async {
DeviceInfoPlugin deviceInfo = DeviceInfoPlugin(); DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
var dId = StoreService.to.getDeviceId(); // String dId = StoreService.to.getDeviceId();
if(dId.isEmpty){ String dId = "";
if(dId.isNotEmpty){
dId = const Uuid().v1(); dId = const Uuid().v1();
print('初始化设备ID:$dId'); print('初始化设备ID:$dId');
StoreService.to.saveDeviceId(dId); StoreService.to.saveDeviceId(dId);

View File

@ -3,14 +3,14 @@ import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
class ForgetPwdInput extends StatelessWidget { class ForgetPwdInput extends StatelessWidget {
TextEditingController controller; TextEditingController? controller;
List<TextInputFormatter> inputFormatters; List<TextInputFormatter>? inputFormatters;
TextInputType keyboardType; TextInputType? keyboardType;
String hintText; String? hintText;
String label; String? label;
Widget rightSlot; Widget? rightSlot;
bool isPwd; bool? isPwd;
ForgetPwdInput({Key key,this.rightSlot,this.isPwd,this.label,this.hintText,this.keyboardType,this.inputFormatters, @required this.controller}) : super(key: key); ForgetPwdInput({Key? key, this.rightSlot, this.isPwd, this.label,this.hintText,this.keyboardType,this.inputFormatters, @required this.controller}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

Some files were not shown because too many files have changed in this diff Show More