|
@@ -1,5 +1,7 @@
|
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
|
+import 'package:get/get.dart';
|
|
|
|
|
+import 'package:get/get_core/src/get_main.dart';
|
|
|
import 'package:get/get_state_manager/src/rx_flutter/rx_obx_widget.dart';
|
|
import 'package:get/get_state_manager/src/rx_flutter/rx_obx_widget.dart';
|
|
|
import 'package:keyboard/base/base_view.dart';
|
|
import 'package:keyboard/base/base_view.dart';
|
|
|
|
|
|
|
@@ -83,18 +85,26 @@ class ScanImageReplyView extends BaseView<ScanImageReplyController> {
|
|
|
);
|
|
);
|
|
|
} else {
|
|
} else {
|
|
|
// 重新上传按钮
|
|
// 重新上传按钮
|
|
|
- actionBtn = Container(
|
|
|
|
|
- padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 12.w),
|
|
|
|
|
- decoration: BoxDecoration(
|
|
|
|
|
- color: ColorName.black80,
|
|
|
|
|
- borderRadius: BorderRadius.circular(30.r),
|
|
|
|
|
- ),
|
|
|
|
|
- child: Text(
|
|
|
|
|
- StringName.intimacyAnalyseReUpload,
|
|
|
|
|
- style: TextStyle(
|
|
|
|
|
- color: ColorName.white,
|
|
|
|
|
- fontSize: 12.sp,
|
|
|
|
|
- fontWeight: FontWeight.w500,
|
|
|
|
|
|
|
+ actionBtn = GestureDetector(
|
|
|
|
|
+ onTap: () {
|
|
|
|
|
+ BuildContext? context = Get.context;
|
|
|
|
|
+ if (context != null) {
|
|
|
|
|
+ controller.clickUploadScreenshotBtn(context);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ child: Container(
|
|
|
|
|
+ padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 12.w),
|
|
|
|
|
+ decoration: BoxDecoration(
|
|
|
|
|
+ color: ColorName.black80,
|
|
|
|
|
+ borderRadius: BorderRadius.circular(30.r),
|
|
|
|
|
+ ),
|
|
|
|
|
+ child: Text(
|
|
|
|
|
+ StringName.intimacyAnalyseReUpload,
|
|
|
|
|
+ style: TextStyle(
|
|
|
|
|
+ color: ColorName.white,
|
|
|
|
|
+ fontSize: 12.sp,
|
|
|
|
|
+ fontWeight: FontWeight.w500,
|
|
|
|
|
+ ),
|
|
|
),
|
|
),
|
|
|
),
|
|
),
|
|
|
);
|
|
);
|
|
@@ -321,23 +331,26 @@ class ScanImageReplyView extends BaseView<ScanImageReplyController> {
|
|
|
|
|
|
|
|
/// 重试按钮
|
|
/// 重试按钮
|
|
|
Widget _buildRetryBtn() {
|
|
Widget _buildRetryBtn() {
|
|
|
- return Container(
|
|
|
|
|
- padding: EdgeInsets.symmetric(horizontal: 28.w, vertical: 8.h),
|
|
|
|
|
- decoration: BoxDecoration(
|
|
|
|
|
- // 渐变背景
|
|
|
|
|
- gradient: LinearGradient(
|
|
|
|
|
- colors: [ColorName.purpleGradient3, ColorName.purpleGradient4],
|
|
|
|
|
- begin: Alignment.centerLeft,
|
|
|
|
|
- end: Alignment.centerRight,
|
|
|
|
|
|
|
+ return GestureDetector(
|
|
|
|
|
+ onTap: () {},
|
|
|
|
|
+ child: Container(
|
|
|
|
|
+ padding: EdgeInsets.symmetric(horizontal: 28.w, vertical: 8.h),
|
|
|
|
|
+ decoration: BoxDecoration(
|
|
|
|
|
+ // 渐变背景
|
|
|
|
|
+ gradient: LinearGradient(
|
|
|
|
|
+ colors: [ColorName.purpleGradient3, ColorName.purpleGradient4],
|
|
|
|
|
+ begin: Alignment.centerLeft,
|
|
|
|
|
+ end: Alignment.centerRight,
|
|
|
|
|
+ ),
|
|
|
|
|
+ borderRadius: BorderRadius.all(Radius.circular(30.r)),
|
|
|
),
|
|
),
|
|
|
- borderRadius: BorderRadius.all(Radius.circular(30.r)),
|
|
|
|
|
- ),
|
|
|
|
|
- child: Text(
|
|
|
|
|
- StringName.retry,
|
|
|
|
|
- style: TextStyle(
|
|
|
|
|
- color: ColorName.white,
|
|
|
|
|
- fontSize: 14.sp,
|
|
|
|
|
- fontWeight: FontWeight.w400,
|
|
|
|
|
|
|
+ child: Text(
|
|
|
|
|
+ StringName.retry,
|
|
|
|
|
+ style: TextStyle(
|
|
|
|
|
+ color: ColorName.white,
|
|
|
|
|
+ fontSize: 14.sp,
|
|
|
|
|
+ fontWeight: FontWeight.w400,
|
|
|
|
|
+ ),
|
|
|
),
|
|
),
|
|
|
),
|
|
),
|
|
|
);
|
|
);
|
|
@@ -414,10 +427,10 @@ class ScanImageReplyView extends BaseView<ScanImageReplyController> {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// 上传截图按钮
|
|
/// 上传截图按钮
|
|
|
- Widget _buildUploadScreenshotBtn() {
|
|
|
|
|
|
|
+ Widget _buildUploadScreenshotBtn(BuildContext context) {
|
|
|
return GestureDetector(
|
|
return GestureDetector(
|
|
|
onTap: () {
|
|
onTap: () {
|
|
|
- controller.clickUploadScreenshotBtn();
|
|
|
|
|
|
|
+ controller.clickUploadScreenshotBtn(context);
|
|
|
},
|
|
},
|
|
|
child: Container(
|
|
child: Container(
|
|
|
margin: EdgeInsets.symmetric(horizontal: 16.w),
|
|
margin: EdgeInsets.symmetric(horizontal: 16.w),
|
|
@@ -551,7 +564,7 @@ class ScanImageReplyView extends BaseView<ScanImageReplyController> {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// 底部操作按钮
|
|
/// 底部操作按钮
|
|
|
- Widget _buildBottomActionBtn() {
|
|
|
|
|
|
|
+ Widget _buildBottomActionBtn(BuildContext context) {
|
|
|
if (controller.isUploadPage.value) {
|
|
if (controller.isUploadPage.value) {
|
|
|
// 上传页,显示上传截图按钮
|
|
// 上传页,显示上传截图按钮
|
|
|
return Container(
|
|
return Container(
|
|
@@ -562,7 +575,7 @@ class ScanImageReplyView extends BaseView<ScanImageReplyController> {
|
|
|
right: 16.w,
|
|
right: 16.w,
|
|
|
bottom: 20.h,
|
|
bottom: 20.h,
|
|
|
),
|
|
),
|
|
|
- child: _buildUploadScreenshotBtn(),
|
|
|
|
|
|
|
+ child: _buildUploadScreenshotBtn(context),
|
|
|
);
|
|
);
|
|
|
} else {
|
|
} else {
|
|
|
// 结果页,显示2个按钮,模式切换按钮和获取回复按钮
|
|
// 结果页,显示2个按钮,模式切换按钮和获取回复按钮
|
|
@@ -592,7 +605,7 @@ class ScanImageReplyView extends BaseView<ScanImageReplyController> {
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
children: [
|
|
children: [
|
|
|
// 操作按钮
|
|
// 操作按钮
|
|
|
- _buildBottomActionBtn(),
|
|
|
|
|
|
|
+ _buildBottomActionBtn(context),
|
|
|
],
|
|
],
|
|
|
);
|
|
);
|
|
|
});
|
|
});
|