完成SDK更新到最新
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 376 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 3.0 KiB |
@ -15,7 +15,7 @@ DEPENDENCIES:
|
||||
- Flutter (from `Flutter`)
|
||||
- flutter_native_contact_picker (from `.symlinks/plugins/flutter_native_contact_picker/ios`)
|
||||
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
||||
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/ios`)
|
||||
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
device_info_plus:
|
||||
@ -27,7 +27,7 @@ EXTERNAL SOURCES:
|
||||
package_info_plus:
|
||||
:path: ".symlinks/plugins/package_info_plus/ios"
|
||||
path_provider_foundation:
|
||||
:path: ".symlinks/plugins/path_provider_foundation/ios"
|
||||
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 50;
|
||||
objectVersion = 54;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
@ -230,10 +230,12 @@
|
||||
};
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
|
||||
);
|
||||
name = "Thin Binary";
|
||||
outputPaths = (
|
||||
@ -244,6 +246,7 @@
|
||||
};
|
||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
|
||||
@ -26,7 +26,7 @@ import 'main/lockDetail/lcokSet/diagnose/diagnose_page.dart';
|
||||
import 'main/lockDetail/lcokSet/doorMagnetic/addDoorMagnetic/addDoorMagnetic_page.dart';
|
||||
import 'main/lockDetail/lcokSet/doorMagnetic/doorMagneticList/doorMagnetic_page.dart';
|
||||
import 'main/lockDetail/lcokSet/doorMagnetic/nearbyDoorMagnetic/nearbyDoorMagnetic_page.dart';
|
||||
import 'main/lockDetail/lcokSet/importOtherLockData/ImportOtherLockData_Page.dart';
|
||||
import 'main/lockDetail/lcokSet/importOtherLockData/ImportOtherLockData_page.dart';
|
||||
import 'main/lockDetail/lcokSet/lockEscalation/lockEscalation_page.dart';
|
||||
import 'main/lockDetail/lcokSet/lockSet/lockSet_page.dart';
|
||||
import 'main/lockDetail/lcokSet/lockSoundSet/lockSoundSet_page.dart';
|
||||
|
||||
@ -5,11 +5,11 @@ class AppLog {
|
||||
static bool _printLog = false;
|
||||
static bool _onlyError = false;
|
||||
|
||||
static showLog({@required bool printLog, bool onlyError}){
|
||||
static showLog({required bool printLog, bool? onlyError}){
|
||||
_printLog = printLog ?? false;
|
||||
_onlyError = onlyError ?? false;
|
||||
}
|
||||
static log(String msg,{bool error}){
|
||||
static log(String msg,{bool? error}){
|
||||
if(!kDebugMode)return;
|
||||
error = error ?? false;
|
||||
if(!_printLog)return;
|
||||
|
||||
@ -17,7 +17,7 @@ class AppStyle {
|
||||
static Size get btnMinSize2 => Size(60.w, 44.h);
|
||||
static Size get btnMinSize3 => Size(60.w, 53.h);
|
||||
|
||||
static TextStyle textStyle({Color textColor,double fontSize,FontWeight fontWeight}) => TextStyle(
|
||||
static TextStyle textStyle({Color? textColor, double? fontSize,FontWeight? fontWeight}) => TextStyle(
|
||||
fontSize: fontSize ?? 18.sp,
|
||||
color: textColor ?? AppColors.buttonEnableTextColor,
|
||||
fontWeight: fontWeight ?? FontWeight.normal,
|
||||
@ -111,22 +111,22 @@ class AppStyle {
|
||||
})
|
||||
);
|
||||
|
||||
static ButtonStyle clearTextButtonStyle({Color textColor,Color bgColor,double fontSize,FontWeight fontWeight}) => ButtonStyle(
|
||||
static ButtonStyle clearTextButtonStyle({Color? textColor, Color? bgColor, double? fontSize, FontWeight? fontWeight}) => ButtonStyle(
|
||||
minimumSize: MaterialStateProperty.resolveWith((states) => btnMinSize),
|
||||
shape: MaterialStateProperty.resolveWith((states) => buttonShape_16),
|
||||
backgroundColor: MaterialStateProperty.resolveWith((states){
|
||||
bgColor ??= AppColors.normalTextColor;
|
||||
if(states.contains(MaterialState.disabled)) return bgColor.withOpacity(0.6);
|
||||
if(states.contains(MaterialState.disabled)) return bgColor?.withOpacity(0.6);
|
||||
return bgColor;
|
||||
}),
|
||||
overlayColor: MaterialStateProperty.resolveWith((states){
|
||||
textColor ??= AppColors.buttonEnableColor;
|
||||
if(states.contains(MaterialState.pressed)) return textColor.withOpacity(0.1);
|
||||
return textColor.withOpacity(0.1);
|
||||
if(states.contains(MaterialState.pressed)) return textColor?.withOpacity(0.1);
|
||||
return textColor?.withOpacity(0.1);
|
||||
}),
|
||||
foregroundColor: MaterialStateProperty.resolveWith((states){
|
||||
textColor ??= AppColors.buttonEnableColor;
|
||||
if(states.contains(MaterialState.disabled)) return textColor.withOpacity(0.4);
|
||||
if(states.contains(MaterialState.disabled)) return textColor?.withOpacity(0.4);
|
||||
return textColor;
|
||||
}),
|
||||
textStyle: MaterialStateProperty.resolveWith((states){
|
||||
@ -190,8 +190,8 @@ class AppStyle {
|
||||
);
|
||||
|
||||
static TextStyle appTextStyle({
|
||||
Color textColor,
|
||||
double fontSize,
|
||||
Color? textColor,
|
||||
double? fontSize,
|
||||
}) => AppStyle.textStyle(
|
||||
textColor: textColor,
|
||||
fontSize: fontSize,
|
||||
|
||||
@ -37,7 +37,7 @@ mixin BaseWidget{
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 10),
|
||||
child: Text(TranslationLoader.lanKeys.noData.tr, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w600)),
|
||||
child: Text(TranslationLoader.lanKeys!.noData!.tr, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w600)),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
||||
@ -15,7 +15,7 @@ import '../../tools/titleAppBar.dart';
|
||||
import '../../translations/trans_lib.dart';
|
||||
|
||||
class StarLockForgetPasswordPage extends StatefulWidget {
|
||||
const StarLockForgetPasswordPage({Key key}) : super(key: key);
|
||||
const StarLockForgetPasswordPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StarLockForgetPasswordPage> createState() => _StarLockForgetPasswordPageState();
|
||||
@ -26,7 +26,7 @@ class _StarLockForgetPasswordPageState extends State<StarLockForgetPasswordPage>
|
||||
final TextEditingController _pwdController = TextEditingController();
|
||||
final TextEditingController _codeController = TextEditingController();
|
||||
|
||||
Timer _timer;
|
||||
late Timer _timer;
|
||||
|
||||
int _seconds = 60;
|
||||
|
||||
@ -35,7 +35,7 @@ class _StarLockForgetPasswordPageState extends State<StarLockForgetPasswordPage>
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: const Color(0xFFFFFFFF),
|
||||
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.reset.tr} ${TranslationLoader.lanKeys.password.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.reset!.tr} ${TranslationLoader.lanKeys!.password!.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:ListView(
|
||||
padding: EdgeInsets.only(
|
||||
top: 40.h,
|
||||
@ -43,22 +43,22 @@ class _StarLockForgetPasswordPageState extends State<StarLockForgetPasswordPage>
|
||||
right: 40.w
|
||||
),
|
||||
children: [
|
||||
LoginInput(controller: _phoneController, leftImg:'images/main/icon_main_search.png', hintText: TranslationLoader.lanKeys.pleaseEnterNumberOrEmail.tr, keyboardType: TextInputType.number,inputFormatters: [
|
||||
LoginInput(controller: _phoneController, leftImg:'images/main/icon_main_search.png', hintText: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, keyboardType: TextInputType.number,inputFormatters: [
|
||||
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
||||
LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
SizedBox(height: 10.w),
|
||||
LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys.pleaseEnter.tr} ${TranslationLoader.lanKeys.password.tr}",inputFormatters: [
|
||||
LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.password!.tr}",inputFormatters: [
|
||||
LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
SizedBox(height: 15.w),
|
||||
Text(TranslationLoader.lanKeys.registerPasswordTip.tr, style: TextStyle(color: const Color(0xFF999999), fontSize: 26.sp),),
|
||||
Text(TranslationLoader.lanKeys!.registerPasswordTip!.tr, style: TextStyle(color: const Color(0xFF999999), fontSize: 26.sp),),
|
||||
SizedBox(height: 10.w),
|
||||
LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys.sure.tr} ${TranslationLoader.lanKeys.password.tr}",inputFormatters: [
|
||||
LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys!.sure!.tr} ${TranslationLoader.lanKeys!.password!.tr}",inputFormatters: [
|
||||
LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
SizedBox(height: 10.w),
|
||||
ForgetPwdInput(controller: _codeController,hintText: '${TranslationLoader.lanKeys.pleaseEnter.tr} ${TranslationLoader.lanKeys.verificationCode.tr}',keyboardType: TextInputType.number,inputFormatters: [
|
||||
ForgetPwdInput(controller: _codeController,hintText: '${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}',keyboardType: TextInputType.number,inputFormatters: [
|
||||
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
||||
LengthLimitingTextInputFormatter(6),
|
||||
],rightSlot: Container(
|
||||
@ -73,7 +73,7 @@ class _StarLockForgetPasswordPageState extends State<StarLockForgetPasswordPage>
|
||||
borderRadius: BorderRadius.circular(5)
|
||||
),
|
||||
child: Center(
|
||||
child: Text(_seconds==60?'${TranslationLoader.lanKeys.getTip.tr} ${TranslationLoader.lanKeys.verificationCode.tr}': (_seconds<10)?'0$_seconds s':'$_seconds s', textAlign:TextAlign.center, style: TextStyle(
|
||||
child: Text(_seconds==60?'${TranslationLoader.lanKeys!.getTip!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}': (_seconds<10)?'0$_seconds s':'$_seconds s', textAlign:TextAlign.center, style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 26.sp,
|
||||
)),
|
||||
@ -89,7 +89,7 @@ class _StarLockForgetPasswordPageState extends State<StarLockForgetPasswordPage>
|
||||
),
|
||||
)),
|
||||
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: (){
|
||||
|
||||
}),
|
||||
],
|
||||
|
||||
@ -12,7 +12,7 @@ import '../../tools/titleAppBar.dart';
|
||||
import '../../translations/trans_lib.dart';
|
||||
|
||||
class StarLockLoginPage extends StatefulWidget {
|
||||
const StarLockLoginPage({Key key}) : super(key: key);
|
||||
const StarLockLoginPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StarLockLoginPage> createState() => _StarLockLoginPageState();
|
||||
@ -27,9 +27,9 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: const Color(0xFFFFFFFF),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.login.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.login!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
TextButton(
|
||||
child: Text(TranslationLoader.lanKeys.register.tr, style: TextStyle(color: Colors.white),),
|
||||
child: Text(TranslationLoader.lanKeys!.register!.tr, style: const TextStyle(color: Colors.white),),
|
||||
onPressed: (){
|
||||
Navigator.pushNamed(context, Routers.starLockRegisterPage);
|
||||
},),
|
||||
@ -48,12 +48,12 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
|
||||
)
|
||||
),
|
||||
SizedBox(height: 50.w),
|
||||
LoginInput(controller: _phoneController, leftImg:'images/main/icon_main_search.png', hintText: TranslationLoader.lanKeys.pleaseEnterNumberOrEmail.tr, keyboardType: TextInputType.number,inputFormatters: [
|
||||
LoginInput(controller: _phoneController, leftImg:'images/main/icon_main_search.png', hintText: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, keyboardType: TextInputType.number,inputFormatters: [
|
||||
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
||||
LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
SizedBox(height: 50.w),
|
||||
LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys.pleaseEnter.tr} ${TranslationLoader.lanKeys.password.tr}",inputFormatters: [
|
||||
LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.password!.tr}",inputFormatters: [
|
||||
LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
SizedBox(height: 20.h),
|
||||
@ -71,7 +71,7 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
|
||||
Flexible(
|
||||
child: RichText(
|
||||
text: TextSpan(
|
||||
text: TranslationLoader.lanKeys.readAndAgree.tr,
|
||||
text: TranslationLoader.lanKeys!.readAndAgree!.tr,
|
||||
style: TextStyle(
|
||||
color: const Color(0xff333333),
|
||||
fontSize: 26.sp
|
||||
@ -80,7 +80,7 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
|
||||
WidgetSpan(
|
||||
alignment: PlaceholderAlignment.middle,
|
||||
child: GestureDetector(
|
||||
child: Text('《${TranslationLoader.lanKeys.userAgreement.tr}》',style: TextStyle(
|
||||
child: Text('《${TranslationLoader.lanKeys!.userAgreement!.tr}》',style: TextStyle(
|
||||
color: AppColors.mainColor,
|
||||
fontSize: 26.sp
|
||||
)),
|
||||
@ -92,7 +92,7 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
|
||||
WidgetSpan(
|
||||
alignment: PlaceholderAlignment.middle,
|
||||
child: GestureDetector(
|
||||
child: Text('《${TranslationLoader.lanKeys.privacyPolicy.tr}》',style: TextStyle(
|
||||
child: Text('《${TranslationLoader.lanKeys!.privacyPolicy!.tr}》',style: TextStyle(
|
||||
color: AppColors.mainColor,
|
||||
fontSize: 26.sp
|
||||
)),
|
||||
@ -108,7 +108,7 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
|
||||
],
|
||||
),
|
||||
SizedBox(height: 50.w),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys.login.tr, fontSize: 28.sp, borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.login!.tr, fontSize: 28.sp, borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
|
||||
|
||||
}),
|
||||
SizedBox(height: 50.w),
|
||||
@ -121,7 +121,7 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
|
||||
height: 50.h,
|
||||
// color: Colors.red,
|
||||
child: Center(
|
||||
child: Text('${TranslationLoader.lanKeys.forgetPassword.tr}?',style: TextStyle(fontSize: 24.sp)),
|
||||
child: Text('${TranslationLoader.lanKeys!.forgetPassword!.tr}?',style: TextStyle(fontSize: 24.sp)),
|
||||
),
|
||||
),
|
||||
onTap: (){
|
||||
|
||||
@ -15,7 +15,7 @@ import '../../tools/titleAppBar.dart';
|
||||
import '../../translations/trans_lib.dart';
|
||||
|
||||
class StarLockRegisterPage extends StatefulWidget {
|
||||
const StarLockRegisterPage({Key key}) : super(key: key);
|
||||
const StarLockRegisterPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StarLockRegisterPage> createState() => _StarLockRegisterPageState();
|
||||
@ -26,7 +26,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
|
||||
final TextEditingController _pwdController = TextEditingController();
|
||||
final TextEditingController _codeController = TextEditingController();
|
||||
|
||||
Timer _timer;
|
||||
late Timer _timer;
|
||||
|
||||
int _seconds = 60;
|
||||
|
||||
@ -35,7 +35,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: const Color(0xFFFFFFFF),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.register.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.register!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:ListView(
|
||||
padding: EdgeInsets.only(
|
||||
top: 40.h,
|
||||
@ -45,7 +45,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
|
||||
children: [
|
||||
topSeletCountryAndRegionWidget (),
|
||||
middleTFWidget (),
|
||||
SubmitBtn(btnName: "${TranslationLoader.lanKeys.reset.tr} ${TranslationLoader.lanKeys.password.tr}", fontSize: 30.sp, borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
|
||||
SubmitBtn(btnName: "${TranslationLoader.lanKeys!.reset!.tr} ${TranslationLoader.lanKeys!.password!.tr}", fontSize: 30.sp, borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
|
||||
|
||||
}),
|
||||
],
|
||||
@ -93,7 +93,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
|
||||
bottom: BorderSide(width: 1.0, color: Color(0xffC0C0C0)),
|
||||
)
|
||||
),
|
||||
child: Center(child: Text(TranslationLoader.lanKeys.iphone.tr, style: TextStyle(color: Colors.white),))
|
||||
child: Center(child: Text(TranslationLoader.lanKeys!.iphone!.tr, style: TextStyle(color: Colors.white),))
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
@ -113,7 +113,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
|
||||
// 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(
|
||||
children: [
|
||||
SizedBox(width:5.w),
|
||||
Expanded(child: Text(TranslationLoader.lanKeys.countryAndRegion.tr, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w500))),
|
||||
Expanded(child: Text(TranslationLoader.lanKeys!.countryAndRegion!.tr, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w500))),
|
||||
SizedBox(width:20.w),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
@ -157,22 +157,22 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
|
||||
Widget middleTFWidget (){
|
||||
return Column(
|
||||
children: [
|
||||
LoginInput(controller: _phoneController, leftImg:'images/main/icon_main_search.png', hintText: TranslationLoader.lanKeys.pleaseEnterNumberOrEmail.tr, keyboardType: TextInputType.number,inputFormatters: [
|
||||
LoginInput(controller: _phoneController, leftImg:'images/main/icon_main_search.png', hintText: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, keyboardType: TextInputType.number,inputFormatters: [
|
||||
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
||||
LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
SizedBox(height: 10.w),
|
||||
LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys.pleaseEnter.tr} ${TranslationLoader.lanKeys.password.tr}",inputFormatters: [
|
||||
LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.password!.tr}",inputFormatters: [
|
||||
LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
SizedBox(height: 15.w),
|
||||
Text(TranslationLoader.lanKeys.registerPasswordTip.tr, style: TextStyle(color: const Color(0xFF999999), fontSize: 26.sp),),
|
||||
Text(TranslationLoader.lanKeys!.registerPasswordTip!.tr, style: TextStyle(color: const Color(0xFF999999), fontSize: 26.sp),),
|
||||
SizedBox(height: 10.w),
|
||||
LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys.sure.tr} ${TranslationLoader.lanKeys.password.tr}",inputFormatters: [
|
||||
LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys!.sure!.tr} ${TranslationLoader.lanKeys!.password!.tr}",inputFormatters: [
|
||||
LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
SizedBox(height: 10.w),
|
||||
ForgetPwdInput(controller: _codeController,hintText: '${TranslationLoader.lanKeys.pleaseEnter.tr} ${TranslationLoader.lanKeys.verificationCode.tr}',keyboardType: TextInputType.number,inputFormatters: [
|
||||
ForgetPwdInput(controller: _codeController,hintText: '${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}',keyboardType: TextInputType.number,inputFormatters: [
|
||||
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
||||
LengthLimitingTextInputFormatter(6),
|
||||
],rightSlot: Container(
|
||||
@ -187,7 +187,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
|
||||
borderRadius: BorderRadius.circular(5)
|
||||
),
|
||||
child: Center(
|
||||
child: Text(_seconds==60?'${TranslationLoader.lanKeys.getTip.tr} ${TranslationLoader.lanKeys.verificationCode.tr}': (_seconds<10)?'0$_seconds s':'$_seconds s',textAlign:TextAlign.center, style: TextStyle(
|
||||
child: Text(_seconds==60?'${TranslationLoader.lanKeys!.getTip!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}': (_seconds<10)?'0$_seconds s':'$_seconds s',textAlign:TextAlign.center, style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 26.sp
|
||||
)),
|
||||
|
||||
@ -7,7 +7,7 @@ import '../../tools/titleAppBar.dart';
|
||||
import '../../translations/trans_lib.dart';
|
||||
|
||||
class SeletCountryRegionPage extends StatefulWidget {
|
||||
const SeletCountryRegionPage({Key key}) : super(key: key);
|
||||
const SeletCountryRegionPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<SeletCountryRegionPage> createState() => _SeletCountryRegionPageState();
|
||||
@ -19,7 +19,7 @@ class _SeletCountryRegionPageState extends State<SeletCountryRegionPage> {
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: const Color(0xFFFFFFFF),
|
||||
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.selet.tr} ${TranslationLoader.lanKeys.countryAndRegion.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.selet!.tr} ${TranslationLoader.lanKeys!.countryAndRegion!.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:ListView(
|
||||
padding: EdgeInsets.only(top: 40.h, left: 40.w, right: 40.w),
|
||||
children: [
|
||||
|
||||
@ -23,7 +23,7 @@ void main() async {
|
||||
}
|
||||
|
||||
class MyApp extends StatefulWidget {
|
||||
const MyApp({GlobalKey key}):super(key: key);
|
||||
const MyApp({GlobalKey? key}):super(key: key);
|
||||
|
||||
@override
|
||||
State<MyApp> createState() => _MyAppState();
|
||||
@ -49,7 +49,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver, BaseWidget {
|
||||
],
|
||||
localeResolutionCallback: (locale,supportedLocales){
|
||||
if(!supportedLocales.contains(locale)) {
|
||||
int idx = appSupportedLocales.indexWhere((element) => element.languageCode == locale.languageCode);
|
||||
int idx = appSupportedLocales.indexWhere((element) => element.languageCode == locale!.languageCode);
|
||||
if(idx != -1) {
|
||||
locale = appSupportedLocales[idx];
|
||||
}else {
|
||||
@ -57,7 +57,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver, BaseWidget {
|
||||
}
|
||||
}
|
||||
// print("localelocalelocalelocalelocale locale:${locale} locale.languageCode:${locale.languageCode} locale.countryCode:${locale.countryCode} supportedLocales:${supportedLocales}");
|
||||
AppManager().setLanCode(code: '${locale.languageCode}_${locale.countryCode}');
|
||||
AppManager().setLanCode(code: '${locale!.languageCode}_${locale.countryCode}');
|
||||
return locale;
|
||||
},
|
||||
// locale: StoreService.to.getLanguageCode().isNotEmpty ? appDept.deptSupportedLocales.where((element) => element.languageCode == StoreService.to.getLanguageCode()).first : Get.deviceLocale,
|
||||
|
||||
@ -8,7 +8,7 @@ import '../../../../../translations/trans_lib.dart';
|
||||
import 'authorizedAdminManage_tabbar.dart';
|
||||
|
||||
class AuthorizedAdminManagePage extends StatefulWidget {
|
||||
const AuthorizedAdminManagePage({Key key}) : super(key: key);
|
||||
const AuthorizedAdminManagePage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<AuthorizedAdminManagePage> createState() => _AuthorizedAdminManagePageState();
|
||||
@ -21,7 +21,7 @@ class _AuthorizedAdminManagePageState extends State<AuthorizedAdminManagePage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.authorizedAdmin.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.authorizedAdmin!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
AuthorizedAdminManageTabbar(initialIndex: index,),
|
||||
|
||||
@ -11,18 +11,18 @@ import '../authorizedAdmin_page.dart';
|
||||
class AuthorizedAdminManageTabbar extends StatefulWidget {
|
||||
var initialIndex=1;
|
||||
|
||||
AuthorizedAdminManageTabbar({Key key, @required this.initialIndex}) : super(key: key);
|
||||
AuthorizedAdminManageTabbar({Key? key, required this.initialIndex}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<AuthorizedAdminManageTabbar> createState() => _AuthorizedAdminManageTabbarState();
|
||||
}
|
||||
|
||||
class _AuthorizedAdminManageTabbarState extends State<AuthorizedAdminManageTabbar> with SingleTickerProviderStateMixin {
|
||||
TabController _tabController;
|
||||
late TabController _tabController;
|
||||
|
||||
final List<ItemView> _itemTabs= <ItemView>[
|
||||
ItemView(title: TranslationLoader.lanKeys.timeLimit.tr, type: "0"),
|
||||
ItemView(title: TranslationLoader.lanKeys.permanent.tr, type: "1"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: "0"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: "1"),
|
||||
];
|
||||
|
||||
@override
|
||||
@ -82,7 +82,7 @@ class _AuthorizedAdminManageTabbarState extends State<AuthorizedAdminManageTabba
|
||||
}
|
||||
|
||||
class ItemView {
|
||||
const ItemView({@required this.title, @required this.type});
|
||||
const ItemView({required this.title, required this.type});
|
||||
|
||||
final String title;
|
||||
final String type;
|
||||
|
||||
@ -11,7 +11,7 @@ import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class AuthorizedAdminPage extends StatefulWidget {
|
||||
final String type;
|
||||
AuthorizedAdminPage({Key key, @required this.type}) : super(key: key);
|
||||
AuthorizedAdminPage({Key? key, required this.type}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<AuthorizedAdminPage> createState() => _AuthorizedAdminPageState();
|
||||
@ -19,7 +19,7 @@ class AuthorizedAdminPage extends StatefulWidget {
|
||||
|
||||
class _AuthorizedAdminPageState extends State<AuthorizedAdminPage> {
|
||||
final FlutterContactPicker _contactPicker = FlutterContactPicker();
|
||||
Contact _contact;
|
||||
late Contact _contact;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -44,25 +44,19 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage> {
|
||||
keyInfoWidget(),
|
||||
keyTimeWidget(),
|
||||
keyRealNameWidget(),
|
||||
keyBottomWidget(TranslationLoader.lanKeys.authorizedAdminTip.tr)
|
||||
keyBottomWidget(TranslationLoader.lanKeys!.authorizedAdminTip!.tr)
|
||||
],
|
||||
);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
// 永久
|
||||
return Column(
|
||||
children: [
|
||||
keyInfoWidget(),
|
||||
keyRealNameWidget(),
|
||||
keyBottomWidget(TranslationLoader.lanKeys.authorizedAdminTip.tr)
|
||||
],
|
||||
);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
// 永久
|
||||
return Column(
|
||||
children: [
|
||||
keyInfoWidget(),
|
||||
keyRealNameWidget(),
|
||||
keyBottomWidget(TranslationLoader.lanKeys!.authorizedAdminTip!.tr)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,8 +65,8 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage> {
|
||||
return Column(
|
||||
children: [
|
||||
Container(height: 10.h),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.receiver.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(true, TranslationLoader.lanKeys.pleaseEnterNumberOrEmail.tr)),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.name.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: getTFWidget(false, TranslationLoader.lanKeys.pleaseEnter.tr)),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.receiver!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(true, TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr)),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.name!.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: getTFWidget(false, TranslationLoader.lanKeys!.pleaseEnter!.tr)),
|
||||
Container(height: 10.h),
|
||||
],
|
||||
);
|
||||
@ -82,10 +76,10 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage> {
|
||||
Widget keyTimeWidget(){
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true, isHaveDirection: true, action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true, isHaveDirection: true, action:(){
|
||||
// _showDatePicker();
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.failureTime.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, action:(){
|
||||
// _showDatePicker();
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
@ -97,7 +91,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage> {
|
||||
Widget keyRealNameWidget(){
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.realNameAuthentication.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch()), action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.realNameAuthentication!.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch()), action:(){
|
||||
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
@ -117,7 +111,7 @@ class _AuthorizedAdminPageState extends State<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: (){
|
||||
|
||||
}
|
||||
@ -130,7 +124,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage> {
|
||||
children: [
|
||||
TextButton(onPressed: (){
|
||||
Navigator.pushNamed(context, Routers.volumeAuthorizationLockManagePage);
|
||||
}, child: Text(TranslationLoader.lanKeys.volumeAuthorizationLock.tr, style: TextStyle(color: AppColors.mainColor, fontWeight: FontWeight.w500),)),
|
||||
}, child: Text(TranslationLoader.lanKeys!.volumeAuthorizationLock!.tr, style: TextStyle(color: AppColors.mainColor, fontWeight: FontWeight.w500),)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -214,9 +208,9 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage> {
|
||||
alignment: Alignment.center,
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
Contact contact = await _contactPicker.selectContact();
|
||||
Contact? contact = await _contactPicker.selectContact();
|
||||
setState(() {
|
||||
_contact = contact;
|
||||
_contact = contact!;
|
||||
// print("object111111111111 ${_contact.fullName} ${_contact.phoneNumbers}");
|
||||
});
|
||||
},
|
||||
|
||||
@ -12,7 +12,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class AuthorizedAdminDetailPage extends StatefulWidget {
|
||||
const AuthorizedAdminDetailPage({Key key}) : super(key: key);
|
||||
const AuthorizedAdminDetailPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<AuthorizedAdminDetailPage> createState() => _AuthorizedAdminDetailPageState();
|
||||
@ -23,38 +23,38 @@ class _AuthorizedAdminDetailPageState extends State<AuthorizedAdminDetailPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.authorizedAdmin.tr}${TranslationLoader.lanKeys.detail.tr}", haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.authorizedAdmin!.tr}${TranslationLoader.lanKeys!.detail!.tr}", haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
TextButton(
|
||||
child: Text(TranslationLoader.lanKeys.share.tr, style: TextStyle(color: Colors.white),),
|
||||
child: Text(TranslationLoader.lanKeys!.share!.tr, style: TextStyle(color: Colors.white),),
|
||||
onPressed: (){
|
||||
|
||||
},),
|
||||
],),
|
||||
body: Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.password.tr, rightTitle:"98765432", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.password!.tr, rightTitle:"98765432", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
showCupertinoAlertDialog(context);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.name.tr, rightTitle:"你好", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.name!.tr, rightTitle:"你好", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
showCupertinoAlertDialog(context);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"永久", isHaveDirection: true, action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"永久", isHaveDirection: true, action:(){
|
||||
Navigator.pushNamed(context, Routers.electronicKeyDetailChangeDate);
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.sender.tr, rightTitle:"15080825640", action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.sender!.tr, rightTitle:"15080825640", action:(){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.senderTime.tr, rightTitle:"2020.06.21 11:49", action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.senderTime!.tr, rightTitle:"2020.06.21 11:49", action:(){
|
||||
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.operatingRecord.tr, rightTitle:"", isHaveDirection: true, action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.operatingRecord!.tr, rightTitle:"", isHaveDirection: true, action:(){
|
||||
|
||||
}),
|
||||
Container(height: 40.h),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys.delete.tr,
|
||||
btnName: TranslationLoader.lanKeys!.delete!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
@ -67,7 +67,7 @@ class _AuthorizedAdminDetailPageState extends State<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(
|
||||
onTap: action,
|
||||
child: Column(
|
||||
@ -86,7 +86,7 @@ class _AuthorizedAdminDetailPageState extends State<AuthorizedAdminDetailPage> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
isHaveRightWidget?rightWidget:Text(rightTitle, textAlign: TextAlign.end,style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),)
|
||||
isHaveRightWidget?rightWidget!:Text(rightTitle, textAlign: TextAlign.end,style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@ -10,7 +10,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class AuthorizedAdminListPage extends StatefulWidget {
|
||||
const AuthorizedAdminListPage({Key key}) : super(key: key);
|
||||
const AuthorizedAdminListPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<AuthorizedAdminListPage> createState() => _AuthorizedAdminListPageState();
|
||||
@ -21,9 +21,9 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.authorizedAdmin.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.authorizedAdmin!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
TextButton(
|
||||
child: Text(TranslationLoader.lanKeys.reset.tr, style: TextStyle(color: Colors.white),),
|
||||
child: Text(TranslationLoader.lanKeys!.reset!.tr, style: const TextStyle(color: Colors.white),),
|
||||
onPressed: (){
|
||||
|
||||
},),
|
||||
@ -33,7 +33,7 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
||||
_searchWidget(),
|
||||
Expanded(child: _buildMainUI()),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys.authorizedAdmin.tr,
|
||||
btnName: TranslationLoader.lanKeys!.authorizedAdmin!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
@ -62,7 +62,7 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(
|
||||
top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
|
||||
hintText: TranslationLoader.lanKeys.pleaseEnter.tr,
|
||||
hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
//左边图标设置
|
||||
@ -86,7 +86,7 @@ class _AuthorizedAdminListPageState extends State<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(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
|
||||
@ -7,7 +7,7 @@ import '../../../../../tools/titleAppBar.dart';
|
||||
import '../../../../../translations/trans_lib.dart';
|
||||
|
||||
class VolumeAuthorizationLockManagePage extends StatefulWidget {
|
||||
const VolumeAuthorizationLockManagePage({Key key}):super(key:key);
|
||||
const VolumeAuthorizationLockManagePage({Key? key}):super(key:key);
|
||||
|
||||
@override
|
||||
State<VolumeAuthorizationLockManagePage> createState() => _VolumeAuthorizationLockManagePageState();
|
||||
@ -20,7 +20,7 @@ class _VolumeAuthorizationLockManagePageState extends State<VolumeAuthorizationL
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
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(
|
||||
children: [
|
||||
VolumeAuthorizationLockManageTabbar(initialIndex: index,),
|
||||
|
||||
@ -10,18 +10,18 @@ import '../volumeAuthorizationLock_page.dart';
|
||||
class VolumeAuthorizationLockManageTabbar extends StatefulWidget {
|
||||
var initialIndex=1;
|
||||
|
||||
VolumeAuthorizationLockManageTabbar({Key key, @required this.initialIndex}) : super(key: key);
|
||||
VolumeAuthorizationLockManageTabbar({Key? key, required this.initialIndex}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<VolumeAuthorizationLockManageTabbar> createState() => _VolumeAuthorizationLockManageTabbarState();
|
||||
}
|
||||
|
||||
class _VolumeAuthorizationLockManageTabbarState extends State<VolumeAuthorizationLockManageTabbar> with SingleTickerProviderStateMixin {
|
||||
TabController _tabController;
|
||||
late TabController _tabController;
|
||||
|
||||
final List<ItemView> _itemTabs= <ItemView>[
|
||||
ItemView(title: TranslationLoader.lanKeys.permanent.tr, type: "0"),
|
||||
ItemView(title: TranslationLoader.lanKeys.timeLimit.tr, type: "1"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: "0"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: "1"),
|
||||
];
|
||||
|
||||
@override
|
||||
@ -81,7 +81,7 @@ class _VolumeAuthorizationLockManageTabbarState extends State<VolumeAuthorizatio
|
||||
}
|
||||
|
||||
class ItemView {
|
||||
const ItemView({@required this.title, @required this.type});
|
||||
const ItemView({required this.title, required this.type});
|
||||
|
||||
final String title;
|
||||
final String type;
|
||||
|
||||
@ -12,7 +12,7 @@ import '../../../../translations/trans_lib.dart';
|
||||
class VolumeAuthorizationLockPage extends StatefulWidget {
|
||||
final String type;
|
||||
|
||||
const VolumeAuthorizationLockPage({Key key, @required this.type}):super(key:key);
|
||||
const VolumeAuthorizationLockPage({Key? key, required this.type}):super(key:key);
|
||||
|
||||
@override
|
||||
State<VolumeAuthorizationLockPage> createState() => _VolumeAuthorizationLockPageState();
|
||||
@ -20,7 +20,7 @@ class VolumeAuthorizationLockPage extends StatefulWidget {
|
||||
|
||||
class _VolumeAuthorizationLockPageState extends State<VolumeAuthorizationLockPage> {
|
||||
final FlutterContactPicker _contactPicker = FlutterContactPicker();
|
||||
Contact _contact;
|
||||
late Contact _contact;
|
||||
|
||||
@override
|
||||
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:
|
||||
// 限时
|
||||
return Column(
|
||||
children: [
|
||||
keyInfoWidget(),
|
||||
keyTimeWidget(),
|
||||
remoteUnlockingWidget(),
|
||||
keyBottomWidget()
|
||||
],
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -71,8 +66,8 @@ class _VolumeAuthorizationLockPageState extends State<VolumeAuthorizationLockPag
|
||||
return Column(
|
||||
children: [
|
||||
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.name.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: getTFWidget(false, TranslationLoader.lanKeys.pleaseEnter.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)),
|
||||
Container(height: 10.h),
|
||||
],
|
||||
);
|
||||
@ -82,8 +77,8 @@ class _VolumeAuthorizationLockPageState extends State<VolumeAuthorizationLockPag
|
||||
Widget keyTimeWidget(){
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.failureTime.tr, rightTitle:"2020.06.20 11:49", ),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"2020.06.20 11:49", ),
|
||||
Container(height: 10.h),
|
||||
],
|
||||
);
|
||||
@ -93,11 +88,11 @@ class _VolumeAuthorizationLockPageState extends State<VolumeAuthorizationLockPag
|
||||
Widget remoteUnlockingWidget(){
|
||||
return Column(
|
||||
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),
|
||||
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),
|
||||
@ -109,7 +104,7 @@ class _VolumeAuthorizationLockPageState extends State<VolumeAuthorizationLockPag
|
||||
return Column(
|
||||
children: [
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys.sure.tr,
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
@ -158,9 +153,9 @@ class _VolumeAuthorizationLockPageState extends State<VolumeAuthorizationLockPag
|
||||
alignment: Alignment.center,
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
Contact contact = await _contactPicker.selectContact();
|
||||
Contact? contact = await _contactPicker.selectContact();
|
||||
setState(() {
|
||||
_contact = contact;
|
||||
_contact = contact!;
|
||||
// print("object111111111111 ${_contact.fullName} ${_contact.phoneNumbers}");
|
||||
});
|
||||
},
|
||||
|
||||
@ -10,7 +10,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class CheckingInAddHolidaysPage extends StatefulWidget {
|
||||
const CheckingInAddHolidaysPage({Key key}) : super(key: key);
|
||||
const CheckingInAddHolidaysPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<CheckingInAddHolidaysPage> createState() => _CheckingInAddHolidaysPageState();
|
||||
@ -22,11 +22,11 @@ class _CheckingInAddHolidaysPageState extends State<CheckingInAddHolidaysPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle:TranslationLoader.lanKeys.addedHoliday.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle:TranslationLoader.lanKeys!.addedHoliday!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.name.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget("(${TranslationLoader.lanKeys.mustFillIn.tr})")),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.startDate.tr, rightTitle:"(${TranslationLoader.lanKeys.mustFillIn.tr})", isHaveLine: true, isHaveDirection: false, action: () async {
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.name!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget("(${TranslationLoader.lanKeys!.mustFillIn!.tr})")),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.startDate!.tr, rightTitle:"(${TranslationLoader.lanKeys!.mustFillIn!.tr})", isHaveLine: true, isHaveDirection: false, action: () async {
|
||||
await showDialog(context: context,
|
||||
builder: (context) {
|
||||
return ShowCalendar(datePickerMode: DatePickerMode.day, seletAction: (dateTime){
|
||||
@ -35,7 +35,7 @@ class _CheckingInAddHolidaysPageState extends State<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,
|
||||
builder: (context) {
|
||||
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,
|
||||
builder: (context) {
|
||||
return ShowCalendar(datePickerMode: DatePickerMode.day, seletAction: (dateTime){
|
||||
@ -52,7 +52,7 @@ class _CheckingInAddHolidaysPageState extends State<CheckingInAddHolidaysPage> {
|
||||
});
|
||||
}),
|
||||
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: (){
|
||||
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class CheckingInDetailPage extends StatefulWidget {
|
||||
const CheckingInDetailPage({Key key}) : super(key: key);
|
||||
const CheckingInDetailPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_CheckingInDetailPageState createState() => _CheckingInDetailPageState();
|
||||
@ -114,8 +114,8 @@ class _CheckingInDetailPageState extends State<CheckingInDetailPage> {
|
||||
child: Container(
|
||||
// margin: EdgeInsets.only(left: 20.w),
|
||||
child: Image(
|
||||
width: 30.w,
|
||||
height: 30.w,
|
||||
width: 40.w,
|
||||
height: 40.w,
|
||||
image: const AssetImage("images/icon_left_black.png"),
|
||||
),
|
||||
),
|
||||
@ -130,8 +130,8 @@ class _CheckingInDetailPageState extends State<CheckingInDetailPage> {
|
||||
child: Container(
|
||||
// margin: EdgeInsets.only(right: 20.sp),
|
||||
child: Image(
|
||||
width: 30.w,
|
||||
height: 30.h,
|
||||
width: 40.w,
|
||||
height: 40.h,
|
||||
image: const AssetImage("images/icon_right_black.png"),
|
||||
),
|
||||
),
|
||||
@ -143,7 +143,14 @@ class _CheckingInDetailPageState extends State<CheckingInDetailPage> {
|
||||
|
||||
//中部周
|
||||
Widget _weekHeader() {
|
||||
var array = ["一", "二", "三", "四", "五", "六", "日"];
|
||||
var array = [
|
||||
TranslationLoader.lanKeys!.mondayShort!.tr,
|
||||
TranslationLoader.lanKeys!.tuesdayShort!.tr,
|
||||
TranslationLoader.lanKeys!.wednesdayShort!.tr,
|
||||
TranslationLoader.lanKeys!.thursdayShort!.tr,
|
||||
TranslationLoader.lanKeys!.fridayShort!.tr,
|
||||
TranslationLoader.lanKeys!.saturdayShort!.tr,
|
||||
TranslationLoader.lanKeys!.sundayShort!.tr];
|
||||
return Container(
|
||||
height: 50.h,
|
||||
child: GridView.builder(
|
||||
@ -202,7 +209,7 @@ class _CheckingInDetailPageState extends State<CheckingInDetailPage> {
|
||||
for (int i = 0; i < _datas.length; i++) {
|
||||
if (i == index) {
|
||||
//切换至选中的日期
|
||||
_day = _datas[i].day;
|
||||
_day = _datas[i].day!;
|
||||
_datas[i].isSelect = true;
|
||||
|
||||
//加载选中的日期事件
|
||||
@ -224,7 +231,7 @@ class _CheckingInDetailPageState extends State<CheckingInDetailPage> {
|
||||
width: 40.w,
|
||||
height: 40.w,
|
||||
//设置底部背景
|
||||
decoration: _datas[index].isSelect
|
||||
decoration: _datas[index].isSelect!
|
||||
? const BoxDecoration(
|
||||
color: Color(0xFF2C91F6),
|
||||
shape: BoxShape.circle,
|
||||
@ -238,7 +245,7 @@ class _CheckingInDetailPageState extends State<CheckingInDetailPage> {
|
||||
: "",
|
||||
textAlign: TextAlign.center,
|
||||
//设置选中字体颜色,以及周末和工作日颜色
|
||||
style: _datas[index].isSelect
|
||||
style: _datas[index].isSelect!
|
||||
? TextStyle(
|
||||
fontSize: 32.sp, color: const Color(0xFFFFFFFF))
|
||||
: (index % 7 == 5 || index % 7 == 6
|
||||
@ -325,7 +332,7 @@ class _CheckingInDetailPageState extends State<CheckingInDetailPage> {
|
||||
}
|
||||
|
||||
// 获取行数
|
||||
int _getRowsForMonthYear({int year, int month}) {
|
||||
int _getRowsForMonthYear({int? year, int? month}) {
|
||||
//当前月天数
|
||||
var currentMonthDays = _getCurrentMonthDays(year: year, month: month);
|
||||
//
|
||||
@ -341,15 +348,15 @@ class _CheckingInDetailPageState extends State<CheckingInDetailPage> {
|
||||
}
|
||||
|
||||
// 得到这个月的第一天是星期几
|
||||
int _getPlaceholderDays({int year, int month}) {
|
||||
return DateTime(year, month).weekday - 1 % 7;
|
||||
int _getPlaceholderDays({int? year, int? month}) {
|
||||
return DateTime(year!, month!).weekday - 1 % 7;
|
||||
}
|
||||
|
||||
// 获取当前月份天数
|
||||
int _getCurrentMonthDays({int year, int month}) {
|
||||
int _getCurrentMonthDays({int? year, int? month}) {
|
||||
if (month == 2) {
|
||||
//判断2月份是闰年月还是平年
|
||||
if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) {
|
||||
if (((year! % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) {
|
||||
return 29;
|
||||
} else {
|
||||
return 28;
|
||||
@ -368,12 +375,12 @@ class _CheckingInDetailPageState extends State<CheckingInDetailPage> {
|
||||
}
|
||||
|
||||
/// 获取展示信息
|
||||
_setDatas({int year, int month}) {
|
||||
_setDatas({int? year, int? month}) {
|
||||
/// 上个月占位
|
||||
var lastYear = year;
|
||||
var lastMonth = month - 1;
|
||||
var lastMonth = month! - 1;
|
||||
if (month == 1) {
|
||||
lastYear = year - 1;
|
||||
lastYear = (year! - 1)!;
|
||||
lastMonth = 12;
|
||||
}
|
||||
|
||||
@ -413,7 +420,7 @@ class _CheckingInDetailPageState extends State<CheckingInDetailPage> {
|
||||
var nextYear = year;
|
||||
var nextMonth = month + 1;
|
||||
if (month == 12) {
|
||||
nextYear = year + 1;
|
||||
nextYear = (year! + 1)!;
|
||||
nextMonth = 1;
|
||||
}
|
||||
var nextPlaceholderDays =
|
||||
@ -489,11 +496,11 @@ class _CheckingInDetailPageState extends State<CheckingInDetailPage> {
|
||||
|
||||
//日历bean
|
||||
class CalendarModel {
|
||||
int year;
|
||||
int month;
|
||||
int day;
|
||||
String workType = "";//日期事件,0,休息,1,异常,2,正常
|
||||
bool isSelect = false;
|
||||
int? year;
|
||||
int? month;
|
||||
int? day;
|
||||
String? workType = "";//日期事件,0,休息,1,异常,2,正常
|
||||
bool? isSelect = false;
|
||||
|
||||
CalendarModel(
|
||||
{this.year, this.month, this.day, this.isSelect, this.workType});
|
||||
|
||||
@ -11,7 +11,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class CheckingInListPage extends StatefulWidget {
|
||||
const CheckingInListPage({Key key}) : super(key: key);
|
||||
const CheckingInListPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<CheckingInListPage> createState() => _CheckingInListPageState();
|
||||
@ -53,7 +53,7 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
|
||||
SizedBox(height: 30.h,),
|
||||
Image.asset('images/main/icon_checkInRankingListTop.png', width: 145.w, height: 145.w),
|
||||
SizedBox(height: 10.h,),
|
||||
Text(TranslationLoader.lanKeys.noAttendanceRecord.tr, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500)),
|
||||
Text(TranslationLoader.lanKeys!.noAttendanceRecord!.tr, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500)),
|
||||
SizedBox(height: 30.h,),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
@ -69,7 +69,7 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Text(TranslationLoader.lanKeys.dailyCharts.tr, style: TextStyle(color: AppColors.mainColor)),
|
||||
Text(TranslationLoader.lanKeys!.dailyCharts!.tr, style: TextStyle(color: AppColors.mainColor)),
|
||||
Container(width: 20.w, height: 2.h, color: AppColors.mainColor)
|
||||
],
|
||||
),
|
||||
@ -82,7 +82,7 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Text(TranslationLoader.lanKeys.monthlyLeaderboard.tr, style: TextStyle(color: Colors.black)),
|
||||
Text(TranslationLoader.lanKeys!.monthlyLeaderboard!.tr, style: const TextStyle(color: Colors.black)),
|
||||
Container(width: 20.w, height: 2.h, color: Colors.black)
|
||||
],
|
||||
),
|
||||
@ -132,8 +132,8 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
SizedBox(height: 5.h,),
|
||||
Text("0", style: TextStyle(color: Colors.black)),
|
||||
Text(TranslationLoader.lanKeys.beLate.tr, style: TextStyle(color: Colors.black)),
|
||||
const Text("0", style: TextStyle(color: Colors.black)),
|
||||
Text(TranslationLoader.lanKeys!.beLate!.tr, style: const TextStyle(color: Colors.black)),
|
||||
SizedBox(height: 5.h,),
|
||||
],
|
||||
),
|
||||
@ -147,7 +147,7 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
|
||||
children: [
|
||||
SizedBox(height: 5.h,),
|
||||
Text("0", style: TextStyle(color: Colors.black)),
|
||||
Text(TranslationLoader.lanKeys.leaveEarly.tr, style: TextStyle(color: Colors.black)),
|
||||
Text(TranslationLoader.lanKeys!.leaveEarly!.tr, style: const TextStyle(color: Colors.black)),
|
||||
SizedBox(height: 5.h,),
|
||||
],
|
||||
),
|
||||
@ -161,7 +161,7 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
|
||||
children: [
|
||||
SizedBox(height: 5.h,),
|
||||
Text("0", style: TextStyle(color: Colors.black)),
|
||||
Text(TranslationLoader.lanKeys.noCardPunched.tr, style: TextStyle(color: Colors.black)),
|
||||
Text(TranslationLoader.lanKeys!.noCardPunched!.tr, style: const TextStyle(color: Colors.black)),
|
||||
SizedBox(height: 5.h,),
|
||||
],
|
||||
),
|
||||
@ -186,7 +186,7 @@ class _CheckingInListPageState extends State<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(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
@ -232,7 +232,7 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(TranslationLoader.lanKeys.earlyArrivalList.tr, style: const TextStyle(color: Colors.white),),
|
||||
Text(TranslationLoader.lanKeys!.earlyArrivalList!.tr, style: const TextStyle(color: Colors.white),),
|
||||
SizedBox(width: 5.w,),
|
||||
Image.asset('images/main/icon_lockDetail_checkIn_topTitle.png', width: 30.w, height: 16.w,)
|
||||
],
|
||||
@ -240,16 +240,16 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget showListType(){
|
||||
var list = [TranslationLoader.lanKeys.earlyArrivalList.tr, TranslationLoader.lanKeys.lateList.tr, TranslationLoader.lanKeys.hardWorkingList.tr];
|
||||
void showListType(){
|
||||
var list = [TranslationLoader.lanKeys!.earlyArrivalList!.tr, TranslationLoader.lanKeys!.lateList!.tr, TranslationLoader.lanKeys!.hardWorkingList!.tr];
|
||||
ShowBottomSheetTool().showSingleRowPicker(
|
||||
//上下文
|
||||
context,
|
||||
//默认的索引
|
||||
normalIndex: 0,
|
||||
title: TranslationLoader.lanKeys.rankingList.tr,
|
||||
cancelTitle: TranslationLoader.lanKeys.cancel.tr,
|
||||
sureTitle: TranslationLoader.lanKeys.sure.tr,
|
||||
title: TranslationLoader.lanKeys!.rankingList!.tr,
|
||||
cancelTitle: TranslationLoader.lanKeys!.cancel!.tr,
|
||||
sureTitle: TranslationLoader.lanKeys!.sure!.tr,
|
||||
//要显示的列表
|
||||
//可自定义数据适配器
|
||||
//adapter: PickerAdapter(),
|
||||
|
||||
@ -12,39 +12,39 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class CheckingInSetPage extends StatefulWidget {
|
||||
const CheckingInSetPage({Key key}) : super(key: key);
|
||||
const CheckingInSetPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<CheckingInSetPage> createState() => _CheckingInSetPageState();
|
||||
}
|
||||
|
||||
class _CheckingInSetPageState extends State<CheckingInSetPage> {
|
||||
TextEditingController _changeNameController;
|
||||
late TextEditingController _changeNameController;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.checkingIn.tr} ${TranslationLoader.lanKeys.set.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.checkingIn!.tr} ${TranslationLoader.lanKeys!.set!.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:"${TranslationLoader.lanKeys.company.tr} ${TranslationLoader.lanKeys.name.tr}", rightTitle:"深圳市志超科技", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:"${TranslationLoader.lanKeys!.company!.tr} ${TranslationLoader.lanKeys!.name!.tr}", rightTitle:"深圳市志超科技", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
showCupertinoAlertDialog(context);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.staff.tr, rightTitle:"0", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.staff!.tr, rightTitle:"0", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.checkingInStaffManagePage);
|
||||
}),
|
||||
CommonItem(leftTitel:"${TranslationLoader.lanKeys.work.tr} ${TranslationLoader.lanKeys.time.tr}", rightTitle:"9:00 - 18:00", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:"${TranslationLoader.lanKeys!.work!.tr} ${TranslationLoader.lanKeys!.time!.tr}", rightTitle:"9:00 - 18:00", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.checkingInSetWorkTimePage);
|
||||
}),
|
||||
CommonItem(leftTitel:"${TranslationLoader.lanKeys.workday.tr} ${TranslationLoader.lanKeys.set.tr}", rightTitle:"1,2,3,4,5", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:"${TranslationLoader.lanKeys!.workday!.tr} ${TranslationLoader.lanKeys!.set!.tr}", rightTitle:"1,2,3,4,5", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.checkingInSetWorkdaySet);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.holidays.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.holidays!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.checkingInSetHolidaysPage);
|
||||
}),
|
||||
SizedBox(height: 30.h,),
|
||||
SubmitBtn(btnName: "${TranslationLoader.lanKeys.delete.tr} ${TranslationLoader.lanKeys.company.tr}",
|
||||
SubmitBtn(btnName: "${TranslationLoader.lanKeys!.delete!.tr} ${TranslationLoader.lanKeys!.company!.tr}",
|
||||
borderRadius: 20.w,
|
||||
fontSize: 32.sp,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w),
|
||||
@ -62,7 +62,7 @@ class _CheckingInSetPageState extends State<CheckingInSetPage> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return ShowTFView(title:"${TranslationLoader.lanKeys.amend.tr} ${TranslationLoader.lanKeys.name.tr}", tipTitle:"", controller: _changeNameController);
|
||||
return ShowTFView(title:"${TranslationLoader.lanKeys!.amend!.tr} ${TranslationLoader.lanKeys!.name!.tr}", tipTitle:"", controller: _changeNameController);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class CheckingInAddStaffPage extends StatefulWidget {
|
||||
const CheckingInAddStaffPage({Key key}) : super(key: key);
|
||||
const CheckingInAddStaffPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<CheckingInAddStaffPage> createState() => _CheckingInAddStaffPageState();
|
||||
@ -22,15 +22,15 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle:"${TranslationLoader.lanKeys.add.tr} ${TranslationLoader.lanKeys.staff.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle:"${TranslationLoader.lanKeys!.add!.tr} ${TranslationLoader.lanKeys!.staff!.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.name.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(TranslationLoader.lanKeys.pleaseEnter.tr)),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.punchingMode.tr, rightTitle:"APP", isHaveLine: false, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.name!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(TranslationLoader.lanKeys!.pleaseEnter!.tr)),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.punchingMode!.tr, rightTitle:"APP", isHaveLine: false, isHaveDirection: true, action: (){
|
||||
_showSeletClockInType();
|
||||
}),
|
||||
SizedBox(height: 10.h,),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.whetherTheEmployeeHasAKey.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: Row(
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.whetherTheEmployeeHasAKey!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: Row(
|
||||
children: [
|
||||
whetherTheEmployeeHasAKeyWidget("有", (){
|
||||
|
||||
@ -43,16 +43,16 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
|
||||
)),
|
||||
Visibility(
|
||||
visible:true,
|
||||
child: CommonItem(leftTitel:TranslationLoader.lanKeys.accountNumber.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(TranslationLoader.lanKeys.pleaseEnter.tr)),
|
||||
child: CommonItem(leftTitel:TranslationLoader.lanKeys!.accountNumber!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(TranslationLoader.lanKeys!.pleaseEnter!.tr)),
|
||||
),
|
||||
Visibility(
|
||||
visible:true,
|
||||
child: CommonItem(leftTitel:TranslationLoader.lanKeys.selectKey.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
|
||||
child: CommonItem(leftTitel:TranslationLoader.lanKeys!.selectKey!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
|
||||
_showSeletClockInType();
|
||||
}),
|
||||
),
|
||||
SizedBox(height: 50.w,),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys.sure.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: (){
|
||||
|
||||
}
|
||||
@ -91,16 +91,16 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _showSeletClockInType(){
|
||||
void _showSeletClockInType(){
|
||||
var list = ["15080825640",];
|
||||
ShowBottomSheetTool().showSingleRowPicker(
|
||||
ShowBottomSheetTool().showSingleRowPicker(
|
||||
//上下文
|
||||
context,
|
||||
//默认的索引
|
||||
normalIndex: 0,
|
||||
title: "选择钥匙",
|
||||
cancelTitle: TranslationLoader.lanKeys.cancel.tr,
|
||||
sureTitle: TranslationLoader.lanKeys.sure.tr,
|
||||
cancelTitle: TranslationLoader.lanKeys!.cancel!.tr,
|
||||
sureTitle: TranslationLoader.lanKeys!.sure!.tr,
|
||||
//要显示的列表
|
||||
//可自定义数据适配器
|
||||
//adapter: PickerAdapter(),
|
||||
|
||||
@ -16,7 +16,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class CheckingInSetHolidaysPage extends StatefulWidget {
|
||||
const CheckingInSetHolidaysPage({Key key}) : super(key: key);
|
||||
const CheckingInSetHolidaysPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<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(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
@ -64,7 +64,7 @@ class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
|
||||
color: const Color(0xFFAFB5D7),
|
||||
width: 100.w,
|
||||
height: 140.h,
|
||||
child: Center(child: Text("7\n${TranslationLoader.lanKeys.month.tr}", textAlign: TextAlign.center, style: TextStyle(fontSize: 32.sp, color: Colors.white),))
|
||||
child: Center(child: Text("7\n${TranslationLoader.lanKeys!.month!.tr}", textAlign: TextAlign.center, style: TextStyle(fontSize: 32.sp, color: Colors.white),))
|
||||
),
|
||||
SizedBox(width: 30.w,),
|
||||
Expanded(
|
||||
@ -85,7 +85,7 @@ class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Text("${TranslationLoader.lanKeys.libertyDay.tr}:2023.6.21 11.15-2023.6.21 11.15", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ),
|
||||
Text("${TranslationLoader.lanKeys!.libertyDay!.tr}:2023.6.21 11.15-2023.6.21 11.15", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -94,7 +94,7 @@ class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Text("${TranslationLoader.lanKeys.coverDate.tr}:2023.6.21 11.15", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ),
|
||||
Text("${TranslationLoader.lanKeys!.coverDate!.tr}:2023.6.21 11.15", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -116,7 +116,7 @@ class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text("${DateTime.now().year}${TranslationLoader.lanKeys.year.tr}", style: const TextStyle(color: Colors.white),),
|
||||
Text("${DateTime.now().year}${TranslationLoader.lanKeys!.year!.tr}", style: const TextStyle(color: Colors.white),),
|
||||
SizedBox(width: 5.w,),
|
||||
Image.asset('images/main/icon_lockDetail_checkIn_topTitle.png', width: 30.w, height: 16.w,)
|
||||
],
|
||||
@ -124,7 +124,7 @@ class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget showListType(){
|
||||
void showListType(){
|
||||
Pickers.showDatePicker(
|
||||
context,
|
||||
// 模式,详见下方
|
||||
@ -140,7 +140,7 @@ class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
padding: const EdgeInsets.only(left: 22, right: 12),
|
||||
child: Text(TranslationLoader.lanKeys.cancel.tr, style: const TextStyle(color: Colors.black, fontSize: 16.0)),
|
||||
child: Text(TranslationLoader.lanKeys!.cancel!.tr, style: const TextStyle(color: Colors.black, fontSize: 16.0)),
|
||||
),
|
||||
),
|
||||
commitButton: GestureDetector(
|
||||
@ -150,7 +150,7 @@ class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
padding: const EdgeInsets.only(left: 22, right: 12),
|
||||
child: Text(TranslationLoader.lanKeys.sure.tr,
|
||||
child: Text(TranslationLoader.lanKeys!.sure!.tr,
|
||||
style: const TextStyle(color: Colors.black, fontSize: 16.0)),
|
||||
),
|
||||
),
|
||||
|
||||
@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class CheckingInStaffManagePage extends StatefulWidget {
|
||||
const CheckingInStaffManagePage({Key key}) : super(key: key);
|
||||
const CheckingInStaffManagePage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<CheckingInStaffManagePage> createState() => _CheckingInStaffManagePageState();
|
||||
@ -20,7 +20,7 @@ class _CheckingInStaffManagePageState extends State<CheckingInStaffManagePage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.staff.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.staff!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
GestureDetector(
|
||||
onTap: (){
|
||||
Navigator.pushNamed(context, Routers.checkingInAddStaffPage);
|
||||
@ -44,7 +44,7 @@ class _CheckingInStaffManagePageState extends State<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(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
|
||||
@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class CheckingInSetWorkTimePage extends StatefulWidget {
|
||||
const CheckingInSetWorkTimePage({Key key}) : super(key: key);
|
||||
const CheckingInSetWorkTimePage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<CheckingInSetWorkTimePage> createState() => _CheckingInSetWorkTimePageState();
|
||||
@ -21,7 +21,7 @@ class _CheckingInSetWorkTimePageState extends State<CheckingInSetWorkTimePage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.work.tr} ${TranslationLoader.lanKeys.time.tr} ${TranslationLoader.lanKeys.set.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.work!.tr} ${TranslationLoader.lanKeys!.time!.tr} ${TranslationLoader.lanKeys!.set!.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body: buildMainUI(),
|
||||
);
|
||||
}
|
||||
@ -29,18 +29,18 @@ class _CheckingInSetWorkTimePageState extends State<CheckingInSetWorkTimePage> {
|
||||
Widget buildMainUI(){
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.officeHours.tr, rightTitle:"11:49", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.officeHours!.tr, rightTitle:"11:49", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
// ShowSeletDateTime().showDatePicker(context, '2100-01-01 00:00', '1900-01-01 00:00', getNowDate(),'yyyy-MMMM-dd HH:mm', (dateTime, List<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) {
|
||||
//
|
||||
// });
|
||||
}),
|
||||
SizedBox(height: 30.h,),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys.sure.tr,
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
borderRadius: 20.w,
|
||||
fontSize: 32.sp,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w),
|
||||
|
||||
@ -10,7 +10,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class CheckingInSetWorkdaySet extends StatefulWidget {
|
||||
const CheckingInSetWorkdaySet({Key key}) : super(key: key);
|
||||
const CheckingInSetWorkdaySet({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<CheckingInSetWorkdaySet> createState() => _CheckingInSetWorkdaySetState();
|
||||
@ -21,7 +21,7 @@ class _CheckingInSetWorkdaySetState extends State<CheckingInSetWorkdaySet> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.workday.tr} ${TranslationLoader.lanKeys.set.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.workday!.tr} ${TranslationLoader.lanKeys!.set!.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body: ListView(
|
||||
children: [
|
||||
topBtnWidget(),
|
||||
@ -34,7 +34,7 @@ class _CheckingInSetWorkdaySetState extends State<CheckingInSetWorkdaySet> {
|
||||
child: bottomOddOrEvenDaysOffSeletBtn()
|
||||
),
|
||||
SizedBox(height: 50.h,),
|
||||
SubmitBtn(btnName:TranslationLoader.lanKeys.sure.tr,
|
||||
SubmitBtn(btnName:TranslationLoader.lanKeys!.sure!.tr,
|
||||
borderRadius: 20.w,
|
||||
fontSize: 32.sp,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w),
|
||||
@ -63,7 +63,7 @@ class _CheckingInSetWorkdaySetState extends State<CheckingInSetWorkdaySet> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Center(child: Text(TranslationLoader.lanKeys.custom.tr, style: TextStyle(fontSize: 32.sp, color: Colors.white))),
|
||||
Center(child: Text(TranslationLoader.lanKeys!.custom!.tr, style: TextStyle(fontSize: 32.sp, color: Colors.white))),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -76,7 +76,7 @@ class _CheckingInSetWorkdaySetState extends State<CheckingInSetWorkdaySet> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(child: Center(child: Text(TranslationLoader.lanKeys.oddOrEvenDaysOff.tr, style: TextStyle(fontSize: 32.sp, color: Colors.white), textAlign: TextAlign.center,))),
|
||||
Expanded(child: Center(child: Text(TranslationLoader.lanKeys!.oddOrEvenDaysOff!.tr, style: TextStyle(fontSize: 32.sp, color: Colors.white), textAlign: TextAlign.center,))),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -90,15 +90,15 @@ class _CheckingInSetWorkdaySetState extends State<CheckingInSetWorkdaySet> {
|
||||
padding: EdgeInsets.only(left:10.w, right: 10.w),
|
||||
child: Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.thisWeek.tr, rightTitle:"", allHeight:70.h, isHaveLine: true),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.singleDayWeekend.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.thisWeek!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.singleDayWeekend!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
||||
rightWidget: GestureDetector(
|
||||
onTap: (){
|
||||
|
||||
},
|
||||
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
|
||||
),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.twoDaysOff.tr, rightTitle:"", allHeight:70.h, isHaveLine: false, isHaveRightWidget: true,
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.twoDaysOff!.tr, rightTitle:"", allHeight:70.h, isHaveLine: false, isHaveRightWidget: true,
|
||||
rightWidget: GestureDetector(
|
||||
onTap: (){
|
||||
|
||||
@ -116,49 +116,49 @@ class _CheckingInSetWorkdaySetState extends State<CheckingInSetWorkdaySet> {
|
||||
padding: EdgeInsets.only(left:10.w, right: 10.w),
|
||||
child: Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.monday.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.monday!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
||||
rightWidget: GestureDetector(
|
||||
onTap: (){
|
||||
|
||||
},
|
||||
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
|
||||
),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.tuesday.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.tuesday!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
||||
rightWidget: GestureDetector(
|
||||
onTap: (){
|
||||
|
||||
},
|
||||
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
|
||||
),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.wednesday.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.wednesday!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
||||
rightWidget: GestureDetector(
|
||||
onTap: (){
|
||||
|
||||
},
|
||||
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
|
||||
),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.thursday.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.thursday!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
||||
rightWidget: GestureDetector(
|
||||
onTap: (){
|
||||
|
||||
},
|
||||
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
|
||||
),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.friday.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.friday!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
||||
rightWidget: GestureDetector(
|
||||
onTap: (){
|
||||
|
||||
},
|
||||
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
|
||||
),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.saturday.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.saturday!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
||||
rightWidget: GestureDetector(
|
||||
onTap: (){
|
||||
|
||||
},
|
||||
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
|
||||
),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.sunday.tr, rightTitle:"", allHeight:70.h, isHaveLine: false, isHaveRightWidget: true,
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.sunday!.tr, rightTitle:"", allHeight:70.h, isHaveLine: false, isHaveRightWidget: true,
|
||||
rightWidget: GestureDetector(
|
||||
onTap: (){
|
||||
|
||||
|
||||
@ -12,50 +12,50 @@ import '../../../../../tools/titleAppBar.dart';
|
||||
import '../../../../../translations/trans_lib.dart';
|
||||
|
||||
class ElectronicKeyDetailPage extends StatefulWidget {
|
||||
const ElectronicKeyDetailPage({Key key}) : super(key: key);
|
||||
const ElectronicKeyDetailPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<ElectronicKeyDetailPage> createState() => _ElectronicKeyDetailPageState();
|
||||
}
|
||||
|
||||
class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
||||
TextEditingController _changeNameController;
|
||||
late TextEditingController _changeNameController;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.keyDetail.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.keyDetail!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.name.tr, rightTitle:"魏", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.name!.tr, rightTitle:"魏", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
showCupertinoAlertDialog(context);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, allHeight: 90.h,rightTitle:"2020.06.20 11:49\n2020.06.21 11:49", isHaveDirection: true, action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, allHeight: 90.h,rightTitle:"2020.06.20 11:49\n2020.06.21 11:49", isHaveDirection: true, action:(){
|
||||
Navigator.pushNamed(context, Routers.electronicKeyDetailChangeDate);
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.receiver.tr, rightTitle:"786612630@qq.com",action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.receiver!.tr, rightTitle:"786612630@qq.com",action:(){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.sender.tr, rightTitle:"15080825640", action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.sender!.tr, rightTitle:"15080825640", action:(){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.senderTime.tr, rightTitle:"2020.06.21 11:49", action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.senderTime!.tr, rightTitle:"2020.06.21 11:49", action:(){
|
||||
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.realNameAuthentication.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w,child: _switch()), action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.realNameAuthentication!.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w,child: _switch()), action:(){
|
||||
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.operatingRecord.tr, rightTitle:"", isHaveDirection: true, action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.operatingRecord!.tr, rightTitle:"", isHaveDirection: true, action:(){
|
||||
|
||||
}),
|
||||
Container(height: 40.h),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys.delete,
|
||||
btnName: TranslationLoader.lanKeys!.delete!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
@ -68,7 +68,7 @@ class _ElectronicKeyDetailPageState extends State<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(
|
||||
onTap: action,
|
||||
child: Column(
|
||||
@ -87,7 +87,7 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
isHaveRightWidget?rightWidget:Text(rightTitle, textAlign: TextAlign.end,style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),)
|
||||
isHaveRightWidget?rightWidget!:Text(rightTitle, textAlign: TextAlign.end,style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),)
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -119,7 +119,7 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return ShowTFView(title:"${TranslationLoader.lanKeys.amend.tr} ${TranslationLoader.lanKeys.name.tr}", tipTitle:"", controller: _changeNameController);
|
||||
return ShowTFView(title:"${TranslationLoader.lanKeys!.amend!.tr} ${TranslationLoader.lanKeys!.name!.tr}", tipTitle:"", controller: _changeNameController);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ import '../../../../../tools/titleAppBar.dart';
|
||||
import '../../../../../translations/trans_lib.dart';
|
||||
|
||||
class ElectronicKeyDetailChangeDate extends StatefulWidget {
|
||||
const ElectronicKeyDetailChangeDate({Key key}) : super(key: key);
|
||||
const ElectronicKeyDetailChangeDate({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<ElectronicKeyDetailChangeDate> createState() => _ElectronicKeyDetailChangeDateState();
|
||||
@ -22,8 +22,8 @@ class _ElectronicKeyDetailChangeDateState extends State<ElectronicKeyDetailChang
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
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: (){
|
||||
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: (){
|
||||
|
||||
},),
|
||||
],),
|
||||
@ -34,12 +34,12 @@ class _ElectronicKeyDetailChangeDateState extends State<ElectronicKeyDetailChang
|
||||
Widget buildMainUI(){
|
||||
return Column(
|
||||
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) {
|
||||
|
||||
});
|
||||
}),
|
||||
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) {
|
||||
|
||||
});
|
||||
|
||||
@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class ElectronicKeyListPage extends StatefulWidget {
|
||||
const ElectronicKeyListPage({Key key}) : super(key: key);
|
||||
const ElectronicKeyListPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<ElectronicKeyListPage> createState() => _ElectronicKeyListPageState();
|
||||
@ -20,9 +20,9 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.electronicKey.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.electronicKey!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
TextButton(
|
||||
child: Text(TranslationLoader.lanKeys.reset.tr, style: const TextStyle(color: Colors.white),),
|
||||
child: Text(TranslationLoader.lanKeys!.reset!.tr, style: const TextStyle(color: Colors.white),),
|
||||
onPressed: (){
|
||||
|
||||
},),
|
||||
@ -32,7 +32,7 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
||||
_searchWidget(),
|
||||
Expanded(child: _buildMainUI()),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys.sendKey.tr,
|
||||
btnName: TranslationLoader.lanKeys!.sendKey!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
@ -61,7 +61,7 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(
|
||||
top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
|
||||
hintText: TranslationLoader.lanKeys.pleaseEnter.tr,
|
||||
hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
//左边图标设置
|
||||
@ -85,7 +85,7 @@ class _ElectronicKeyListPageState extends State<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(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
|
||||
@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class ElectronicKeyPeriodValidityPage extends StatefulWidget {
|
||||
const ElectronicKeyPeriodValidityPage({Key key}) : super(key: key);
|
||||
const ElectronicKeyPeriodValidityPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<ElectronicKeyPeriodValidityPage> createState() => _ElectronicKeyPeriodValidityPageState();
|
||||
@ -20,7 +20,7 @@ class _ElectronicKeyPeriodValidityPageState extends State<ElectronicKeyPeriodVal
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
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(
|
||||
children: [
|
||||
topWidget(),
|
||||
@ -43,7 +43,7 @@ class _ElectronicKeyPeriodValidityPageState extends State<ElectronicKeyPeriodVal
|
||||
height: 60.h,
|
||||
// color: Colors.red,
|
||||
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(
|
||||
height: 90.h,
|
||||
@ -67,27 +67,28 @@ class _ElectronicKeyPeriodValidityPageState extends State<ElectronicKeyPeriodVal
|
||||
String dateStr;
|
||||
switch (index) {
|
||||
case 0:
|
||||
dateStr = TranslationLoader.lanKeys.sundayShort.tr;
|
||||
dateStr = TranslationLoader.lanKeys!.sundayShort!.tr;
|
||||
break;
|
||||
case 1:
|
||||
dateStr = TranslationLoader.lanKeys.mondayShort.tr;
|
||||
dateStr = TranslationLoader.lanKeys!.mondayShort!.tr;
|
||||
break;
|
||||
case 2:
|
||||
dateStr = TranslationLoader.lanKeys.tuesdayShort.tr;
|
||||
dateStr = TranslationLoader.lanKeys!.tuesdayShort!.tr;
|
||||
break;
|
||||
case 3:
|
||||
dateStr = TranslationLoader.lanKeys.wednesdayShort.tr;
|
||||
dateStr = TranslationLoader.lanKeys!.wednesdayShort!.tr;
|
||||
break;
|
||||
case 4:
|
||||
dateStr = TranslationLoader.lanKeys.thursdayShort.tr;
|
||||
dateStr = TranslationLoader.lanKeys!.thursdayShort!.tr;
|
||||
break;
|
||||
case 5:
|
||||
dateStr = TranslationLoader.lanKeys.fridayShort.tr;
|
||||
dateStr = TranslationLoader.lanKeys!.fridayShort!.tr;
|
||||
break;
|
||||
case 6:
|
||||
dateStr = TranslationLoader.lanKeys.saturdayShort.tr;
|
||||
dateStr = TranslationLoader.lanKeys!.saturdayShort!.tr;
|
||||
break;
|
||||
default:
|
||||
dateStr = "";
|
||||
break;
|
||||
}
|
||||
return GestureDetector(
|
||||
@ -111,22 +112,22 @@ class _ElectronicKeyPeriodValidityPageState extends State<ElectronicKeyPeriodVal
|
||||
Widget bottomWidget(){
|
||||
return Column(
|
||||
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),
|
||||
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),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys.sure.tr,
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
|
||||
@ -13,7 +13,7 @@ import '../../../../translations/trans_lib.dart';
|
||||
class MassSendElectronicKeyPage extends StatefulWidget {
|
||||
final String type;
|
||||
|
||||
const MassSendElectronicKeyPage({Key key, @required this.type}) : super(key: key);
|
||||
const MassSendElectronicKeyPage({Key? key, required this.type}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<MassSendElectronicKeyPage> createState() => _MassSendElectronicKeyPageState();
|
||||
@ -21,7 +21,7 @@ class MassSendElectronicKeyPage extends StatefulWidget {
|
||||
|
||||
class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
|
||||
final FlutterContactPicker _contactPicker = FlutterContactPicker();
|
||||
Contact _contact;
|
||||
late Contact _contact;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -76,6 +76,7 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return Container();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -85,10 +86,10 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
|
||||
return Column(
|
||||
children: [
|
||||
Container(height: 10.h),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.receiver.tr, rightTitle:TranslationLoader.lanKeys.pleaseAdd.tr, isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.receiver!.tr, rightTitle:TranslationLoader.lanKeys!.pleaseAdd!.tr, isHaveLine: true, isHaveDirection: true, action: (){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.lock.tr, rightTitle:TranslationLoader.lanKeys.pleaseSelet.tr, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.lock!.tr, rightTitle:TranslationLoader.lanKeys!.pleaseSelet!.tr, isHaveDirection: true, action: (){
|
||||
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
@ -100,8 +101,8 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
|
||||
Widget keyTimeWidget(){
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.failureTime.tr, rightTitle:"2020.06.20 11:49", ),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"2020.06.20 11:49", ),
|
||||
Container(height: 10.h),
|
||||
],
|
||||
);
|
||||
@ -111,7 +112,7 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
|
||||
Widget remoteUnlockingWidget(){
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.remoteUnlockingAllowed.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch()), action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.remoteUnlockingAllowed!.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch()), action:(){
|
||||
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
@ -123,7 +124,7 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
|
||||
Widget periodValidityWidget(){
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.periodValidity.tr, rightTitle:"", isHaveDirection: true, action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.periodValidity!.tr, rightTitle:"", isHaveDirection: true, action:(){
|
||||
Navigator.pushNamed(context, Routers.electronicKeyPeriodValidityPage);
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
@ -135,7 +136,7 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
|
||||
return Column(
|
||||
children: [
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys.send.tr,
|
||||
btnName: TranslationLoader.lanKeys!.send!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
|
||||
@ -7,7 +7,7 @@ import '../../../../../translations/trans_lib.dart';
|
||||
import 'massSendElectronicKeyManage_tabbar.dart';
|
||||
|
||||
class MassSendElectronicKeyManagePage extends StatefulWidget {
|
||||
const MassSendElectronicKeyManagePage({Key key}) : super(key: key);
|
||||
const MassSendElectronicKeyManagePage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<MassSendElectronicKeyManagePage> createState() => _MassSendElectronicKeyManagePageState();
|
||||
@ -20,7 +20,7 @@ class _MassSendElectronicKeyManagePageState extends State<MassSendElectronicKeyM
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
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(
|
||||
children: [
|
||||
MassSendElectronicKeyManageTabbar(initialIndex: index,),
|
||||
|
||||
@ -10,19 +10,19 @@ import '../massSendElectronicKey_page.dart';
|
||||
class MassSendElectronicKeyManageTabbar extends StatefulWidget {
|
||||
var initialIndex=1;
|
||||
|
||||
MassSendElectronicKeyManageTabbar({Key key, @required this.initialIndex}) : super(key: key);
|
||||
MassSendElectronicKeyManageTabbar({Key? key, required this.initialIndex}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<MassSendElectronicKeyManageTabbar> createState() => _MassSendElectronicKeyManageTabbarState();
|
||||
}
|
||||
|
||||
class _MassSendElectronicKeyManageTabbarState extends State<MassSendElectronicKeyManageTabbar> with SingleTickerProviderStateMixin {
|
||||
TabController _tabController;
|
||||
late TabController _tabController;
|
||||
|
||||
final List<ItemView> _itemTabs = <ItemView>[
|
||||
ItemView(title: TranslationLoader.lanKeys.timeLimit.tr, type: "0"),
|
||||
ItemView(title: TranslationLoader.lanKeys.permanent.tr, type: "1"),
|
||||
ItemView(title: TranslationLoader.lanKeys.circulation.tr, type: "2"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: "0"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: "1"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, type: "2"),
|
||||
];
|
||||
|
||||
@override
|
||||
@ -82,7 +82,7 @@ class _MassSendElectronicKeyManageTabbarState extends State<MassSendElectronicKe
|
||||
}
|
||||
|
||||
class ItemView {
|
||||
const ItemView({@required this.title, @required this.type});
|
||||
const ItemView({required this.title, required this.type});
|
||||
|
||||
final String title;
|
||||
final String type;
|
||||
|
||||
@ -13,7 +13,7 @@ import '../../../../../translations/trans_lib.dart';
|
||||
class SendElectronicKeyPage extends StatefulWidget {
|
||||
final String type;
|
||||
|
||||
SendElectronicKeyPage({Key key, @required this.type}) : super(key: key);
|
||||
SendElectronicKeyPage({Key? key, required this.type}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<SendElectronicKeyPage> createState() => _SendElectronicKeyPageState();
|
||||
@ -21,7 +21,7 @@ class SendElectronicKeyPage extends StatefulWidget {
|
||||
|
||||
class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
|
||||
final FlutterContactPicker _contactPicker = FlutterContactPicker();
|
||||
Contact _contact;
|
||||
late Contact _contact;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -62,7 +62,6 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
|
||||
],
|
||||
);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
// 单次
|
||||
@ -74,7 +73,6 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
|
||||
],
|
||||
);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
{
|
||||
// 循环
|
||||
@ -87,9 +85,8 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
|
||||
],
|
||||
);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
return Container();
|
||||
}
|
||||
}
|
||||
|
||||
@ -98,8 +95,8 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
|
||||
return Column(
|
||||
children: [
|
||||
Container(height: 10.h),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.receiver.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(true, TranslationLoader.lanKeys.pleaseEnterNumberOrEmail.tr)),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.name.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: getTFWidget(false, TranslationLoader.lanKeys.enterYourName.tr)),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.receiver!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(true, TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr)),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.name!.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: getTFWidget(false, TranslationLoader.lanKeys!.enterYourName!.tr)),
|
||||
Container(height: 10.h),
|
||||
],
|
||||
);
|
||||
@ -109,10 +106,10 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
|
||||
Widget keyTimeWidget(){
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true, isHaveDirection: true, action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true, isHaveDirection: true, action:(){
|
||||
// _showDatePicker();
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.failureTime.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, action:(){
|
||||
// _showDatePicker();
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
@ -124,7 +121,7 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
|
||||
Widget keyRealNameWidget(){
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.realNameAuthentication.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch()), action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.realNameAuthentication!.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch()), action:(){
|
||||
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
@ -136,7 +133,7 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
|
||||
Widget keyPeriodValidityWidget(){
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.periodValidity.tr, rightTitle:"", isHaveDirection: true, action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.periodValidity!.tr, rightTitle:"", isHaveDirection: true, action:(){
|
||||
Navigator.pushNamed(context, Routers.electronicKeyPeriodValidityPage);
|
||||
}),
|
||||
],
|
||||
@ -151,11 +148,11 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
|
||||
child: Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text(TranslationLoader.lanKeys.sendKeyBottomTip.tr, textAlign: TextAlign.start,)),
|
||||
Expanded(child: Text(TranslationLoader.lanKeys!.sendKeyBottomTip!.tr, textAlign: TextAlign.start,)),
|
||||
],
|
||||
),
|
||||
),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys.send.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.send!.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: (){
|
||||
|
||||
}
|
||||
@ -168,7 +165,7 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
|
||||
children: [
|
||||
TextButton(onPressed: (){
|
||||
Navigator.pushNamed(context, Routers.massSendElectronicKeyManagePage);
|
||||
}, child: Text(TranslationLoader.lanKeys.sendGroupKey.tr, style: TextStyle(color: AppColors.mainColor, fontWeight: FontWeight.w500),)),
|
||||
}, child: Text(TranslationLoader.lanKeys!.sendGroupKey!.tr, style: TextStyle(color: AppColors.mainColor, fontWeight: FontWeight.w500),)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -252,9 +249,9 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
|
||||
alignment: Alignment.center,
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
Contact contact = await _contactPicker.selectContact();
|
||||
Contact? contact = await _contactPicker.selectContact();
|
||||
setState(() {
|
||||
_contact = contact;
|
||||
_contact = contact!;
|
||||
// print("object111111111111 ${_contact.fullName} ${_contact.phoneNumbers}");
|
||||
});
|
||||
},
|
||||
|
||||
@ -7,7 +7,7 @@ import '../../../../../translations/trans_lib.dart';
|
||||
import 'sendElectronicKeyManage_tabbar.dart';
|
||||
|
||||
class SendElectronicKeyManagePage extends StatefulWidget {
|
||||
const SendElectronicKeyManagePage({Key key}) : super(key: key);
|
||||
const SendElectronicKeyManagePage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<SendElectronicKeyManagePage> createState() => _SendElectronicKeyManagePageState();
|
||||
@ -20,7 +20,7 @@ class _SendElectronicKeyManagePageState extends State<SendElectronicKeyManagePag
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
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(
|
||||
children: [
|
||||
SendElectronicKeyManageTabbar(initialIndex: index,),
|
||||
|
||||
@ -10,20 +10,20 @@ import '../sendElectronicKey/sendElectronicKey_page.dart';
|
||||
class SendElectronicKeyManageTabbar extends StatefulWidget {
|
||||
var initialIndex=1;
|
||||
|
||||
SendElectronicKeyManageTabbar({Key key, @required this.initialIndex}) : super(key: key);
|
||||
SendElectronicKeyManageTabbar({Key? key, required this.initialIndex}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<SendElectronicKeyManageTabbar> createState() => _SendElectronicKeyManageTabbarState();
|
||||
}
|
||||
|
||||
class _SendElectronicKeyManageTabbarState extends State<SendElectronicKeyManageTabbar> with SingleTickerProviderStateMixin {
|
||||
TabController _tabController;
|
||||
late TabController _tabController;
|
||||
|
||||
final List<ItemView> _itemTabs = <ItemView>[
|
||||
ItemView(title: TranslationLoader.lanKeys.timeLimit.tr, type: "0"),
|
||||
ItemView(title: TranslationLoader.lanKeys.permanent.tr, type: "1"),
|
||||
ItemView(title: TranslationLoader.lanKeys.once.tr, type: "2"),
|
||||
ItemView(title: TranslationLoader.lanKeys.circulation.tr, type: "3"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: "0"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: "1"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.once!.tr, type: "2"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, type: "3"),
|
||||
];
|
||||
|
||||
@override
|
||||
@ -83,7 +83,7 @@ class _SendElectronicKeyManageTabbarState extends State<SendElectronicKeyManageT
|
||||
}
|
||||
|
||||
class ItemView {
|
||||
const ItemView({@required this.title, @required this.type});
|
||||
const ItemView({required this.title, required this.type});
|
||||
|
||||
final String title;
|
||||
final String type;
|
||||
|
||||
@ -7,7 +7,7 @@ import '../../../../tools/submitBtn.dart';
|
||||
import '../../../../tools/titleAppBar.dart';
|
||||
|
||||
class SendEmailNotificationPage extends StatefulWidget {
|
||||
const SendEmailNotificationPage({Key key}) : super(key: key);
|
||||
const SendEmailNotificationPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<SendEmailNotificationPage> createState() => _SendEmailNotificationPageState();
|
||||
|
||||
@ -12,7 +12,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class AutomaticBlockingPage extends StatefulWidget {
|
||||
const AutomaticBlockingPage({Key key}) : super(key: key);
|
||||
const AutomaticBlockingPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<AutomaticBlockingPage> createState() => _AutomaticBlockingPageState();
|
||||
@ -25,23 +25,23 @@ class _AutomaticBlockingPageState extends State<AutomaticBlockingPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.automaticBlocking.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.automaticBlocking!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:ListView(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.automaticBlocking.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.automaticBlocking!.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
|
||||
Container(height: 10.h,),
|
||||
Builder(
|
||||
builder: (context) {
|
||||
return CommonItem(leftTitel:TranslationLoader.lanKeys.delayTime.tr, rightTitle:"5s", isHaveLine: false, isHaveDirection: true, action: (){
|
||||
var list = ["5S", "10S", "15S", "30S", "60S", TranslationLoader.lanKeys.custom.tr];
|
||||
return CommonItem(leftTitel:TranslationLoader.lanKeys!.delayTime!.tr, rightTitle:"5s", isHaveLine: false, isHaveDirection: true, action: (){
|
||||
var list = ["5S", "10S", "15S", "30S", "60S", TranslationLoader.lanKeys!.custom!.tr];
|
||||
ShowBottomSheetTool().showSingleRowPicker(
|
||||
//上下文
|
||||
context,
|
||||
//默认的索引
|
||||
normalIndex: 2,
|
||||
title: TranslationLoader.lanKeys.time.tr,
|
||||
cancelTitle: TranslationLoader.lanKeys.cancel.tr,
|
||||
sureTitle: TranslationLoader.lanKeys.sure.tr,
|
||||
title: TranslationLoader.lanKeys!.time!.tr,
|
||||
cancelTitle: TranslationLoader.lanKeys!.cancel!.tr,
|
||||
sureTitle: TranslationLoader.lanKeys!.sure!.tr,
|
||||
//要显示的列表
|
||||
//可自定义数据适配器
|
||||
//adapter: PickerAdapter(),
|
||||
@ -62,7 +62,7 @@ class _AutomaticBlockingPageState extends State<AutomaticBlockingPage> {
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [Text("${TranslationLoader.lanKeys.pleaseEnter.tr}${TranslationLoader.lanKeys.time.tr}(S)"),],
|
||||
children: [Text("${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.time!.tr}(S)"),],
|
||||
),
|
||||
TextField(
|
||||
//输入框一行
|
||||
@ -73,7 +73,7 @@ class _AutomaticBlockingPageState extends State<AutomaticBlockingPage> {
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(
|
||||
top: 12.0, bottom: 8.0),
|
||||
hintText: "${TranslationLoader.lanKeys.pleaseEnter.tr}${TranslationLoader.lanKeys.time.tr}(S)",
|
||||
hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.time!.tr}(S)",
|
||||
hintStyle: TextStyle(fontSize: 30.sp),
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
@ -89,7 +89,7 @@ class _AutomaticBlockingPageState extends State<AutomaticBlockingPage> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text(TranslationLoader.lanKeys.automaticBlockingTip.tr)),
|
||||
Expanded(child: Text(TranslationLoader.lanKeys!.automaticBlockingTip!.tr)),
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
@ -9,7 +9,7 @@ import '../../../../../tools/titleAppBar.dart';
|
||||
import '../../../../../translations/trans_lib.dart';
|
||||
|
||||
class AdminOpenLockPasswordPage extends StatefulWidget {
|
||||
const AdminOpenLockPasswordPage({Key key}) : super(key: key);
|
||||
const AdminOpenLockPasswordPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<AdminOpenLockPasswordPage> createState() => _AdminOpenLockPasswordPageState();
|
||||
@ -20,10 +20,10 @@ class _AdminOpenLockPasswordPageState extends State<AdminOpenLockPasswordPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.adminOpenLockPassword.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.adminOpenLockPassword!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.password.tr, rightTitle:"189934", isHaveLine: false, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.password!.tr, rightTitle:"189934", isHaveLine: false, isHaveDirection: true, action: (){
|
||||
|
||||
}),
|
||||
Container(
|
||||
@ -33,7 +33,7 @@ class _AdminOpenLockPasswordPageState extends State<AdminOpenLockPasswordPage> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text(TranslationLoader.lanKeys.adminOpenLockPasswordTip.tr)),
|
||||
Expanded(child: Text(TranslationLoader.lanKeys!.adminOpenLockPasswordTip!.tr)),
|
||||
],
|
||||
),
|
||||
SizedBox(height:10.h,),
|
||||
@ -44,7 +44,7 @@ class _AdminOpenLockPasswordPageState extends State<AdminOpenLockPasswordPage> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text(TranslationLoader.lanKeys.updateLockAdminPassword.tr, style: TextStyle(color: AppColors.mainColor),)),
|
||||
Expanded(child: Text(TranslationLoader.lanKeys!.updateLockAdminPassword!.tr, style: TextStyle(color: AppColors.mainColor),)),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@ -11,7 +11,7 @@ import '../../../../../tools/titleAppBar.dart';
|
||||
import '../../../../../translations/trans_lib.dart';
|
||||
|
||||
class BasicInformationPage extends StatefulWidget {
|
||||
const BasicInformationPage({Key key}) : super(key: key);
|
||||
const BasicInformationPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<BasicInformationPage> createState() => _BasicInformationPageState();
|
||||
@ -22,27 +22,27 @@ class _BasicInformationPageState extends State<BasicInformationPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.basicInformation.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.basicInformation!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: ListView(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.lockNumber.tr, rightTitle:"MCBN0c_8f3106", allHeight:70.h, isHaveLine: false),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.lockNumber!.tr, rightTitle:"MCBN0c_8f3106", allHeight:70.h, isHaveLine: false),
|
||||
CommonItem(leftTitel:"MAC/ID", rightTitle:"53:66:9F:06:31:8F/9418481", allHeight:70.h, isHaveLine: false),
|
||||
SizedBox(height: 10.h,),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.electricQuantity.tr, rightTitle:"100%", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.electricQuantity!.tr, rightTitle:"100%", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.uploadElectricQuantityPage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.periodValidity.tr, rightTitle:"永久", allHeight:70.h, isHaveLine: false),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.periodValidity!.tr, rightTitle:"永久", allHeight:70.h, isHaveLine: false),
|
||||
SizedBox(height: 10.h,),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.lockName.tr, rightTitle:"MCBN0c_8f3106", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.lockName!.tr, rightTitle:"MCBN0c_8f3106", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.editLockNamePage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.lockGrouping.tr, rightTitle:"202307", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.lockGrouping!.tr, rightTitle:"202307", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.lockSeletGroupingPage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.adminOpenLockPassword.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.adminOpenLockPassword!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.adminOpenLockPasswordPage);
|
||||
}),
|
||||
],
|
||||
|
||||
@ -9,7 +9,7 @@ import '../../../../../tools/titleAppBar.dart';
|
||||
import '../../../../../translations/trans_lib.dart';
|
||||
|
||||
class EditLockNamePage extends StatefulWidget {
|
||||
const EditLockNamePage({Key key}) : super(key: key);
|
||||
const EditLockNamePage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<EditLockNamePage> createState() => _EditLockNamePageState();
|
||||
@ -28,15 +28,15 @@ class _EditLockNamePageState extends State<EditLockNamePage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.basicInformation.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.basicInformation!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
TextButton(
|
||||
child: Text(TranslationLoader.lanKeys.sure.tr, style: const TextStyle(color: Colors.white),),
|
||||
child: Text(TranslationLoader.lanKeys!.sure!.tr, style: const TextStyle(color: Colors.white),),
|
||||
onPressed: (){
|
||||
|
||||
},),
|
||||
],),
|
||||
body:Container(
|
||||
child: LoginInput(controller: _changeLockNameController, leftImg:'', hintText: TranslationLoader.lanKeys.pleaseEnterNumberOrEmail.tr, inputFormatters: [
|
||||
child: LoginInput(controller: _changeLockNameController, leftImg:'', hintText: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, inputFormatters: [
|
||||
LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
)
|
||||
|
||||
@ -11,7 +11,7 @@ import '../../../../../tools/titleAppBar.dart';
|
||||
import '../../../../../translations/trans_lib.dart';
|
||||
|
||||
class LockSeletGroupingPage extends StatefulWidget {
|
||||
const LockSeletGroupingPage({Key key}) : super(key: key);
|
||||
const LockSeletGroupingPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<LockSeletGroupingPage> createState() => _LockSeletGroupingPageState();
|
||||
@ -22,12 +22,12 @@ class _LockSeletGroupingPageState extends State<LockSeletGroupingPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.basicInformation.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.basicInformation!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:Column(
|
||||
children: [
|
||||
Expanded(child: _buildMainUI()),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys.sure.tr,
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
|
||||
@ -8,7 +8,7 @@ import '../../../../../tools/titleAppBar.dart';
|
||||
import '../../../../../translations/trans_lib.dart';
|
||||
|
||||
class UploadElectricQuantityPage extends StatefulWidget {
|
||||
const UploadElectricQuantityPage({Key key}) : super(key: key);
|
||||
const UploadElectricQuantityPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<UploadElectricQuantityPage> createState() => _UploadElectricQuantityPageState();
|
||||
@ -19,7 +19,7 @@ class _UploadElectricQuantityPageState extends State<UploadElectricQuantityPage>
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.electricQuantity.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.electricQuantity!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:Container(
|
||||
padding: EdgeInsets.all(30.w),
|
||||
child: Column(
|
||||
@ -27,18 +27,18 @@ class _UploadElectricQuantityPageState extends State<UploadElectricQuantityPage>
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text(TranslationLoader.lanKeys.updateElectricQuantityTip.tr)),
|
||||
Expanded(child: Text(TranslationLoader.lanKeys!.updateElectricQuantityTip!.tr)),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 20.h,),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text("${TranslationLoader.lanKeys.electricQuantity.tr} 100%")),
|
||||
Expanded(child: Text("${TranslationLoader.lanKeys!.electricQuantity!.tr} 100%")),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 30.h,),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys.update.tr,
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.update!.tr,
|
||||
borderRadius: 20.w,
|
||||
fontSize: 32.sp,
|
||||
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
|
||||
|
||||
@ -8,7 +8,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class BurglarAlarmPage extends StatefulWidget {
|
||||
const BurglarAlarmPage({Key key}) : super(key: key);
|
||||
const BurglarAlarmPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<BurglarAlarmPage> createState() => _BurglarAlarmPageState();
|
||||
@ -19,7 +19,7 @@ class _BurglarAlarmPageState extends State<BurglarAlarmPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.burglarAlarm.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.burglarAlarm!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:Container(
|
||||
padding: EdgeInsets.all(30.w),
|
||||
child: Column(
|
||||
@ -27,18 +27,18 @@ class _BurglarAlarmPageState extends State<BurglarAlarmPage> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text(TranslationLoader.lanKeys.burglarAlarmTip.tr)),
|
||||
Expanded(child: Text(TranslationLoader.lanKeys!.burglarAlarmTip!.tr)),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 20.h,),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text("${TranslationLoader.lanKeys.currentMode.tr} : ${TranslationLoader.lanKeys.opened.tr}", style: TextStyle(fontWeight: FontWeight.w600),)),
|
||||
Expanded(child: Text("${TranslationLoader.lanKeys!.currentMode!.tr} : ${TranslationLoader.lanKeys!.opened!.tr}", style: const TextStyle(fontWeight: FontWeight.w600),)),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 30.h,),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys.closed.tr,
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.closed!.tr,
|
||||
borderRadius: 20.w,
|
||||
fontSize: 32.sp,
|
||||
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
|
||||
|
||||
@ -8,7 +8,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class DiagnosePage extends StatefulWidget {
|
||||
const DiagnosePage({Key key}) : super(key: key);
|
||||
const DiagnosePage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<DiagnosePage> createState() => _DiagnosePageState();
|
||||
@ -19,7 +19,7 @@ class _DiagnosePageState extends State<DiagnosePage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.diagnose.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.diagnose!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:Container(
|
||||
padding: EdgeInsets.all(30.w),
|
||||
child: Column(
|
||||
@ -27,11 +27,11 @@ class _DiagnosePageState extends State<DiagnosePage> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text(TranslationLoader.lanKeys.diagnoseTip.tr)),
|
||||
Expanded(child: Text(TranslationLoader.lanKeys!.diagnoseTip!.tr)),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 30.h,),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys.uploading.tr,
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.uploading!.tr,
|
||||
borderRadius: 20.w,
|
||||
fontSize: 32.sp,
|
||||
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
|
||||
|
||||
@ -10,7 +10,7 @@ import '../../../../../tools/titleAppBar.dart';
|
||||
import '../../../../../translations/trans_lib.dart';
|
||||
|
||||
class AddDoorMagneticPage extends StatefulWidget {
|
||||
const AddDoorMagneticPage({Key key}) : super(key: key);
|
||||
const AddDoorMagneticPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<AddDoorMagneticPage> createState() => _AddDoorMagneticPageState();
|
||||
@ -22,7 +22,7 @@ class _AddDoorMagneticPageState extends State<AddDoorMagneticPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.add.tr} ${TranslationLoader.lanKeys.doorMagnetic.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.add!.tr} ${TranslationLoader.lanKeys!.doorMagnetic!.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body: ListView(
|
||||
children: [
|
||||
SizedBox(height: 100.h,),
|
||||
@ -33,7 +33,7 @@ class _AddDoorMagneticPageState extends State<AddDoorMagneticPage> {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(child: Text(TranslationLoader.lanKeys.pressAndHoldTheResetButtonTwoSeconds.tr, textAlign:TextAlign.center, style: TextStyle(fontSize: 34.sp, fontWeight: FontWeight.w500),)),
|
||||
Expanded(child: Text(TranslationLoader.lanKeys!.pressAndHoldTheResetButtonTwoSeconds!.tr, textAlign:TextAlign.center, style: TextStyle(fontSize: 34.sp, fontWeight: FontWeight.w500),)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -43,12 +43,12 @@ class _AddDoorMagneticPageState extends State<AddDoorMagneticPage> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(TranslationLoader.lanKeys.whenScreenFlashesClickNext.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),),
|
||||
Text(TranslationLoader.lanKeys!.whenScreenFlashesClickNext!.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 90.h,),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys.next.tr,
|
||||
btnName: TranslationLoader.lanKeys!.next!.tr,
|
||||
borderRadius: 10.w,
|
||||
fontSize: 28.sp,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
|
||||
@ -11,7 +11,7 @@ import '../../../../../tools/titleAppBar.dart';
|
||||
import '../../../../../translations/trans_lib.dart';
|
||||
|
||||
class DoorMagneticPage extends StatefulWidget {
|
||||
const DoorMagneticPage({Key key}) : super(key: key);
|
||||
const DoorMagneticPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<DoorMagneticPage> createState() => _DoorMagneticPageState();
|
||||
@ -22,7 +22,7 @@ class _DoorMagneticPageState extends State<DoorMagneticPage> with BaseWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.doorMagnetic.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.doorMagnetic!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
Container(
|
||||
@ -31,13 +31,13 @@ class _DoorMagneticPageState extends State<DoorMagneticPage> with BaseWidget {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text(TranslationLoader.lanKeys.doorMagneticListTopTip.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),)),
|
||||
Expanded(child: Text(TranslationLoader.lanKeys!.doorMagneticListTopTip!.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),)),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(child: _buildMainUI()),
|
||||
SubmitBtn(
|
||||
btnName: "${TranslationLoader.lanKeys.add.tr} ${TranslationLoader.lanKeys.doorMagnetic.tr}",
|
||||
btnName: "${TranslationLoader.lanKeys!.add!.tr} ${TranslationLoader.lanKeys!.doorMagnetic!.tr}",
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
@ -62,7 +62,7 @@ class _DoorMagneticPageState extends State<DoorMagneticPage> with BaseWidget {
|
||||
return emptyView();
|
||||
}
|
||||
|
||||
Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function action){
|
||||
Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function() action){
|
||||
return GestureDetector(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
|
||||
@ -8,7 +8,7 @@ import '../../../../../tools/titleAppBar.dart';
|
||||
import '../../../../../translations/trans_lib.dart';
|
||||
|
||||
class NearbyDoorMagneticPage extends StatefulWidget {
|
||||
const NearbyDoorMagneticPage({Key key}) : super(key: key);
|
||||
const NearbyDoorMagneticPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<NearbyDoorMagneticPage> createState() => _NearbyDoorMagneticPageState();
|
||||
@ -19,7 +19,7 @@ class _NearbyDoorMagneticPageState extends State<NearbyDoorMagneticPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.nearbyEquipment.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.nearbyEquipment!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body: ListView.builder(
|
||||
itemCount:20,
|
||||
itemBuilder: (c, index){
|
||||
@ -31,7 +31,7 @@ class _NearbyDoorMagneticPageState extends State<NearbyDoorMagneticPage> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function action){
|
||||
Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function() action){
|
||||
return GestureDetector(
|
||||
onTap: action,
|
||||
child: Column(
|
||||
|
||||
@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class ImportOtherLockDataPage extends StatefulWidget {
|
||||
const ImportOtherLockDataPage({Key key}) : super(key: key);
|
||||
const ImportOtherLockDataPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<ImportOtherLockDataPage> createState() => _ImportOtherLockDataPageState();
|
||||
@ -20,7 +20,7 @@ class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.importOtherLockData.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.importOtherLockData!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:Container(
|
||||
padding: EdgeInsets.all(30.w),
|
||||
child: Column(
|
||||
@ -28,14 +28,14 @@ class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text(TranslationLoader.lanKeys.importOtherLockDataTip.tr)),
|
||||
Expanded(child: Text(TranslationLoader.lanKeys!.importOtherLockDataTip!.tr)),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 20.h,),
|
||||
_searchWidget(),
|
||||
SizedBox(height: 10.h,),
|
||||
Expanded(child: _buildMainUI()),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys.sure.tr,
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
borderRadius: 20.w,
|
||||
fontSize: 32.sp,
|
||||
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
|
||||
@ -66,7 +66,7 @@ class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: EdgeInsets.only(
|
||||
top: 8.h, left: -25.0.h, right: -15.0.h, bottom: 8.0.h),
|
||||
hintText: TranslationLoader.lanKeys.pleaseEnter.tr,
|
||||
hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
//左边图标设置
|
||||
@ -90,7 +90,7 @@ class _ImportOtherLockDataPageState extends State<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(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
|
||||
@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class LockEscalationPage extends StatefulWidget {
|
||||
const LockEscalationPage({Key key}) : super(key: key);
|
||||
const LockEscalationPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<LockEscalationPage> createState() => _LockEscalationPageState();
|
||||
@ -20,7 +20,7 @@ class _LockEscalationPageState extends State<LockEscalationPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.lockEscalation.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.lockEscalation!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:Container(
|
||||
padding: EdgeInsets.all(30.w),
|
||||
child: Column(
|
||||
@ -31,15 +31,15 @@ class _LockEscalationPageState extends State<LockEscalationPage> {
|
||||
children: [
|
||||
Image.asset('images/main/icon_main_lockSet_lockEscalation.png', width: 40.w, height: 40.w,),
|
||||
SizedBox(width: 10.w,),
|
||||
Text(TranslationLoader.lanKeys.haveNewVersion.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w600),)
|
||||
Text(TranslationLoader.lanKeys!.haveNewVersion!.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w600),)
|
||||
],
|
||||
),
|
||||
SizedBox(height: 30.h,),
|
||||
Text("${TranslationLoader.lanKeys.currentVersion.tr}:1.0.0"),
|
||||
Text("${TranslationLoader.lanKeys!.currentVersion!.tr}:1.0.0"),
|
||||
SizedBox(height: 10.h,),
|
||||
Text("${TranslationLoader.lanKeys.newVersion.tr}:1.0.1", style: TextStyle(color: AppColors.mainColor),),
|
||||
Text("${TranslationLoader.lanKeys!.newVersion!.tr}:1.0.1", style: TextStyle(color: AppColors.mainColor),),
|
||||
SizedBox(height: 30.h,),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys.upgrade.tr,
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.upgrade!.tr,
|
||||
borderRadius: 20.w,
|
||||
fontSize: 32.sp,
|
||||
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
|
||||
|
||||
@ -11,7 +11,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class LockSetPage extends StatefulWidget {
|
||||
const LockSetPage({Key key}) : super(key: key);
|
||||
const LockSetPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<LockSetPage> createState() => _LockSetPageState();
|
||||
@ -22,58 +22,58 @@ class _LockSetPageState extends State<LockSetPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.set.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.set!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: ListView(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.basicInformation.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.basicInformation!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.basicInformationPage);
|
||||
}),
|
||||
SizedBox(height: 10.h,),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.wirelessKeyboard.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.wirelessKeyboard!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.wirelessKeyboardPage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.doorMagnetic.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.doorMagnetic!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.doorMagneticPage);
|
||||
}),
|
||||
SizedBox(height: 10.h,),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.remoteUnlocking.tr, rightTitle:TranslationLoader.lanKeys.closed.tr, isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.remoteUnlocking!.tr, rightTitle:TranslationLoader.lanKeys!.closed!.tr, isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.remoteUnlockingPage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.automaticBlocking.tr, rightTitle:"5s", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.automaticBlocking!.tr, rightTitle:"5s", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.automaticBlockingPage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.normallyOpenMode.tr, rightTitle:TranslationLoader.lanKeys.closed.tr, isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.normallyOpenMode!.tr, rightTitle:TranslationLoader.lanKeys!.closed!.tr, isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.normallyOpenModePage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.lockSound.tr, rightTitle:"高", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.lockSound!.tr, rightTitle:"高", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.lockSoundSetPage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.burglarAlarm.tr, rightTitle:TranslationLoader.lanKeys.opened.tr, isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.burglarAlarm!.tr, rightTitle:TranslationLoader.lanKeys!.opened!.tr, isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.burglarAlarmPage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.resetButton.tr, rightTitle:TranslationLoader.lanKeys.opened.tr, isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.resetButton!.tr, rightTitle:TranslationLoader.lanKeys!.opened!.tr, isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.resetButtonPage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.unlockQRCode.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.unlockQRCode!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.unlockQRCodePage);
|
||||
}),
|
||||
SizedBox(height: 10.h,),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.lockTime.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.lockTime!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.lockTimePage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.diagnose.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.diagnose!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.diagnosePage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.uploadData.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.uploadData!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.uploadDataPage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.importOtherLockData.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.importOtherLockData!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.importOtherLockDataPage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.lockEscalation.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.lockEscalation!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.lockEscalationPage);
|
||||
}),
|
||||
SizedBox(height: 10.h,),
|
||||
@ -84,13 +84,13 @@ class _LockSetPageState extends State<LockSetPage> {
|
||||
|
||||
}),
|
||||
SizedBox(height: 10.h,),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.markedHouseState.tr, rightTitle:"空闲", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.markedHouseState!.tr, rightTitle:"空闲", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.markedHouseStatePage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.checkingIn.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.unlockReminder.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.checkingIn!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.unlockReminder!.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
|
||||
SizedBox(height: 30.h,),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys.delete.tr,
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.delete!.tr,
|
||||
borderRadius: 20.w,
|
||||
fontSize: 32.sp,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w),
|
||||
|
||||
@ -10,7 +10,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class LockSoundSetPage extends StatefulWidget {
|
||||
const LockSoundSetPage({Key key}) : super(key: key);
|
||||
const LockSoundSetPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<LockSoundSetPage> createState() => _LockSoundSetPageState();
|
||||
@ -22,10 +22,10 @@ class _LockSoundSetPageState extends State<LockSoundSetPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.lockSound.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.lockSound!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:ListView(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.lockSound.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.lockSound!.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
|
||||
Container(height: 10.h,),
|
||||
Container(
|
||||
padding: EdgeInsets.all(30.w),
|
||||
@ -33,7 +33,7 @@ class _LockSoundSetPageState extends State<LockSoundSetPage> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text(TranslationLoader.lanKeys.lockSoundTip.tr)),
|
||||
Expanded(child: Text(TranslationLoader.lanKeys!.lockSoundTip!.tr)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -44,36 +44,36 @@ class _LockSoundSetPageState extends State<LockSoundSetPage> {
|
||||
color: Colors.white,
|
||||
child: Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.pleaseSeletLockVolume.tr, rightTitle:"", isHaveLine: true),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.low.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true,
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.pleaseSeletLockVolume!.tr, rightTitle:"", isHaveLine: true),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.low!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true,
|
||||
rightWidget: GestureDetector(
|
||||
onTap: (){
|
||||
|
||||
},
|
||||
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
|
||||
),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.lower.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true,
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.lower!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true,
|
||||
rightWidget: GestureDetector(
|
||||
onTap: (){
|
||||
|
||||
},
|
||||
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
|
||||
),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.medium.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true,
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.medium!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true,
|
||||
rightWidget: GestureDetector(
|
||||
onTap: (){
|
||||
|
||||
},
|
||||
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
|
||||
),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.higher.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true,
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.higher!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true,
|
||||
rightWidget: GestureDetector(
|
||||
onTap: (){
|
||||
|
||||
},
|
||||
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
|
||||
),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.high.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true,
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.high!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true,
|
||||
rightWidget: GestureDetector(
|
||||
onTap: (){
|
||||
|
||||
@ -85,7 +85,7 @@ class _LockSoundSetPageState extends State<LockSoundSetPage> {
|
||||
)
|
||||
),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys.save.tr,
|
||||
btnName: TranslationLoader.lanKeys!.save!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
|
||||
@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class LockTimePage extends StatefulWidget {
|
||||
const LockTimePage({Key key}) : super(key: key);
|
||||
const LockTimePage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<LockTimePage> createState() => _LockTimePageState();
|
||||
@ -21,7 +21,7 @@ class _LockTimePageState extends State<LockTimePage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.lockTime.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.lockTime!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:Container(
|
||||
padding: EdgeInsets.all(30.w),
|
||||
child: Column(
|
||||
@ -34,7 +34,7 @@ class _LockTimePageState extends State<LockTimePage> {
|
||||
],
|
||||
),
|
||||
SizedBox(height: 60.h,),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys.calibrationTime.tr,
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.calibrationTime!.tr,
|
||||
borderRadius: 20.w,
|
||||
fontSize: 32.sp,
|
||||
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
|
||||
@ -49,7 +49,7 @@ class _LockTimePageState extends State<LockTimePage> {
|
||||
|
||||
},
|
||||
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))
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@ -10,7 +10,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class MarkedHouseStatePage extends StatefulWidget {
|
||||
const MarkedHouseStatePage({Key key}) : super(key: key);
|
||||
const MarkedHouseStatePage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<MarkedHouseStatePage> createState() => _MarkedHouseStatePageState();
|
||||
@ -21,18 +21,18 @@ class _MarkedHouseStatePageState extends State<MarkedHouseStatePage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.markedHouseState.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.markedHouseState!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:Container(
|
||||
child: Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.leisure.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true,
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.leisure!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true,
|
||||
rightWidget: GestureDetector(
|
||||
onTap: (){
|
||||
|
||||
},
|
||||
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
|
||||
),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.checkingIn.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget: true,
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.checkingIn!.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget: true,
|
||||
rightWidget: GestureDetector(
|
||||
onTap: (){
|
||||
|
||||
@ -40,7 +40,7 @@ class _MarkedHouseStatePageState extends State<MarkedHouseStatePage> {
|
||||
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
|
||||
),
|
||||
SizedBox(height: 60.h,),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys.sure.tr,
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
borderRadius: 20.w,
|
||||
fontSize: 32.sp,
|
||||
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
|
||||
|
||||
@ -10,7 +10,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class NormallyOpenModePage extends StatefulWidget {
|
||||
const NormallyOpenModePage({Key key}) : super(key: key);
|
||||
const NormallyOpenModePage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<NormallyOpenModePage> createState() => _NormallyOpenModePageState();
|
||||
@ -22,10 +22,10 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.normallyOpenMode.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.normallyOpenMode!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:ListView(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.normallyOpenMode.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.normallyOpenMode!.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
|
||||
Container(height: 10.h,),
|
||||
Container(
|
||||
padding: EdgeInsets.all(30.w),
|
||||
@ -33,7 +33,7 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text(TranslationLoader.lanKeys.normallyOpenModeTip.tr)),
|
||||
Expanded(child: Text(TranslationLoader.lanKeys!.normallyOpenModeTip!.tr)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -52,7 +52,7 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> {
|
||||
)
|
||||
),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys.save.tr,
|
||||
btnName: TranslationLoader.lanKeys!.save!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
@ -77,7 +77,7 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> {
|
||||
height: 60.h,
|
||||
// color: Colors.red,
|
||||
padding: EdgeInsets.only(left:20.h, top: 15.h),
|
||||
child: Text("${TranslationLoader.lanKeys.normallyOpen.tr} ${TranslationLoader.lanKeys.date.tr}", style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w600))
|
||||
child: Text("${TranslationLoader.lanKeys!.normallyOpen!.tr} ${TranslationLoader.lanKeys!.date!.tr}", style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w600))
|
||||
),
|
||||
Container(
|
||||
height: 90.h,
|
||||
@ -102,27 +102,28 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> {
|
||||
String dateStr;
|
||||
switch (index) {
|
||||
case 0:
|
||||
dateStr = TranslationLoader.lanKeys.sundayShort.tr;
|
||||
dateStr = TranslationLoader.lanKeys!.sundayShort!.tr;
|
||||
break;
|
||||
case 1:
|
||||
dateStr = TranslationLoader.lanKeys.mondayShort.tr;
|
||||
dateStr = TranslationLoader.lanKeys!.mondayShort!.tr;
|
||||
break;
|
||||
case 2:
|
||||
dateStr = TranslationLoader.lanKeys.tuesdayShort.tr;
|
||||
dateStr = TranslationLoader.lanKeys!.tuesdayShort!.tr;
|
||||
break;
|
||||
case 3:
|
||||
dateStr = TranslationLoader.lanKeys.wednesdayShort.tr;
|
||||
dateStr = TranslationLoader.lanKeys!.wednesdayShort!.tr;
|
||||
break;
|
||||
case 4:
|
||||
dateStr = TranslationLoader.lanKeys.thursdayShort.tr;
|
||||
dateStr = TranslationLoader.lanKeys!.thursdayShort!.tr;
|
||||
break;
|
||||
case 5:
|
||||
dateStr = TranslationLoader.lanKeys.fridayShort.tr;
|
||||
dateStr = TranslationLoader.lanKeys!.fridayShort!.tr;
|
||||
break;
|
||||
case 6:
|
||||
dateStr = TranslationLoader.lanKeys.saturdayShort.tr;
|
||||
dateStr = TranslationLoader.lanKeys!.saturdayShort!.tr;
|
||||
break;
|
||||
default:
|
||||
dateStr = "";
|
||||
break;
|
||||
}
|
||||
return GestureDetector(
|
||||
@ -147,14 +148,14 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> {
|
||||
return Column(
|
||||
children: [
|
||||
Container(color: AppColors.mainBackgroundColor, height: 10.h,),
|
||||
CommonItem(leftTitel:"${TranslationLoader.lanKeys.normallyOpen.tr} ${TranslationLoader.lanKeys.time.tr}", rightTitle:"", isHaveLine: true, isHaveRightWidget: true,
|
||||
CommonItem(leftTitel:"${TranslationLoader.lanKeys!.normallyOpen!.tr} ${TranslationLoader.lanKeys!.time!.tr}", rightTitle:"", isHaveLine: true, isHaveRightWidget: true,
|
||||
rightWidget: GestureDetector(
|
||||
onTap: (){
|
||||
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
Text(TranslationLoader.lanKeys.allDay.tr),
|
||||
Text(TranslationLoader.lanKeys!.allDay!.tr),
|
||||
SizedBox(width: 5.w,),
|
||||
Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),
|
||||
],
|
||||
@ -166,10 +167,10 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> {
|
||||
color: Colors.white,
|
||||
child: Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:"${TranslationLoader.lanKeys.begin.tr} ${TranslationLoader.lanKeys.time.tr}", rightTitle:"", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
CommonItem(leftTitel:"${TranslationLoader.lanKeys!.begin!.tr} ${TranslationLoader.lanKeys!.time!.tr}", rightTitle:"", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:"${TranslationLoader.lanKeys.end.tr} ${TranslationLoader.lanKeys.time.tr}", rightTitle:"", isHaveDirection: true, action:(){
|
||||
CommonItem(leftTitel:"${TranslationLoader.lanKeys!.end!.tr} ${TranslationLoader.lanKeys!.time!.tr}", rightTitle:"", isHaveDirection: true, action:(){
|
||||
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
|
||||
@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class RemoteUnlockingPage extends StatefulWidget {
|
||||
const RemoteUnlockingPage({Key key}) : super(key: key);
|
||||
const RemoteUnlockingPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<RemoteUnlockingPage> createState() => _RemoteUnlockingPageState();
|
||||
@ -20,7 +20,7 @@ class _RemoteUnlockingPageState extends State<RemoteUnlockingPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.remoteUnlocking.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.remoteUnlocking!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:Container(
|
||||
padding: EdgeInsets.all(30.w),
|
||||
child: Column(
|
||||
@ -28,18 +28,18 @@ class _RemoteUnlockingPageState extends State<RemoteUnlockingPage> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text(TranslationLoader.lanKeys.remoteUnlockingPageTip.tr)),
|
||||
Expanded(child: Text(TranslationLoader.lanKeys!.remoteUnlockingPageTip!.tr)),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 20.h,),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text("${TranslationLoader.lanKeys.currentMode.tr} : ${TranslationLoader.lanKeys.opened.tr}", style: TextStyle(fontWeight: FontWeight.w600),)),
|
||||
Expanded(child: Text("${TranslationLoader.lanKeys!.currentMode!.tr} : ${TranslationLoader.lanKeys!.opened!.tr}", style: TextStyle(fontWeight: FontWeight.w600),)),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 30.h,),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys.closed.tr,
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.closed!.tr,
|
||||
borderRadius: 20.w,
|
||||
fontSize: 32.sp,
|
||||
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
|
||||
|
||||
@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class ResetButtonPage extends StatefulWidget {
|
||||
const ResetButtonPage({Key key}) : super(key: key);
|
||||
const ResetButtonPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<ResetButtonPage> createState() => _ResetButtonPageState();
|
||||
@ -20,7 +20,7 @@ class _ResetButtonPageState extends State<ResetButtonPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.resetButton.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.resetButton!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:Container(
|
||||
padding: EdgeInsets.all(30.w),
|
||||
child: Column(
|
||||
@ -28,18 +28,18 @@ class _ResetButtonPageState extends State<ResetButtonPage> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text(TranslationLoader.lanKeys.resetButtonTip.tr)),
|
||||
Expanded(child: Text(TranslationLoader.lanKeys!.resetButtonTip!.tr)),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 20.h,),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text("${TranslationLoader.lanKeys.currentMode.tr} : ${TranslationLoader.lanKeys.opened.tr}", style: TextStyle(fontWeight: FontWeight.w600),)),
|
||||
Expanded(child: Text("${TranslationLoader.lanKeys!.currentMode!.tr} : ${TranslationLoader.lanKeys!.opened!.tr}", style: TextStyle(fontWeight: FontWeight.w600),)),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 30.h,),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys.closed.tr,
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.closed!.tr,
|
||||
borderRadius: 20.w,
|
||||
fontSize: 32.sp,
|
||||
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
|
||||
|
||||
@ -9,7 +9,7 @@ import '../../../../translations/trans_lib.dart';
|
||||
import 'package:qr_flutter/qr_flutter.dart';
|
||||
|
||||
class UnlockQRCodePage extends StatefulWidget {
|
||||
const UnlockQRCodePage({Key key}) : super(key: key);
|
||||
const UnlockQRCodePage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<UnlockQRCodePage> createState() => _UnlockQRCodePageState();
|
||||
@ -20,7 +20,7 @@ class _UnlockQRCodePageState extends State<UnlockQRCodePage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.burglarAlarm.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.burglarAlarm!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:Column(
|
||||
children: [
|
||||
Container(
|
||||
@ -49,7 +49,7 @@ class _UnlockQRCodePageState extends State<UnlockQRCodePage> {
|
||||
// ),
|
||||
QrImage(data: 'www.baidu.com', size: 300.w),
|
||||
SizedBox(height: 50.w,),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys.share.tr,
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.share!.tr,
|
||||
borderRadius: 20.w,
|
||||
fontSize: 32.sp,
|
||||
width: 250.w,
|
||||
|
||||
@ -8,7 +8,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class UploadDataPage extends StatefulWidget {
|
||||
const UploadDataPage({Key key}) : super(key: key);
|
||||
const UploadDataPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<UploadDataPage> createState() => _UploadDataPageState();
|
||||
@ -19,7 +19,7 @@ class _UploadDataPageState extends State<UploadDataPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.uploadData.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.uploadData!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:Container(
|
||||
padding: EdgeInsets.all(30.w),
|
||||
child: Column(
|
||||
@ -27,11 +27,11 @@ class _UploadDataPageState extends State<UploadDataPage> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text(TranslationLoader.lanKeys.uploadDataTip.tr)),
|
||||
Expanded(child: Text(TranslationLoader.lanKeys!.uploadDataTip!.tr)),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 30.h,),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys.begin.tr,
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.begin!.tr,
|
||||
borderRadius: 20.w,
|
||||
fontSize: 32.sp,
|
||||
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
|
||||
|
||||
@ -10,7 +10,7 @@ import '../../../../../tools/titleAppBar.dart';
|
||||
import '../../../../../translations/trans_lib.dart';
|
||||
|
||||
class AddWirelessKeyboardPage extends StatefulWidget {
|
||||
const AddWirelessKeyboardPage({Key key}) : super(key: key);
|
||||
const AddWirelessKeyboardPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<AddWirelessKeyboardPage> createState() => _AddWirelessKeyboardPageState();
|
||||
@ -22,7 +22,7 @@ class _AddWirelessKeyboardPageState extends State<AddWirelessKeyboardPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.add.tr} ${TranslationLoader.lanKeys.wirelessKeyboard.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.add!.tr} ${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body: ListView(
|
||||
// mainAxisAlignment: MainAxisAlignment.center,
|
||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||
@ -31,7 +31,7 @@ Widget build(BuildContext context) {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(TranslationLoader.lanKeys.lightTouchScreen.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),),
|
||||
Text(TranslationLoader.lanKeys!.lightTouchScreen!.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 90.h,),
|
||||
@ -40,12 +40,12 @@ Widget build(BuildContext context) {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(TranslationLoader.lanKeys.whenScreenFlashesClickNext.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),),
|
||||
Text(TranslationLoader.lanKeys!.whenScreenFlashesClickNext!.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 90.h,),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys.next.tr,
|
||||
btnName: TranslationLoader.lanKeys!.next!.tr,
|
||||
borderRadius: 10.w,
|
||||
fontSize: 28.sp,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
@ -56,7 +56,7 @@ Widget build(BuildContext context) {
|
||||
),
|
||||
// SizedBox(height: 20.h,),
|
||||
SubmitBtn(
|
||||
btnName:TranslationLoader.lanKeys.theScreenNeverFlickered.tr,
|
||||
btnName:TranslationLoader.lanKeys!.theScreenNeverFlickered!.tr,
|
||||
borderRadius: 10.w,
|
||||
fontSize: 28.sp,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w),
|
||||
|
||||
@ -10,7 +10,7 @@ import '../../../../../tools/titleAppBar.dart';
|
||||
import '../../../../../translations/trans_lib.dart';
|
||||
|
||||
class AddWirelessKeyboardScreenNotLightOnPage extends StatefulWidget {
|
||||
const AddWirelessKeyboardScreenNotLightOnPage({Key key}) : super(key: key);
|
||||
const AddWirelessKeyboardScreenNotLightOnPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<AddWirelessKeyboardScreenNotLightOnPage> createState() => _AddWirelessKeyboardScreenNotLightOnPageState();
|
||||
@ -22,7 +22,7 @@ class _AddWirelessKeyboardScreenNotLightOnPageState extends State<AddWirelessKey
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.add.tr} ${TranslationLoader.lanKeys.wirelessKeyboard.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.add!.tr} ${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body: ListView(
|
||||
// mainAxisAlignment: MainAxisAlignment.center,
|
||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||
@ -31,14 +31,14 @@ class _AddWirelessKeyboardScreenNotLightOnPageState extends State<AddWirelessKey
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
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,),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
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,),
|
||||
@ -47,12 +47,12 @@ class _AddWirelessKeyboardScreenNotLightOnPageState extends State<AddWirelessKey
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(TranslationLoader.lanKeys.whenScreenFlashesClickNext.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),),
|
||||
Text(TranslationLoader.lanKeys!.whenScreenFlashesClickNext!.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 90.h,),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys.next.tr,
|
||||
btnName: TranslationLoader.lanKeys!.next!.tr,
|
||||
borderRadius: 10.w,
|
||||
fontSize: 28.sp,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
|
||||
@ -8,7 +8,7 @@ import '../../../../../tools/titleAppBar.dart';
|
||||
import '../../../../../translations/trans_lib.dart';
|
||||
|
||||
class SeletWirelessKeyboardPage extends StatefulWidget {
|
||||
const SeletWirelessKeyboardPage({Key key}) : super(key: key);
|
||||
const SeletWirelessKeyboardPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<SeletWirelessKeyboardPage> createState() => _SeletWirelessKeyboardPageState();
|
||||
@ -19,7 +19,7 @@ class _SeletWirelessKeyboardPageState extends State<SeletWirelessKeyboardPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.selet.tr} ${TranslationLoader.lanKeys.wirelessKeyboard.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.selet!.tr} ${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body: ListView.builder(
|
||||
itemCount:20,
|
||||
itemBuilder: (c, index){
|
||||
@ -31,7 +31,7 @@ class _SeletWirelessKeyboardPageState extends State<SeletWirelessKeyboardPage> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function action){
|
||||
Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function() action){
|
||||
return GestureDetector(
|
||||
onTap: action,
|
||||
child: Column(
|
||||
|
||||
@ -10,7 +10,7 @@ import '../../../../../tools/titleAppBar.dart';
|
||||
import '../../../../../translations/trans_lib.dart';
|
||||
|
||||
class WirelessKeyboardPage extends StatefulWidget {
|
||||
const WirelessKeyboardPage({Key key}) : super(key: key);
|
||||
const WirelessKeyboardPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<WirelessKeyboardPage> createState() => _WirelessKeyboardPageState();
|
||||
@ -21,9 +21,9 @@ class _WirelessKeyboardPageState extends State<WirelessKeyboardPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.wirelessKeyboard.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.wirelessKeyboard!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
TextButton(
|
||||
child: Text(TranslationLoader.lanKeys.reset.tr, style: const TextStyle(color: Colors.white),),
|
||||
child: Text(TranslationLoader.lanKeys!.reset!.tr, style: const TextStyle(color: Colors.white),),
|
||||
onPressed: (){
|
||||
|
||||
},),
|
||||
@ -32,7 +32,7 @@ class _WirelessKeyboardPageState extends State<WirelessKeyboardPage> {
|
||||
children: [
|
||||
Expanded(child: _buildMainUI()),
|
||||
SubmitBtn(
|
||||
btnName: "${TranslationLoader.lanKeys.add.tr} ${TranslationLoader.lanKeys.wirelessKeyboard.tr}",
|
||||
btnName: "${TranslationLoader.lanKeys!.add!.tr} ${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}",
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
@ -56,7 +56,7 @@ class _WirelessKeyboardPageState extends State<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(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
|
||||
@ -9,7 +9,7 @@ import '../../../tools/titleAppBar.dart';
|
||||
import '../../../translations/trans_lib.dart';
|
||||
|
||||
class LockDetailPage extends StatefulWidget {
|
||||
const LockDetailPage({Key key}) : super(key: key);
|
||||
const LockDetailPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<LockDetailPage> createState() => _LockDetailPageState();
|
||||
@ -20,7 +20,7 @@ class _LockDetailPageState extends State<LockDetailPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.starLock.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.starLock!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
topWidget(),
|
||||
@ -70,7 +70,7 @@ class _LockDetailPageState extends State<LockDetailPage> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(TranslationLoader.lanKeys.clickUnlockAndHoldDownClose.tr, style: TextStyle(fontSize: 28.sp, color: const Color(0xFFB3B3B3), fontWeight: FontWeight.w500),),
|
||||
Text(TranslationLoader.lanKeys!.clickUnlockAndHoldDownClose!.tr, style: TextStyle(fontSize: 28.sp, color: const Color(0xFFB3B3B3), fontWeight: FontWeight.w500),),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 40.h,),
|
||||
@ -91,31 +91,31 @@ class _LockDetailPageState extends State<LockDetailPage> {
|
||||
mainAxisSpacing: 10.h,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
children: [
|
||||
bottomItem('images/main/icon_main_clockingIn.png', TranslationLoader.lanKeys.checkingIn.tr, (){
|
||||
bottomItem('images/main/icon_main_clockingIn.png', TranslationLoader.lanKeys!.checkingIn!.tr, (){
|
||||
Navigator.pushNamed(context, Routers.checkingInListPage);
|
||||
}),
|
||||
bottomItem('images/main/icon_main_electronicKey.png', TranslationLoader.lanKeys.electronicKey.tr, (){
|
||||
bottomItem('images/main/icon_main_electronicKey.png', TranslationLoader.lanKeys!.electronicKey!.tr, (){
|
||||
Navigator.pushNamed(context, Routers.electronicKeyListPage);
|
||||
}),
|
||||
bottomItem('images/main/icon_main_password.png', TranslationLoader.lanKeys.password.tr, (){
|
||||
bottomItem('images/main/icon_main_password.png', TranslationLoader.lanKeys!.password!.tr, (){
|
||||
Navigator.pushNamed(context, Routers.passwordKeyListPage);
|
||||
}),
|
||||
bottomItem('images/main/icon_main_icCard.png', TranslationLoader.lanKeys.card.tr, (){
|
||||
bottomItem('images/main/icon_main_icCard.png', TranslationLoader.lanKeys!.card!.tr, (){
|
||||
Navigator.pushNamed(context, Routers.otherTypeKeyListPage, arguments: 0);
|
||||
}),
|
||||
bottomItem('images/main/icon_main_fingerprint.png', TranslationLoader.lanKeys.fingerprint.tr, (){
|
||||
bottomItem('images/main/icon_main_fingerprint.png', TranslationLoader.lanKeys!.fingerprint!.tr, (){
|
||||
Navigator.pushNamed(context, Routers.otherTypeKeyListPage, arguments: 1);
|
||||
}),
|
||||
bottomItem('images/main/icon_main_remoteControl.png', TranslationLoader.lanKeys.remoteControl.tr, (){
|
||||
bottomItem('images/main/icon_main_remoteControl.png', TranslationLoader.lanKeys!.remoteControl!.tr, (){
|
||||
Navigator.pushNamed(context, Routers.otherTypeKeyListPage, arguments: 2);
|
||||
}),
|
||||
bottomItem('images/main/icon_main_authorizedAdmin.png', TranslationLoader.lanKeys.authorizedAdmin.tr, (){
|
||||
bottomItem('images/main/icon_main_authorizedAdmin.png', TranslationLoader.lanKeys!.authorizedAdmin!.tr, (){
|
||||
Navigator.pushNamed(context, Routers.authorizedAdminListPage);
|
||||
}),
|
||||
bottomItem('images/main/icon_main_operatingRecord.png', TranslationLoader.lanKeys.operatingRecord.tr, (){
|
||||
bottomItem('images/main/icon_main_operatingRecord.png', TranslationLoader.lanKeys!.operatingRecord!.tr, (){
|
||||
Navigator.pushNamed(context, Routers.lockOperatingRecordPage);
|
||||
}),
|
||||
bottomItem('images/main/icon_main_set.png', TranslationLoader.lanKeys.set.tr, (){
|
||||
bottomItem('images/main/icon_main_set.png', TranslationLoader.lanKeys!.set!.tr, (){
|
||||
Navigator.pushNamed(context, Routers.lockSetPage);
|
||||
}),
|
||||
],
|
||||
@ -124,7 +124,7 @@ class _LockDetailPageState extends State<LockDetailPage> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget bottomItem(String iconUrl,String name, Function onClick){
|
||||
Widget bottomItem(String iconUrl,String name, Function() onClick){
|
||||
var width = 65.w;
|
||||
var height = 70.h;
|
||||
return GestureDetector(
|
||||
|
||||
@ -9,7 +9,7 @@ import '../../../tools/titleAppBar.dart';
|
||||
import '../../../translations/trans_lib.dart';
|
||||
|
||||
class LockOperatingRecordPage extends StatefulWidget {
|
||||
const LockOperatingRecordPage({Key key}) : super(key: key);
|
||||
const LockOperatingRecordPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<LockOperatingRecordPage> createState() => _LockOperatingRecordPageState();
|
||||
@ -20,7 +20,7 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle:TranslationLoader.lanKeys.operatingRecord.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
appBar: TitleAppBar(barTitle:TranslationLoader.lanKeys!.operatingRecord!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
TextButton(
|
||||
child: const Text("操作", style: TextStyle(color: Colors.white),),
|
||||
onPressed: (){
|
||||
@ -42,7 +42,7 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
|
||||
Container(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
padding: EdgeInsets.all(20.h),
|
||||
child: Text(TranslationLoader.lanKeys.lockOperatingRecordTip.tr, textAlign: TextAlign.start,),
|
||||
child: Text(TranslationLoader.lanKeys!.lockOperatingRecordTip!.tr, textAlign: TextAlign.start,),
|
||||
),
|
||||
_searchWidget(),
|
||||
Expanded(child: _buildMainUI()),
|
||||
@ -67,7 +67,7 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(
|
||||
top: 12.0, left: -22.0, right: -15.0, bottom: 10.0),
|
||||
hintText: TranslationLoader.lanKeys.pleaseEnter.tr,
|
||||
hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
hintStyle: TextStyle(fontSize: 28.sp),
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
@ -109,7 +109,7 @@ class _LockOperatingRecordPageState extends State<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(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
|
||||
@ -10,7 +10,7 @@ import '../../../../translations/trans_lib.dart';
|
||||
class OtherTypeAddKeyPage extends StatefulWidget {
|
||||
final String seletType;
|
||||
final int lockType;
|
||||
const OtherTypeAddKeyPage({Key key, @required this.seletType, @required this.lockType}) : super(key: key);
|
||||
const OtherTypeAddKeyPage({Key? key, required this.seletType, required this.lockType}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<OtherTypeAddKeyPage> createState() => _OtherTypeAddKeyPageState();
|
||||
@ -33,31 +33,29 @@ class _OtherTypeAddKeyPageState extends State<OtherTypeAddKeyPage> {
|
||||
// return sendElectronicKeySucceed();
|
||||
return Column(
|
||||
children: [
|
||||
perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseEnter.tr, _controller),
|
||||
perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseEnter!.tr, _controller),
|
||||
keyBottomWidget()
|
||||
],
|
||||
);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
// 限时
|
||||
return Column(
|
||||
children: [
|
||||
perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseEnter.tr, _controller),
|
||||
perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseEnter!.tr, _controller),
|
||||
keyTimeLimitWidget(),
|
||||
keyBottomWidget()
|
||||
],
|
||||
);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
// 循环
|
||||
return Column(
|
||||
children: [
|
||||
perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseEnter.tr, _controller),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.failureTime.tr, rightTitle:"", isHaveDirection: true, action:(){
|
||||
perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseEnter!.tr, _controller),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"", isHaveDirection: true, action:(){
|
||||
// _showDatePicker();
|
||||
}),
|
||||
keyBottomWidget()
|
||||
@ -66,7 +64,7 @@ class _OtherTypeAddKeyPageState extends State<OtherTypeAddKeyPage> {
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
return Container();
|
||||
}
|
||||
}
|
||||
|
||||
@ -85,10 +83,10 @@ class _OtherTypeAddKeyPageState extends State<OtherTypeAddKeyPage> {
|
||||
Widget keyTimeLimitWidget(){
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true, isHaveDirection: true, action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true, isHaveDirection: true, action:(){
|
||||
// _showDatePicker();
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.failureTime.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, action:(){
|
||||
// _showDatePicker();
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
@ -108,7 +106,7 @@ class _OtherTypeAddKeyPageState extends State<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: (){
|
||||
|
||||
}
|
||||
@ -154,15 +152,16 @@ class _OtherTypeAddKeyPageState extends State<OtherTypeAddKeyPage> {
|
||||
String title;
|
||||
switch (type) {
|
||||
case 0:
|
||||
title = TranslationLoader.lanKeys.card.tr;
|
||||
title = TranslationLoader.lanKeys!.card!.tr;
|
||||
break;
|
||||
case 1:
|
||||
title = TranslationLoader.lanKeys.fingerprint.tr;
|
||||
title = TranslationLoader.lanKeys!.fingerprint!.tr;
|
||||
break;
|
||||
case 2:
|
||||
title = TranslationLoader.lanKeys.remoteControl.tr;
|
||||
title = TranslationLoader.lanKeys!.remoteControl!.tr;
|
||||
break;
|
||||
default:
|
||||
title = "";
|
||||
break;
|
||||
}
|
||||
return title;
|
||||
|
||||
@ -11,7 +11,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class OtherTypeKeyDetailPage extends StatefulWidget {
|
||||
const OtherTypeKeyDetailPage({Key key}) : super(key: key);
|
||||
const OtherTypeKeyDetailPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<OtherTypeKeyDetailPage> createState() => _OtherTypeKeyDetailPageState();
|
||||
@ -20,42 +20,42 @@ class OtherTypeKeyDetailPage extends StatefulWidget {
|
||||
class _OtherTypeKeyDetailPageState extends State<OtherTypeKeyDetailPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var type = ModalRoute.of(context)?.settings?.arguments;
|
||||
var type = ModalRoute.of(context)?.settings.arguments as int;
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: "${getAppBarTitle(type)}${TranslationLoader.lanKeys.number.tr}", haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
appBar: TitleAppBar(barTitle: "${getAppBarTitle(type)}${TranslationLoader.lanKeys!.number!.tr}", haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
TextButton(
|
||||
child: Text(TranslationLoader.lanKeys.share.tr, style: const TextStyle(color: Colors.white),),
|
||||
child: Text(TranslationLoader.lanKeys!.share!.tr, style: const TextStyle(color: Colors.white),),
|
||||
onPressed: (){
|
||||
|
||||
},),
|
||||
],),
|
||||
body: Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:"${getAppBarTitle(type)}${TranslationLoader.lanKeys.number.tr}", rightTitle:"98765432", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
CommonItem(leftTitel:"${getAppBarTitle(type)}${TranslationLoader.lanKeys!.number!.tr}", rightTitle:"98765432", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
showCupertinoAlertDialog(context);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.name.tr, rightTitle:"你好", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.name!.tr, rightTitle:"你好", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
showCupertinoAlertDialog(context);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.periodValidity.tr, rightTitle:"永久", isHaveDirection: true, action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.periodValidity!.tr, rightTitle:"永久", isHaveDirection: true, action:(){
|
||||
Navigator.pushNamed(context, Routers.electronicKeyDetailChangeDate);
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.additive.tr, rightTitle:"15080825640", action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.additive!.tr, rightTitle:"15080825640", action:(){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.addTime.tr, rightTitle:"2020.06.21 11:49", action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.addTime!.tr, rightTitle:"2020.06.21 11:49", action:(){
|
||||
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.operatingRecord.tr, rightTitle:"", isHaveDirection: true, action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.operatingRecord!.tr, rightTitle:"", isHaveDirection: true, action:(){
|
||||
|
||||
}),
|
||||
Container(height: 40.h),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys.delete.tr,
|
||||
btnName: TranslationLoader.lanKeys!.delete!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
@ -69,16 +69,16 @@ class _OtherTypeKeyDetailPageState extends State<OtherTypeKeyDetailPage> {
|
||||
}
|
||||
|
||||
String getAppBarTitle(int type){
|
||||
String title;
|
||||
String title = "";
|
||||
switch (type) {
|
||||
case 0:
|
||||
title = TranslationLoader.lanKeys.card.tr;
|
||||
title = TranslationLoader.lanKeys!.card!.tr;
|
||||
break;
|
||||
case 1:
|
||||
title = TranslationLoader.lanKeys.fingerprint.tr;
|
||||
title = TranslationLoader.lanKeys!.fingerprint!.tr;
|
||||
break;
|
||||
case 2:
|
||||
title = TranslationLoader.lanKeys.remoteControl.tr;
|
||||
title = TranslationLoader.lanKeys!.remoteControl!.tr;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -86,7 +86,7 @@ class _OtherTypeKeyDetailPageState extends State<OtherTypeKeyDetailPage> {
|
||||
return title;
|
||||
}
|
||||
|
||||
Widget commonItem(String leftTitle, String rightTitle, {bool isHaveDirection = false, bool isHaveLine = false, bool isHaveRightWidget = false, Widget rightWidget,Function action}){
|
||||
Widget commonItem(String leftTitle, String rightTitle, {bool isHaveDirection = false, bool isHaveLine = false, bool isHaveRightWidget = false, Widget? rightWidget, Function()? action}){
|
||||
return GestureDetector(
|
||||
onTap: action,
|
||||
child: Column(
|
||||
@ -105,7 +105,7 @@ class _OtherTypeKeyDetailPageState extends State<OtherTypeKeyDetailPage> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
isHaveRightWidget?rightWidget:Text(rightTitle, textAlign: TextAlign.end,style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),)
|
||||
isHaveRightWidget?rightWidget!:Text(rightTitle, textAlign: TextAlign.end,style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@ -10,7 +10,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class OtherTypeKeyListPage extends StatefulWidget {
|
||||
const OtherTypeKeyListPage({Key key}) : super(key: key);
|
||||
const OtherTypeKeyListPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<OtherTypeKeyListPage> createState() => _OtherTypeKeyListPageState();
|
||||
@ -20,12 +20,12 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var type = ModalRoute.of(context)?.settings?.arguments;
|
||||
var type = ModalRoute.of(context)?.settings.arguments as int;
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: getAppBarTitle(type), haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
TextButton(
|
||||
child: Text(TranslationLoader.lanKeys.reset.tr, style: const TextStyle(color: Colors.white),),
|
||||
child: Text(TranslationLoader.lanKeys!.reset!.tr, style: const TextStyle(color: Colors.white),),
|
||||
onPressed: (){
|
||||
|
||||
},),
|
||||
@ -35,7 +35,7 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
|
||||
_searchWidget(),
|
||||
Expanded(child: _buildMainUI(type)),
|
||||
SubmitBtn(
|
||||
btnName: '${TranslationLoader.lanKeys.getTip.tr} ${getAppBarTitle(type)}',
|
||||
btnName: '${TranslationLoader.lanKeys!.getTip!.tr} ${getAppBarTitle(type)}',
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
@ -49,16 +49,16 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
|
||||
}
|
||||
|
||||
String getAppBarTitle(int type){
|
||||
String title;
|
||||
String title = "";
|
||||
switch (type) {
|
||||
case 0:
|
||||
title = TranslationLoader.lanKeys.card.tr;
|
||||
title = TranslationLoader.lanKeys!.card!.tr;
|
||||
break;
|
||||
case 1:
|
||||
title = TranslationLoader.lanKeys.fingerprint.tr;
|
||||
title = TranslationLoader.lanKeys!.fingerprint!.tr;
|
||||
break;
|
||||
case 2:
|
||||
title = TranslationLoader.lanKeys.remoteControl.tr;
|
||||
title = TranslationLoader.lanKeys!.remoteControl!.tr;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -82,7 +82,7 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(
|
||||
top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
|
||||
hintText: TranslationLoader.lanKeys.pleaseEnter.tr,
|
||||
hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
//左边图标设置
|
||||
@ -106,7 +106,7 @@ class _OtherTypeKeyListPageState extends State<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(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
|
||||
@ -7,7 +7,7 @@ import '../../../../translations/trans_lib.dart';
|
||||
import 'otherTypeKeyManage_tabbar.dart';
|
||||
|
||||
class OtherTypeKeyManagePage extends StatefulWidget {
|
||||
const OtherTypeKeyManagePage({Key key}) : super(key: key);
|
||||
const OtherTypeKeyManagePage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<OtherTypeKeyManagePage> createState() => _OtherTypeKeyManagePageState();
|
||||
@ -18,10 +18,10 @@ class _OtherTypeKeyManagePageState extends State<OtherTypeKeyManagePage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var lockType = ModalRoute.of(context)?.settings?.arguments;
|
||||
var lockType = ModalRoute.of(context)?.settings.arguments as int;
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys.addTip.tr} ${getAppBarTitle(lockType)}", haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.addTip!.tr} ${getAppBarTitle(lockType)}", haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
OtherTypeKeyManageTabbar(initialIndex: index, lockType: lockType),
|
||||
@ -31,16 +31,16 @@ class _OtherTypeKeyManagePageState extends State<OtherTypeKeyManagePage> {
|
||||
}
|
||||
|
||||
String getAppBarTitle(int type){
|
||||
String title;
|
||||
String title = "";
|
||||
switch (type) {
|
||||
case 0:
|
||||
title = TranslationLoader.lanKeys.card.tr;
|
||||
title = TranslationLoader.lanKeys!.card!.tr;
|
||||
break;
|
||||
case 1:
|
||||
title = TranslationLoader.lanKeys.fingerprint.tr;
|
||||
title = TranslationLoader.lanKeys!.fingerprint!.tr;
|
||||
break;
|
||||
case 2:
|
||||
title = TranslationLoader.lanKeys.remoteControl.tr;
|
||||
title = TranslationLoader.lanKeys!.remoteControl!.tr;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@ -10,19 +10,19 @@ import '../otherTypeAddKey/otherTypeAddKey_page.dart';
|
||||
class OtherTypeKeyManageTabbar extends StatefulWidget {
|
||||
var initialIndex=1;
|
||||
var lockType=0;
|
||||
OtherTypeKeyManageTabbar({Key key, @required this.initialIndex, @required this.lockType}) : super(key: key);
|
||||
OtherTypeKeyManageTabbar({Key? key, required this.initialIndex, required this.lockType}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<OtherTypeKeyManageTabbar> createState() => _OtherTypeKeyManageTabbarState();
|
||||
}
|
||||
|
||||
class _OtherTypeKeyManageTabbarState extends State<OtherTypeKeyManageTabbar> with SingleTickerProviderStateMixin {
|
||||
TabController _tabController;
|
||||
late TabController _tabController;
|
||||
|
||||
final List<ItemView> _itemTabs = <ItemView>[
|
||||
ItemView(title: TranslationLoader.lanKeys.permanent.tr, seletType: "0"),
|
||||
ItemView(title: TranslationLoader.lanKeys.timeLimit.tr, seletType: "1"),
|
||||
ItemView(title: TranslationLoader.lanKeys.circulation.tr, seletType: "2"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, seletType: "0"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, seletType: "1"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, seletType: "2"),
|
||||
];
|
||||
|
||||
@override
|
||||
@ -74,7 +74,7 @@ class _OtherTypeKeyManageTabbarState extends State<OtherTypeKeyManageTabbar> wit
|
||||
}
|
||||
|
||||
class ItemView {
|
||||
const ItemView({@required this.title, @required this.seletType});
|
||||
const ItemView({required this.title, required this.seletType});
|
||||
|
||||
final String title;
|
||||
final String seletType;
|
||||
|
||||
@ -11,7 +11,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class PasswordKeyDetailPage extends StatefulWidget {
|
||||
const PasswordKeyDetailPage({Key key}) : super(key: key);
|
||||
const PasswordKeyDetailPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<PasswordKeyDetailPage> createState() => _PasswordKeyDetailPageState();
|
||||
@ -22,7 +22,7 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.passwordDetail.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.passwordDetail!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
TextButton(
|
||||
child: const Text("分享", style: TextStyle(color: Colors.white),),
|
||||
onPressed: (){
|
||||
@ -31,29 +31,29 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
|
||||
],),
|
||||
body: Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.password.tr, rightTitle:"98765432", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.password!.tr, rightTitle:"98765432", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
showCupertinoAlertDialog(context);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.name.tr, rightTitle:"你好", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.name!.tr, rightTitle:"你好", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
showCupertinoAlertDialog(context);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"永久", isHaveDirection: true, action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"永久", isHaveDirection: true, action:(){
|
||||
Navigator.pushNamed(context, Routers.electronicKeyDetailChangeDate);
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.sender.tr, rightTitle:"15080825640", action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.sender!.tr, rightTitle:"15080825640", action:(){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.senderTime.tr, rightTitle:"2020.06.21 11:49", action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.senderTime!.tr, rightTitle:"2020.06.21 11:49", action:(){
|
||||
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.operatingRecord.tr, rightTitle:"", isHaveDirection: true, action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.operatingRecord!.tr, rightTitle:"", isHaveDirection: true, action:(){
|
||||
|
||||
}),
|
||||
Container(height: 40.h),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys.delete.tr,
|
||||
btnName: TranslationLoader.lanKeys!.delete!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
@ -66,7 +66,7 @@ class _PasswordKeyDetailPageState extends State<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(
|
||||
onTap: action,
|
||||
child: Column(
|
||||
@ -85,7 +85,7 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
isHaveRightWidget?rightWidget:Text(rightTitle, textAlign: TextAlign.end,style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),)
|
||||
isHaveRightWidget?rightWidget!:Text(rightTitle, textAlign: TextAlign.end,style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),)
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -108,7 +108,7 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
|
||||
return Card(
|
||||
color: const Color(0x00FFFFFF),
|
||||
child: CupertinoAlertDialog(
|
||||
title: Text("${TranslationLoader.lanKeys.amend.tr} ${TranslationLoader.lanKeys.password.tr}"),
|
||||
title: Text("${TranslationLoader.lanKeys!.amend!.tr} ${TranslationLoader.lanKeys!.password!.tr}"),
|
||||
content: Column(
|
||||
children: <Widget>[
|
||||
const SizedBox(height: 10,),
|
||||
@ -125,7 +125,7 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
|
||||
//输入里面输入文字内边距设置
|
||||
// contentPadding: const EdgeInsets.only(
|
||||
// top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
|
||||
hintText: TranslationLoader.lanKeys.pleaseEnter.tr,
|
||||
hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
//左边图标设置
|
||||
@ -153,14 +153,14 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
|
||||
),
|
||||
actions: <Widget>[
|
||||
CupertinoDialogAction(
|
||||
child: Text(TranslationLoader.lanKeys.cancel.tr),
|
||||
child: Text(TranslationLoader.lanKeys!.cancel!.tr),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
// print("取消");
|
||||
},
|
||||
),
|
||||
CupertinoDialogAction(
|
||||
child: Text(TranslationLoader.lanKeys.sure.tr),
|
||||
child: Text(TranslationLoader.lanKeys!.sure!.tr),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
// print("确定");
|
||||
|
||||
@ -9,7 +9,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class PasswordKeyListPage extends StatefulWidget {
|
||||
const PasswordKeyListPage({Key key}) : super(key: key);
|
||||
const PasswordKeyListPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<PasswordKeyListPage> createState() => _PasswordKeyListPageState();
|
||||
@ -20,9 +20,9 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.password.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.password!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
TextButton(
|
||||
child: Text(TranslationLoader.lanKeys.reset.tr, style: TextStyle(color: Colors.white),),
|
||||
child: Text(TranslationLoader.lanKeys!.reset!.tr, style: const TextStyle(color: Colors.white),),
|
||||
onPressed: (){
|
||||
|
||||
},),
|
||||
@ -32,7 +32,7 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
|
||||
_searchWidget(),
|
||||
Expanded(child: _buildMainUI()),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys.getPassword.tr,
|
||||
btnName: TranslationLoader.lanKeys!.getPassword!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
@ -61,7 +61,7 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(
|
||||
top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
|
||||
hintText: TranslationLoader.lanKeys.pleaseEnter.tr,
|
||||
hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
//左边图标设置
|
||||
@ -85,7 +85,7 @@ class _PasswordKeyListPageState extends State<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(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
|
||||
@ -8,7 +8,7 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class PasswordKeyManagePage extends StatefulWidget {
|
||||
const PasswordKeyManagePage({Key key}) : super(key: key);
|
||||
const PasswordKeyManagePage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<PasswordKeyManagePage> createState() => _PasswordKeyManagePageState();
|
||||
@ -21,7 +21,7 @@ class _PasswordKeyManagePageState extends State<PasswordKeyManagePage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.getPassword.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.getPassword!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
PasswordKeyManageTabbarPage(initialIndex: index,),
|
||||
|
||||
@ -10,21 +10,21 @@ import '../passwordKey_Perpetual/passwordKey_perpetual_page.dart';
|
||||
class PasswordKeyManageTabbarPage extends StatefulWidget {
|
||||
var initialIndex=1;
|
||||
|
||||
PasswordKeyManageTabbarPage({Key key, @required this.initialIndex}) : super(key: key);
|
||||
PasswordKeyManageTabbarPage({Key? key, required this.initialIndex}) : super(key: key);
|
||||
@override
|
||||
State<PasswordKeyManageTabbarPage> createState() => _PasswordKeyManageTabbarPageState();
|
||||
}
|
||||
|
||||
class _PasswordKeyManageTabbarPageState extends State<PasswordKeyManageTabbarPage> with SingleTickerProviderStateMixin {
|
||||
TabController _tabController;
|
||||
late TabController _tabController;
|
||||
|
||||
final List<ItemView> _itemTabs = <ItemView>[
|
||||
ItemView(title: TranslationLoader.lanKeys.permanent.tr, type: "0"),
|
||||
ItemView(title: TranslationLoader.lanKeys.timeLimit.tr, type: "1"),
|
||||
ItemView(title: TranslationLoader.lanKeys.once.tr, type: "2"),
|
||||
ItemView(title: TranslationLoader.lanKeys.custom.tr, type: "3"),
|
||||
ItemView(title: TranslationLoader.lanKeys.circulation.tr, type: "4"),
|
||||
ItemView(title: TranslationLoader.lanKeys.clearAll.tr, type: "5"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: "0"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: "1"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.once!.tr, type: "2"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.custom!.tr, type: "3"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, type: "4"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.clearAll!.tr, type: "5"),
|
||||
];
|
||||
|
||||
@override
|
||||
@ -84,7 +84,7 @@ class _PasswordKeyManageTabbarPageState extends State<PasswordKeyManageTabbarPag
|
||||
}
|
||||
|
||||
class ItemView {
|
||||
const ItemView({@required this.title, @required this.type});
|
||||
const ItemView({required this.title, required this.type});
|
||||
|
||||
final String title;
|
||||
final String type;
|
||||
|
||||
@ -11,7 +11,7 @@ import '../../../../translations/trans_lib.dart';
|
||||
class PasswordKeyPerpetualPage extends StatefulWidget {
|
||||
final String type;
|
||||
|
||||
const PasswordKeyPerpetualPage({Key key, @required this.type}) : super(key: key);
|
||||
const PasswordKeyPerpetualPage({Key? key, required this.type}) : super(key: key);
|
||||
@override
|
||||
State<PasswordKeyPerpetualPage> createState() => _PasswordKeyPerpetualPageState();
|
||||
}
|
||||
@ -40,8 +40,8 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
||||
// return sendElectronicKeySucceed();
|
||||
return Column(
|
||||
children: [
|
||||
perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseNameYourPassword.tr, _controller),
|
||||
keyBottomWidget(TranslationLoader.lanKeys.getPasswordTip1.tr)
|
||||
perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, _controller),
|
||||
keyBottomWidget(TranslationLoader.lanKeys!.getPasswordTip1!.tr)
|
||||
],
|
||||
);
|
||||
}
|
||||
@ -52,8 +52,8 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
||||
return Column(
|
||||
children: [
|
||||
keyTimeLimitWidget(),
|
||||
perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseNameYourPassword.tr, _controller),
|
||||
keyBottomWidget(TranslationLoader.lanKeys.getPasswordTip2.tr)
|
||||
perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, _controller),
|
||||
keyBottomWidget(TranslationLoader.lanKeys!.getPasswordTip2!.tr)
|
||||
],
|
||||
);
|
||||
}
|
||||
@ -63,8 +63,8 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
||||
// 单次
|
||||
return Column(
|
||||
children: [
|
||||
perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseNameYourPassword.tr, _controller),
|
||||
keyBottomWidget(TranslationLoader.lanKeys.getPasswordTip3.tr)
|
||||
perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, _controller),
|
||||
keyBottomWidget(TranslationLoader.lanKeys!.getPasswordTip3!.tr)
|
||||
],
|
||||
);
|
||||
}
|
||||
@ -75,9 +75,9 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
||||
return Column(
|
||||
children: [
|
||||
keyIfPerpetualWidget(),
|
||||
perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseNameYourPassword.tr, _controller),
|
||||
perpetualKeyWidget(TranslationLoader.lanKeys.password.tr, "请输入6-9位数字", _controller),
|
||||
keyBottomWidget(TranslationLoader.lanKeys.getPasswordTip4.tr)
|
||||
perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, _controller),
|
||||
perpetualKeyWidget(TranslationLoader.lanKeys!.password!.tr, "请输入6-9位数字", _controller),
|
||||
keyBottomWidget(TranslationLoader.lanKeys!.getPasswordTip4!.tr)
|
||||
],
|
||||
);
|
||||
}
|
||||
@ -88,8 +88,8 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
||||
return Column(
|
||||
children: [
|
||||
keyCirculationWidget(),
|
||||
perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseNameYourPassword.tr, _controller),
|
||||
keyBottomWidget(TranslationLoader.lanKeys.getPasswordTip5.tr)
|
||||
perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, _controller),
|
||||
keyBottomWidget(TranslationLoader.lanKeys!.getPasswordTip5!.tr)
|
||||
],
|
||||
);
|
||||
}
|
||||
@ -99,13 +99,14 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
||||
// 清空
|
||||
return Column(
|
||||
children: [
|
||||
perpetualKeyWidget(TranslationLoader.lanKeys.name.tr, TranslationLoader.lanKeys.pleaseNameYourPassword.tr, _controller),
|
||||
keyBottomWidget(TranslationLoader.lanKeys.getPasswordTip6.tr)
|
||||
perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, _controller),
|
||||
keyBottomWidget(TranslationLoader.lanKeys!.getPasswordTip6!.tr)
|
||||
],
|
||||
);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return Container();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -125,10 +126,10 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
||||
Widget keyTimeLimitWidget(){
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true, isHaveDirection: true, action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true, isHaveDirection: true, action:(){
|
||||
// _showDatePicker();
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.failureTime.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, action:(){
|
||||
// _showDatePicker();
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
@ -140,7 +141,7 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
||||
Widget keyIfPerpetualWidget(){
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.permanent.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch()), action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.permanent!.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch()), action:(){
|
||||
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
@ -152,13 +153,13 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
||||
Widget keyCirculationWidget(){
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.recursiveDevice.tr, rightTitle:"周末", isHaveLine: true, isHaveDirection: true, action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.recursiveDevice!.tr, rightTitle:"周末", isHaveLine: true, isHaveDirection: true, action:(){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.effectiveTime.tr, rightTitle:"10:00", isHaveLine: true, isHaveDirection: true, action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"10:00", isHaveLine: true, isHaveDirection: true, action:(){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.failureTime.tr, rightTitle:"11:00", isHaveDirection: true, action:(){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"11:00", isHaveDirection: true, action:(){
|
||||
|
||||
}),
|
||||
],
|
||||
@ -177,7 +178,7 @@ class _PasswordKeyPerpetualPageState extends State<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: (){
|
||||
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ import '../../tools/titleAppBar.dart';
|
||||
import '../../translations/trans_lib.dart';
|
||||
|
||||
class StarLockMain extends StatefulWidget {
|
||||
const StarLockMain({Key key}) : super(key: key);
|
||||
const StarLockMain({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StarLockMain> createState() => _StarLockMainState();
|
||||
@ -22,7 +22,7 @@ class _StarLockMainState extends State<StarLockMain> with BaseWidget{
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: const Color(0xFFF5F5F5),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.starLock.tr, haveBack:false, haveOtherLeftWidget: true, leftWidget: Builder(
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.starLock!.tr, haveBack:false, haveOtherLeftWidget: true, leftWidget: Builder(
|
||||
builder: (context) => IconButton(
|
||||
icon: Image.asset("images/main/mainLeft_menu_icon.png",color:Colors.white, width: 60.w, height: 60.w,),
|
||||
onPressed: () {
|
||||
@ -50,7 +50,7 @@ class _StarLockMainState extends State<StarLockMain> with BaseWidget{
|
||||
);
|
||||
}
|
||||
|
||||
Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function action){
|
||||
Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function() action){
|
||||
return GestureDetector(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
@ -131,7 +131,7 @@ class _StarLockMainState extends State<StarLockMain> with BaseWidget{
|
||||
SizedBox(height: h(50.h),),
|
||||
Container(
|
||||
padding: EdgeInsets.all(30.w),
|
||||
child: Text(TranslationLoader.lanKeys.whenAddingLockThePhoneMustBeNextToTheLock.tr, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w800, color: AppColors.mainColor),)
|
||||
child: Text(TranslationLoader.lanKeys!.whenAddingLockThePhoneMustBeNextToTheLock!.tr, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w800, color: AppColors.mainColor),)
|
||||
)
|
||||
],
|
||||
);
|
||||
|
||||
@ -10,7 +10,7 @@ import '../../../tools/titleAppBar.dart';
|
||||
import '../../../translations/trans_lib.dart';
|
||||
|
||||
class AddLockPage extends StatefulWidget {
|
||||
const AddLockPage({Key key}) : super(key: key);
|
||||
const AddLockPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<AddLockPage> createState() => _AddLockPageState();
|
||||
@ -22,7 +22,7 @@ class _AddLockPageState extends State<AddLockPage> with BaseWidget{
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.addLock.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.addLock!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
// mainAxisAlignment: MainAxisAlignment.center,
|
||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||
@ -31,7 +31,7 @@ class _AddLockPageState extends State<AddLockPage> with BaseWidget{
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(TranslationLoader.lanKeys.lightTouchScreen.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),),
|
||||
Text(TranslationLoader.lanKeys!.lightTouchScreen!.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 120.h,),
|
||||
@ -40,12 +40,12 @@ class _AddLockPageState extends State<AddLockPage> with BaseWidget{
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(TranslationLoader.lanKeys.lightTouchScreenTip.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),),
|
||||
Text(TranslationLoader.lanKeys!.lightTouchScreenTip!.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 120.h,),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys.next.tr,
|
||||
btnName: TranslationLoader.lanKeys!.next!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
|
||||
@ -8,7 +8,7 @@ import '../../../tools/titleAppBar.dart';
|
||||
import '../../../translations/trans_lib.dart';
|
||||
|
||||
class LockAddressPage extends StatefulWidget {
|
||||
const LockAddressPage({Key key}) : super(key: key);
|
||||
const LockAddressPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<LockAddressPage> createState() => _LockAddressPageState();
|
||||
|
||||
@ -7,7 +7,7 @@ import '../../../tools/titleAppBar.dart';
|
||||
import '../../../translations/trans_lib.dart';
|
||||
|
||||
class NearbyLockPage extends StatefulWidget {
|
||||
const NearbyLockPage({Key key}) : super(key: key);
|
||||
const NearbyLockPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<NearbyLockPage> createState() => _NearbyLockPageState();
|
||||
@ -18,7 +18,7 @@ class _NearbyLockPageState extends State<NearbyLockPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.nearbyLock.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.nearbyLock!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body: ListView.builder(
|
||||
itemCount:20,
|
||||
itemBuilder: (c, index){
|
||||
@ -30,7 +30,7 @@ class _NearbyLockPageState extends State<NearbyLockPage> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function action){
|
||||
Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function() action){
|
||||
return GestureDetector(
|
||||
onTap: action,
|
||||
child: Column(
|
||||
|
||||
@ -8,7 +8,7 @@ import '../../../tools/titleAppBar.dart';
|
||||
import '../../../translations/trans_lib.dart';
|
||||
|
||||
class SaveLockPage extends StatefulWidget {
|
||||
const SaveLockPage({Key key}) : super(key: key);
|
||||
const SaveLockPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<SaveLockPage> createState() => _SaveLockPageState();
|
||||
@ -19,7 +19,7 @@ class _SaveLockPageState extends State<SaveLockPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.addLock.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.addLock!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
// mainAxisAlignment: MainAxisAlignment.center,
|
||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||
@ -28,7 +28,7 @@ class _SaveLockPageState extends State<SaveLockPage> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(TranslationLoader.lanKeys.addSuccessfullyPleaseRename.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),),
|
||||
Text(TranslationLoader.lanKeys!.addSuccessfullyPleaseRename!.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 80.h,),
|
||||
@ -75,7 +75,7 @@ class _SaveLockPageState extends State<SaveLockPage> {
|
||||
),
|
||||
SizedBox(height: 120.h,),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys.sure.tr,
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(
|
||||
left: 50.w,
|
||||
|
||||
@ -9,7 +9,7 @@ import '../../../tools/titleAppBar.dart';
|
||||
import '../../../translations/trans_lib.dart';
|
||||
|
||||
class SeletLockTypePage extends StatefulWidget {
|
||||
const SeletLockTypePage({Key key}) : super(key: key);
|
||||
const SeletLockTypePage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<SeletLockTypePage> createState() => _SeletLockTypePageState();
|
||||
@ -20,7 +20,7 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget{
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.addLock.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.addLock!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
allLock(),
|
||||
@ -33,25 +33,25 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget{
|
||||
crossAxisSpacing: 10,
|
||||
mainAxisSpacing: 10,
|
||||
children: [
|
||||
lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys.doorLock.tr, (){
|
||||
lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys!.doorLock!.tr, (){
|
||||
Navigator.pushNamed(context, Routers.addLockPage);
|
||||
}),
|
||||
lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys.padlock.tr, (){
|
||||
lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys!.padlock!.tr, (){
|
||||
Navigator.pushNamed(context, Routers.addLockPage);
|
||||
}),
|
||||
lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys.safeLock.tr, (){
|
||||
lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys!.safeLock!.tr, (){
|
||||
Navigator.pushNamed(context, Routers.addLockPage);
|
||||
}),
|
||||
lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys.intelligentLockCore.tr, (){
|
||||
lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys!.intelligentLockCore!.tr, (){
|
||||
Navigator.pushNamed(context, Routers.addLockPage);
|
||||
}),
|
||||
lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys.parkingLock.tr, (){
|
||||
lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys!.parkingLock!.tr, (){
|
||||
Navigator.pushNamed(context, Routers.addLockPage);
|
||||
}),
|
||||
lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys.bicycleLock.tr, (){
|
||||
lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys!.bicycleLock!.tr, (){
|
||||
Navigator.pushNamed(context, Routers.addLockPage);
|
||||
}),
|
||||
lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys.longRangeControl.tr, (){
|
||||
lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys!.longRangeControl!.tr, (){
|
||||
Navigator.pushNamed(context, Routers.addLockPage);
|
||||
}),
|
||||
],
|
||||
@ -72,7 +72,7 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget{
|
||||
child: Container(
|
||||
height: 150.h,
|
||||
color: Colors.white,
|
||||
margin: EdgeInsets.all(10),
|
||||
margin: const EdgeInsets.all(10),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width:40.w),
|
||||
@ -83,8 +83,8 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget{
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(TranslationLoader.lanKeys.allLock.tr, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w500)),
|
||||
Text(TranslationLoader.lanKeys.searchAllLockType.tr, style: TextStyle(fontSize: 26.sp, fontWeight: FontWeight.w500)),
|
||||
Text(TranslationLoader.lanKeys!.allLock!.tr, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w500)),
|
||||
Text(TranslationLoader.lanKeys!.searchAllLockType!.tr, style: TextStyle(fontSize: 26.sp, fontWeight: FontWeight.w500)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -97,7 +97,7 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget{
|
||||
);
|
||||
}
|
||||
|
||||
Widget lockTypeItem(String lockTypeIcon, String lockTypeTitle, Function action){
|
||||
Widget lockTypeItem(String lockTypeIcon, String lockTypeTitle, Function() action){
|
||||
return GestureDetector(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
|
||||
@ -10,7 +10,7 @@ import '../../translations/trans_lib.dart';
|
||||
import 'mineMultiLanguage_logic.dart';
|
||||
|
||||
class MineMultiLanguagePage extends StatefulWidget {
|
||||
const MineMultiLanguagePage({Key key}) : super(key: key);
|
||||
const MineMultiLanguagePage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<MineMultiLanguagePage> createState() => _MineMultiLanguagePageState();
|
||||
@ -26,7 +26,7 @@ class _MineMultiLanguagePageState extends State<MineMultiLanguagePage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.multilingual.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.multilingual!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
|
||||
@ -11,14 +11,14 @@ class MineMultiLanguageState {
|
||||
return appDept.deptSupportedLocales;
|
||||
}
|
||||
|
||||
var currentLanguageType = ExtensionLanguageType.fromLanguageCode(Get.locale.languageCode).obs;
|
||||
var currentLanguageType = ExtensionLanguageType.fromLanguageCode(Get.locale!.languageCode).obs;
|
||||
|
||||
AppLanuageConfigState() {
|
||||
resetLan();
|
||||
}
|
||||
|
||||
void resetLan() {
|
||||
currentLanguageType.value = ExtensionLanguageType.fromLanguageCode(Get.locale.languageCode);
|
||||
StoreService.to.saveLanguageCode(Get.locale.languageCode);
|
||||
currentLanguageType.value = ExtensionLanguageType.fromLanguageCode(Get.locale!.languageCode);
|
||||
StoreService.to.saveLanguageCode(Get.locale!.languageCode);
|
||||
}
|
||||
}
|
||||
@ -10,7 +10,7 @@ import '../../tools/titleAppBar.dart';
|
||||
import '../../translations/trans_lib.dart';
|
||||
|
||||
class MineSetPage extends StatefulWidget {
|
||||
const MineSetPage({Key key}) : super(key: key);
|
||||
const MineSetPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<MineSetPage> createState() => _MineSetPageState();
|
||||
@ -21,107 +21,107 @@ class _MineSetPageState extends State<MineSetPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys.moreSet.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.moreSet!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: ListView(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.prompTone.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.touchUnlock.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.pushNotification.tr, rightTitle:"", isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.prompTone!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.touchUnlock!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.pushNotification!.tr, rightTitle:"", isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
|
||||
SizedBox(height: 10.h,),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.lockUserManagement.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.lockUserManagement!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.authorizedAdmin.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.authorizedAdmin!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.lockGroup.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.lockGroup!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.transferSmartLock.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.transferSmartLock!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.transferGateway.tr, rightTitle:"", isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.transferGateway!.tr, rightTitle:"", isHaveDirection: true, action: (){
|
||||
|
||||
}),
|
||||
SizedBox(height: 10.h,),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.multiLanguage.tr, rightTitle:"简体中文", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.multiLanguage!.tr, rightTitle:"简体中文", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.mineMultiLanguagePage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.lockScreen.tr, rightTitle:TranslationLoader.lanKeys.opened.tr, isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.lockScreen!.tr, rightTitle:TranslationLoader.lanKeys!.opened!.tr, isHaveLine: true, isHaveDirection: true, action: (){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.hideInvalidUnlockPermissions.tr, rightTitle:TranslationLoader.lanKeys.closed.tr, isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.hideInvalidUnlockPermissions!.tr, rightTitle:TranslationLoader.lanKeys!.closed!.tr, isHaveLine: true, isHaveDirection: true, action: (){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.appUnlockRequiresMobilePhoneAccessToTheLock.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.appUnlockRequiresMobilePhoneAccessToTheLock!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.valueAddedServices.tr, rightTitle:"", isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.valueAddedServices!.tr, rightTitle:"", isHaveDirection: true, action: (){
|
||||
|
||||
}),
|
||||
SizedBox(height: 10.h,),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.about.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.about!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
|
||||
}),
|
||||
SizedBox(height: 10.h,),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.userAgreement.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.userAgreement!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.privacyPolicy.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.privacyPolicy!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.personalInformationCollectionList.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.personalInformationCollectionList!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.applicationPermissionDescription.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.applicationPermissionDescription!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys.thirdPartyInformationSharingList.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.thirdPartyInformationSharingList!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
|
||||
}),
|
||||
],
|
||||
),
|
||||
),
|
||||
keyBottomWidget()
|
||||
// keyBottomWidget()
|
||||
],
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Widget keyBottomWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys.logout.tr,
|
||||
borderRadius: 20.w,
|
||||
fontSize: 32.sp,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w),
|
||||
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
|
||||
onClick: () {
|
||||
|
||||
}
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.only(right: 30.w),
|
||||
// color: Colors.red,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
TextButton(
|
||||
child: Text( TranslationLoader.lanKeys.deleteAccount.tr, style: TextStyle(color: AppColors.mainColor, fontWeight: FontWeight.w500),),
|
||||
onPressed: () {
|
||||
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 30.h,)
|
||||
],
|
||||
);
|
||||
}
|
||||
// Widget keyBottomWidget() {
|
||||
// return Column(
|
||||
// children: [
|
||||
// SubmitBtn(btnName: TranslationLoader.lanKeys!.logout!.tr,
|
||||
// borderRadius: 20.w,
|
||||
// fontSize: 32.sp,
|
||||
// margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w),
|
||||
// padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
|
||||
// onClick: () {
|
||||
//
|
||||
// }
|
||||
// ),
|
||||
// Container(
|
||||
// padding: EdgeInsets.only(right: 30.w),
|
||||
// // color: Colors.red,
|
||||
// child: Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.end,
|
||||
// children: [
|
||||
// TextButton(
|
||||
// child: Text( TranslationLoader.lanKeys!.deleteAccount!.tr, style: TextStyle(color: AppColors.mainColor, fontWeight: FontWeight.w500),),
|
||||
// onPressed: () {
|
||||
//
|
||||
// },
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// SizedBox(height: 30.h,)
|
||||
// ],
|
||||
// );
|
||||
// }
|
||||
|
||||
Switch _switch(){
|
||||
return Switch(
|
||||
|
||||
@ -6,11 +6,12 @@ import 'package:get/get.dart';
|
||||
import '../appRouters.dart';
|
||||
import '../app_settings/app_colors.dart';
|
||||
import '../baseWidget.dart';
|
||||
import '../tools/submitBtn.dart';
|
||||
import '../tools/titleAppBar.dart';
|
||||
import '../translations/trans_lib.dart';
|
||||
|
||||
class StarLockMinePage extends StatefulWidget {
|
||||
const StarLockMinePage({Key key}) : super(key: key);
|
||||
const StarLockMinePage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StarLockMinePage> createState() => _StarLockMinePageState();
|
||||
@ -26,7 +27,9 @@ class _StarLockMinePageState extends State<StarLockMinePage> with BaseWidget{
|
||||
body: Column(
|
||||
children: [
|
||||
topWidget(),
|
||||
bottomListWidget()
|
||||
bottomListWidget(),
|
||||
SizedBox(height: 40.h,),
|
||||
keyBottomWidget()
|
||||
],
|
||||
),
|
||||
);
|
||||
@ -68,24 +71,30 @@ class _StarLockMinePageState extends State<StarLockMinePage> with BaseWidget{
|
||||
Widget bottomListWidget(){
|
||||
return Expanded(
|
||||
child: ListView(
|
||||
padding: EdgeInsets.only(left: 110.w, top: 80.h, right: 10.w),
|
||||
padding: EdgeInsets.only(left: 70.w, top: 50.h, right: 10.w),
|
||||
children: <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);
|
||||
}),
|
||||
mineItem('images/mine/icon_mine_main_gateway.png', TranslationLoader.lanKeys.gateway.tr, (){
|
||||
mineItem('images/mine/icon_mine_main_addLock.png', TranslationLoader.lanKeys!.addLock!.tr, (){
|
||||
Navigator.pushNamed(context, Routers.seletLockTypePage);
|
||||
}),
|
||||
mineItem('images/mine/icon_mine_main_gateway.png', TranslationLoader.lanKeys!.gateway!.tr, (){
|
||||
|
||||
}),
|
||||
mineItem('images/mine/icon_mine_main_message.png', TranslationLoader.lanKeys.message.tr, (){
|
||||
mineItem('images/mine/icon_mine_main_message.png', TranslationLoader.lanKeys!.message!.tr, (){
|
||||
|
||||
}),
|
||||
mineItem('images/mine/icon_mine_main_supportStaff.png', TranslationLoader.lanKeys.supportStaff.tr, (){
|
||||
mineItem('images/mine/icon_mine_main_supportStaff.png', TranslationLoader.lanKeys!.supportStaff!.tr, (){
|
||||
|
||||
}),
|
||||
mineItem('images/mine/icon_mine_main_set.png', TranslationLoader.lanKeys.set.tr, (){
|
||||
mineItem('images/mine/icon_mine_main_set.png', TranslationLoader.lanKeys!.set!.tr, (){
|
||||
Navigator.pushNamed(context, Routers.mineSetPage);
|
||||
}),
|
||||
mineItem('images/mine/icon_mine_main_moreServices.png', TranslationLoader.lanKeys.moreServices.tr, (){
|
||||
mineItem('images/mine/icon_mine_main_vip.png', TranslationLoader.lanKeys!.valueAddedServices!.tr, (){
|
||||
|
||||
}),
|
||||
mineItem('images/mine/icon_mine_main_about.png', TranslationLoader.lanKeys!.about!.tr, (){
|
||||
|
||||
}),
|
||||
],
|
||||
@ -93,7 +102,39 @@ class _StarLockMinePageState extends State<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(
|
||||
onTap: action,
|
||||
child: Row(
|
||||
@ -101,7 +142,7 @@ class _StarLockMinePageState extends State<StarLockMinePage> with BaseWidget{
|
||||
Center(
|
||||
child: Container(
|
||||
height: 80.h,
|
||||
width: 300.w,
|
||||
// width: 300.w,
|
||||
color: Colors.white,
|
||||
child: Row(
|
||||
children: [
|
||||
|
||||
@ -7,7 +7,7 @@ import 'app_settings/app_colors.dart';
|
||||
import 'main/lockMian/lockMain_page.dart';
|
||||
|
||||
class NavPages extends StatefulWidget {
|
||||
const NavPages({Key key}) : super(key: key);
|
||||
const NavPages({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<NavPages> createState() => _NavPagesState();
|
||||
|
||||
@ -4,7 +4,7 @@ import 'package:flutter/material.dart';
|
||||
import 'navPages.dart';
|
||||
|
||||
class StarLockApplication extends StatefulWidget {
|
||||
const StarLockApplication({Key key}) : super(key: key);
|
||||
const StarLockApplication({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StarLockApplication> createState() => _StarLockApplicationState();
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
// ------------------------------------------------------
|
||||
// author:AllenSu
|
||||
@ -9,10 +8,10 @@ import 'package:flutter/widgets.dart';
|
||||
// ------------------------------------------------------
|
||||
|
||||
class CustomUnderlineTabIndicator extends Decoration {
|
||||
final BorderSide borderSide;
|
||||
final EdgeInsetsGeometry insets;
|
||||
final StrokeCap strokeCap; // 控制器的边角形状
|
||||
final double width; // 控制器的宽度
|
||||
final BorderSide? borderSide;
|
||||
final EdgeInsetsGeometry? insets;
|
||||
final StrokeCap? strokeCap; // 控制器的边角形状
|
||||
final double? width; // 控制器的宽度
|
||||
|
||||
const CustomUnderlineTabIndicator({
|
||||
this.borderSide = const BorderSide(width: 2, color: Colors.white),
|
||||
@ -23,21 +22,21 @@ class CustomUnderlineTabIndicator extends Decoration {
|
||||
assert(insets != null);
|
||||
|
||||
@override
|
||||
Decoration lerpFrom(Decoration a, double t) {
|
||||
Decoration? lerpFrom(Decoration? a, double t) {
|
||||
if (a is CustomUnderlineTabIndicator) {
|
||||
return CustomUnderlineTabIndicator(
|
||||
borderSide: BorderSide.lerp(a.borderSide, borderSide, t),
|
||||
insets: EdgeInsetsGeometry.lerp(a.insets, insets, t),
|
||||
borderSide: BorderSide.lerp(a.borderSide!, borderSide!, t),
|
||||
insets: EdgeInsetsGeometry.lerp(a.insets!, insets!, t),
|
||||
);
|
||||
}
|
||||
return super.lerpFrom(a, t);
|
||||
return lerpFrom(a, t);
|
||||
}
|
||||
|
||||
@override
|
||||
Decoration lerpTo(Decoration b, double t) {
|
||||
Decoration? lerpTo(Decoration? b, double t) {
|
||||
if (b is CustomUnderlineTabIndicator) {
|
||||
return CustomUnderlineTabIndicator(
|
||||
borderSide: BorderSide.lerp(borderSide, b.borderSide, t),
|
||||
borderSide: BorderSide.lerp(borderSide!, b.borderSide!, t),
|
||||
insets: EdgeInsetsGeometry.lerp(insets, b.insets, t),
|
||||
);
|
||||
}
|
||||
@ -45,8 +44,8 @@ class CustomUnderlineTabIndicator extends Decoration {
|
||||
}
|
||||
|
||||
@override
|
||||
_UnderlinePainter createBoxPainter([VoidCallback onChanged]) {
|
||||
return _UnderlinePainter(this, onChanged);
|
||||
_UnderlinePainter createBoxPainter([VoidCallback? onChanged]) {
|
||||
return _UnderlinePainter(this, onChanged!);
|
||||
}
|
||||
|
||||
@override
|
||||
@ -54,18 +53,18 @@ class CustomUnderlineTabIndicator extends Decoration {
|
||||
return Path()..addRect(_indicatorRectFor(rect, textDirection));
|
||||
}
|
||||
|
||||
Rect _indicatorRectFor(Rect rect, TextDirection textDirection) {
|
||||
Rect _indicatorRectFor(Rect? rect, TextDirection? textDirection) {
|
||||
assert(rect != null);
|
||||
assert(textDirection != null);
|
||||
final Rect indicator = insets.resolve(textDirection).deflateRect(rect);
|
||||
final Rect indicator = insets!.resolve(textDirection).deflateRect(rect!);
|
||||
|
||||
// 希望的宽度
|
||||
double wantWidth = this.width;
|
||||
double wantWidth = width!;
|
||||
// 取中间坐标
|
||||
double cw = (indicator.left + indicator.right) / 2;
|
||||
// 这里是核心代码
|
||||
return Rect.fromLTWH(cw - wantWidth / 2,
|
||||
indicator.bottom - borderSide.width, wantWidth, borderSide.width);
|
||||
indicator.bottom - borderSide!.width, wantWidth, borderSide!.width);
|
||||
}
|
||||
}
|
||||
|
||||
@ -74,19 +73,19 @@ class _UnderlinePainter extends BoxPainter {
|
||||
: assert(decoration != null),
|
||||
super(onChanged);
|
||||
|
||||
final CustomUnderlineTabIndicator decoration;
|
||||
final CustomUnderlineTabIndicator? decoration;
|
||||
|
||||
@override
|
||||
void paint(Canvas canvas, Offset offset, ImageConfiguration configuration) {
|
||||
assert(configuration != null);
|
||||
assert(configuration.size != null);
|
||||
final Rect rect = offset & configuration.size;
|
||||
final TextDirection textDirection = configuration.textDirection;
|
||||
final Rect indicator = decoration
|
||||
final Rect rect = offset & configuration.size!;
|
||||
final TextDirection textDirection = configuration.textDirection!;
|
||||
final Rect indicator = decoration!
|
||||
._indicatorRectFor(rect, textDirection)
|
||||
.deflate(decoration.borderSide.width / 2);
|
||||
final Paint paint = decoration.borderSide.toPaint()
|
||||
..strokeCap = decoration.strokeCap; // 这里修改控制器边角的形状
|
||||
.deflate(decoration!.borderSide!.width / 2);
|
||||
final Paint paint = decoration!.borderSide!.toPaint()
|
||||
..strokeCap = decoration!.strokeCap!; // 这里修改控制器边角的形状
|
||||
canvas.drawLine(indicator.bottomLeft, indicator.bottomRight, paint);
|
||||
}
|
||||
}
|
||||
@ -10,20 +10,20 @@ class AppManager {
|
||||
String platformName = '';
|
||||
String get showVersion =>'$version.$buildNumber';
|
||||
|
||||
static AppManager _manager;
|
||||
static AppManager? _manager;
|
||||
AppManager._init();
|
||||
|
||||
static AppManager shareManager(){
|
||||
static AppManager? shareManager(){
|
||||
_manager ??= AppManager._init();
|
||||
return _manager;
|
||||
}
|
||||
|
||||
factory AppManager() => shareManager();
|
||||
AppManager get manager => shareManager();
|
||||
factory AppManager() => shareManager()!;
|
||||
AppManager? get manager => shareManager();
|
||||
|
||||
//当前应用的语言
|
||||
String _languageCode = 'en-US';
|
||||
void setLanCode({String code})=>_languageCode = code;
|
||||
void setLanCode({String? code})=>_languageCode = code!;
|
||||
String get languageCode => _languageCode;
|
||||
|
||||
//设备唯一标识
|
||||
|
||||
@ -3,16 +3,16 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
|
||||
class CommonItem extends StatelessWidget {
|
||||
String leftTitel;
|
||||
String rightTitle;
|
||||
bool isHaveDirection;
|
||||
bool isHaveLine;
|
||||
bool isHaveRightWidget;
|
||||
Widget rightWidget;
|
||||
Function action;
|
||||
double allHeight;
|
||||
String? leftTitel;
|
||||
String? rightTitle;
|
||||
bool? isHaveDirection;
|
||||
bool? isHaveLine;
|
||||
bool? isHaveRightWidget;
|
||||
Widget? rightWidget;
|
||||
Function()? action;
|
||||
double? allHeight;
|
||||
|
||||
CommonItem({Key key,@required this.leftTitel, this.rightTitle, this.allHeight, this.isHaveDirection = false, this.isHaveLine = false, this.isHaveRightWidget = false, this.rightWidget, this.action}) : super(key: key);
|
||||
CommonItem({Key? key,required this.leftTitel, this.rightTitle, this.allHeight = 45.0, this.isHaveDirection = false, this.isHaveLine = false, this.isHaveRightWidget = false, this.rightWidget, this.action}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -28,21 +28,21 @@ class CommonItem extends StatelessWidget {
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width:20.w),
|
||||
Expanded(child: Text(leftTitel, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500))),
|
||||
Expanded(child: Text(leftTitel!, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500))),
|
||||
SizedBox(width:20.w),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
isHaveRightWidget?rightWidget:Text(rightTitle, textAlign: TextAlign.end, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),)
|
||||
isHaveRightWidget!?rightWidget!:Text(rightTitle!, textAlign: TextAlign.end, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),)
|
||||
],
|
||||
),
|
||||
SizedBox(width:5.w),
|
||||
isHaveDirection?Image.asset('images/icon_right.png', width: 50.w, height: 50.w,):SizedBox(width:10.w),
|
||||
isHaveDirection!?Image.asset('images/icon_right.png', width: 50.w, height: 50.w,):SizedBox(width:10.w),
|
||||
// SizedBox(width:10.w),
|
||||
],
|
||||
),
|
||||
),
|
||||
isHaveLine?Container(height: 0.5.h, color: Colors.grey,):Container()
|
||||
isHaveLine!?Container(height: 0.5.h, color: Colors.grey,):Container()
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@ -15,8 +15,9 @@ class DeviceInfoService extends GetxService {
|
||||
|
||||
Future<DeviceInfoService> init() async {
|
||||
DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
|
||||
var dId = StoreService.to.getDeviceId();
|
||||
if(dId.isEmpty){
|
||||
// String dId = StoreService.to.getDeviceId();
|
||||
String dId = "";
|
||||
if(dId.isNotEmpty){
|
||||
dId = const Uuid().v1();
|
||||
print('初始化设备ID:$dId');
|
||||
StoreService.to.saveDeviceId(dId);
|
||||
|
||||
@ -3,14 +3,14 @@ import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
|
||||
class ForgetPwdInput extends StatelessWidget {
|
||||
TextEditingController controller;
|
||||
List<TextInputFormatter> inputFormatters;
|
||||
TextInputType keyboardType;
|
||||
String hintText;
|
||||
String label;
|
||||
Widget rightSlot;
|
||||
bool isPwd;
|
||||
ForgetPwdInput({Key key,this.rightSlot,this.isPwd,this.label,this.hintText,this.keyboardType,this.inputFormatters, @required this.controller}) : super(key: key);
|
||||
TextEditingController? controller;
|
||||
List<TextInputFormatter>? inputFormatters;
|
||||
TextInputType? keyboardType;
|
||||
String? hintText;
|
||||
String? label;
|
||||
Widget? rightSlot;
|
||||
bool? isPwd;
|
||||
ForgetPwdInput({Key? key, this.rightSlot, this.isPwd, this.label,this.hintText,this.keyboardType,this.inputFormatters, @required this.controller}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||