|
@@ -11,6 +11,7 @@ import 'package:plugin_basic/base/base_stateful_page.dart';
|
|
|
import 'package:plugin_basic/base/base_state.dart';
|
|
|
import 'package:plugin_basic/base/mixin_state_lifecycle.dart';
|
|
|
import 'package:plugin_basic/utils/ext_get_nav.dart';
|
|
|
+import 'package:plugin_platform/engine/image/image_preview.dart';
|
|
|
import 'package:router/path/router_path.dart';
|
|
|
import 'package:shared/utils/date_time_utils.dart';
|
|
|
import 'package:shared/utils/log_utils.dart';
|
|
@@ -214,10 +215,10 @@ class _SignInSignOutPageState extends BaseState<SignInSignOutPage, SignInSignOut
|
|
|
final item = controller.datas[index];
|
|
|
|
|
|
return Container(
|
|
|
- padding: EdgeInsets.only(left: 23, right: 12),
|
|
|
- margin: EdgeInsets.only(left: 15, right: 15, top: 5, bottom: 5),
|
|
|
+ padding: const EdgeInsets.only(left: 23, right: 12),
|
|
|
+ margin: const EdgeInsets.only(left: 15, right: 15, top: 5, bottom: 5),
|
|
|
decoration: BoxDecoration(
|
|
|
- color: Color(0xFF4DCFF6).withOpacity(0.2), // 设置背景颜色和不透明度
|
|
|
+ color: const Color(0xFF4DCFF6).withOpacity(0.2), // 设置背景颜色和不透明度
|
|
|
borderRadius: BorderRadius.circular(5), // 设置圆角
|
|
|
),
|
|
|
child: Column(
|
|
@@ -330,36 +331,42 @@ class _SignInSignOutPageState extends BaseState<SignInSignOutPage, SignInSignOut
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
children: [
|
|
|
- Container(
|
|
|
- width: 90,
|
|
|
- height: 35,
|
|
|
- margin: const EdgeInsets.only(top: 18),
|
|
|
- decoration: BoxDecoration(
|
|
|
- color: Utils.isEmpty(item.inPhoto) ? const Color(0xFF56AAFF) : ColorConstants.white,
|
|
|
- borderRadius: BorderRadius.circular(17.25), // 设置圆角
|
|
|
- ),
|
|
|
- child: Stack(
|
|
|
- alignment: Alignment.center,
|
|
|
- children: [
|
|
|
- Visibility(
|
|
|
- visible: Utils.isEmpty(item.inPhoto),
|
|
|
- child: MyTextView(
|
|
|
- "Check In".tr,
|
|
|
- isFontMedium: true,
|
|
|
- textColor: ColorConstants.white,
|
|
|
- fontSize: 14,
|
|
|
+ Stack(
|
|
|
+ alignment: Alignment.center,
|
|
|
+ children: [
|
|
|
+ Visibility(
|
|
|
+ visible: Utils.isEmpty(item.inPhoto),
|
|
|
+ child: Container(
|
|
|
+ width: 90,
|
|
|
+ height: 35,
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: Utils.isEmpty(item.inPhoto) ? const Color(0xFF56AAFF) : ColorConstants.white,
|
|
|
+ borderRadius: BorderRadius.circular(17.25), // 设置圆角
|
|
|
+ ),
|
|
|
+ child: Center(
|
|
|
+ child: MyTextView(
|
|
|
+ "Check In".tr,
|
|
|
+ isFontMedium: true,
|
|
|
+ textColor: ColorConstants.white,
|
|
|
+ fontSize: 14,
|
|
|
+ ),
|
|
|
),
|
|
|
- ),
|
|
|
- Visibility(
|
|
|
- visible: !Utils.isEmpty(item.inPhoto),
|
|
|
- child: MyLoadImage(item.inPhoto, width: 71.5, height: 25, fit: BoxFit.cover),
|
|
|
- ),
|
|
|
- ],
|
|
|
- ).onTap(() {
|
|
|
- if (Utils.isEmpty(item.inPhoto)) {
|
|
|
- controller.userSignIn(item);
|
|
|
- }
|
|
|
- }),
|
|
|
+ ).onTap(() {
|
|
|
+ if (Utils.isEmpty(item.inPhoto)) {
|
|
|
+ controller.userSignIn(item);
|
|
|
+ }
|
|
|
+ }),
|
|
|
+ ),
|
|
|
+ Visibility(
|
|
|
+ visible: Utils.isNotEmpty(item.inPhoto),
|
|
|
+ child: Hero(
|
|
|
+ tag: '112cc8a34e13$index',
|
|
|
+ child: MyLoadImage(item.inPhoto, width: 60, height: 60, fit: BoxFit.cover, cornerRadius: 5),
|
|
|
+ ).onTap(() {
|
|
|
+ ImagePreviewEngine.singleImagePreview(context, item.inPhoto!, heroTag: '112cc8a34e13$index');
|
|
|
+ }),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
),
|
|
|
Visibility(
|
|
|
visible: !Utils.isEmpty(item.inTime),
|
|
@@ -379,36 +386,42 @@ class _SignInSignOutPageState extends BaseState<SignInSignOutPage, SignInSignOut
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
children: [
|
|
|
- Container(
|
|
|
- width: 90,
|
|
|
- height: 35,
|
|
|
- margin: EdgeInsets.only(top: 18),
|
|
|
- decoration: BoxDecoration(
|
|
|
- color: Utils.isEmpty(item.outPhoto) ? Color(0xFF56AAFF) : ColorConstants.white,
|
|
|
- borderRadius: BorderRadius.circular(17.25), // 设置圆角
|
|
|
- ),
|
|
|
- child: Stack(
|
|
|
- alignment: Alignment.center,
|
|
|
- children: [
|
|
|
- Visibility(
|
|
|
- visible: Utils.isEmpty(item.outPhoto),
|
|
|
- child: MyTextView(
|
|
|
- "Check Out".tr,
|
|
|
- isFontMedium: true,
|
|
|
- textColor: ColorConstants.white,
|
|
|
- fontSize: 14,
|
|
|
+ Stack(
|
|
|
+ alignment: Alignment.center,
|
|
|
+ children: [
|
|
|
+ Visibility(
|
|
|
+ visible: Utils.isEmpty(item.outPhoto),
|
|
|
+ child: Container(
|
|
|
+ width: 90,
|
|
|
+ height: 35,
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: Utils.isEmpty(item.outPhoto) ? const Color(0xFF56AAFF) : ColorConstants.white,
|
|
|
+ borderRadius: BorderRadius.circular(17.25), // 设置圆角
|
|
|
+ ),
|
|
|
+ child: Center(
|
|
|
+ child: MyTextView(
|
|
|
+ "Check Out".tr,
|
|
|
+ isFontMedium: true,
|
|
|
+ textColor: ColorConstants.white,
|
|
|
+ fontSize: 14,
|
|
|
+ ),
|
|
|
),
|
|
|
- ),
|
|
|
- Visibility(
|
|
|
- visible: !Utils.isEmpty(item.outPhoto),
|
|
|
- child: MyLoadImage(item.outPhoto, width: 71.5, height: 25, fit: BoxFit.cover),
|
|
|
- ),
|
|
|
- ],
|
|
|
- ).onTap(() {
|
|
|
- if (Utils.isEmpty(item.outPhoto)) {
|
|
|
- controller.userSignOut(item);
|
|
|
- }
|
|
|
- }),
|
|
|
+ ).onTap(() {
|
|
|
+ if (Utils.isEmpty(item.outPhoto)) {
|
|
|
+ controller.userSignOut(item);
|
|
|
+ }
|
|
|
+ }),
|
|
|
+ ),
|
|
|
+ Visibility(
|
|
|
+ visible: Utils.isNotEmpty(item.outPhoto),
|
|
|
+ child: Hero(
|
|
|
+ tag: '112cc8a34e13$index',
|
|
|
+ child: MyLoadImage(item.outPhoto, width: 60, height: 60, fit: BoxFit.cover, cornerRadius: 5),
|
|
|
+ ).onTap(() {
|
|
|
+ ImagePreviewEngine.singleImagePreview(context, item.outPhoto!, heroTag: '112cc8a34e13$index');
|
|
|
+ }),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
),
|
|
|
Visibility(
|
|
|
visible: !Utils.isEmpty(item.outTime),
|
|
@@ -423,7 +436,7 @@ class _SignInSignOutPageState extends BaseState<SignInSignOutPage, SignInSignOut
|
|
|
],
|
|
|
).marginOnly(left: 10),
|
|
|
],
|
|
|
- ),
|
|
|
+ ).marginOnly(top: 18),
|
|
|
|
|
|
const SizedBox(height: 18),
|
|
|
],
|