74 lines
2.4 KiB
Dart
74 lines
2.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:get/get.dart';
|
|
|
|
import '../../../../app_settings/app_colors.dart';
|
|
import '../../../../tools/submitBtn.dart';
|
|
import '../../../../tools/titleAppBar.dart';
|
|
import '../../../../translations/trans_lib.dart';
|
|
import 'lockTime_logic.dart';
|
|
|
|
class LockTimePage extends StatefulWidget {
|
|
const LockTimePage({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
State<LockTimePage> createState() => _LockTimePageState();
|
|
}
|
|
|
|
class _LockTimePageState extends State<LockTimePage> {
|
|
final logic = Get.put(LockTimeLogic());
|
|
final state = Get.find<LockTimeLogic>().state;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: Colors.white,
|
|
appBar: TitleAppBar(
|
|
barTitle: TranslationLoader.lanKeys!.lockTime!.tr,
|
|
haveBack: true,
|
|
backgroundColor: AppColors.mainColor),
|
|
body: Container(
|
|
padding: EdgeInsets.all(30.w),
|
|
child: Column(
|
|
children: [
|
|
SizedBox(
|
|
height: 50.h,
|
|
),
|
|
Obx(() => Row(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Text(state.dateTime.value,
|
|
style: TextStyle(
|
|
fontSize: 26.sp, color: AppColors.blackColor)),
|
|
],
|
|
),),
|
|
SizedBox(
|
|
height: 60.h,
|
|
),
|
|
SubmitBtn(
|
|
btnName: TranslationLoader.lanKeys!.calibrationTime!.tr,
|
|
borderRadius: 20.w,
|
|
fontSize: 32.sp,
|
|
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
|
|
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
|
|
onClick: () {
|
|
// print("1111111");
|
|
logic.sendTiming();
|
|
// logic.getServerDatetime();
|
|
}),
|
|
SizedBox(
|
|
height: 40.h,
|
|
),
|
|
// GestureDetector(
|
|
// onTap: () {},
|
|
// child: Container(
|
|
// child: Text(TranslationLoader.lanKeys!.setTheDSTMode!.tr,
|
|
// style: TextStyle(
|
|
// fontSize: 24.sp, color: AppColors.mainColor))),
|
|
// ),
|
|
],
|
|
),
|
|
));
|
|
}
|
|
}
|