|
|
@@ -1,5 +1,11 @@
|
|
|
import 'package:flutter/material.dart';
|
|
|
+import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
import 'package:keyboard/base/base_view.dart';
|
|
|
+
|
|
|
+import '../../../../resource/assets.gen.dart';
|
|
|
+import '../../../../resource/colors.gen.dart';
|
|
|
+import '../../../../resource/string.gen.dart';
|
|
|
+import '../../widget/step_card.dart';
|
|
|
import 'package:keyboard/module/intimacy_analyse/screenshot_reply/scan_image_reply/scan_image_reply_controller.dart';
|
|
|
|
|
|
/// 识图回复Tab页
|
|
|
@@ -13,11 +19,129 @@ class ScanImageReplyView extends BaseView<ScanImageReplyController> {
|
|
|
|
|
|
@override
|
|
|
Widget buildBody(BuildContext context) {
|
|
|
- return Center(
|
|
|
- child: Text(
|
|
|
- '识图回复',
|
|
|
- style: TextStyle(fontSize: 20, color: Color(0xFF000000)),
|
|
|
+ return Stack(
|
|
|
+ children: [
|
|
|
+ Column(
|
|
|
+ children: [
|
|
|
+ // 上传截图例子卡片
|
|
|
+ _buildUploadScreenshotSampleCard(),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ // 上传截图按钮
|
|
|
+ Positioned.fill(
|
|
|
+ child: Align(
|
|
|
+ alignment: Alignment.bottomCenter,
|
|
|
+ child: _buildBottomLayout(context),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ /// 上传截图例子卡片
|
|
|
+ Widget _buildUploadScreenshotSampleCard() {
|
|
|
+ return StepCard(
|
|
|
+ bgImageProvider: Assets.images.bgIntimacyAnalyseUploadCard.provider(),
|
|
|
+ stepLabel: "",
|
|
|
+ stepTitle: StringName.intimacyUploadScreenshot,
|
|
|
+ stepDesc: StringName.intimacyAnalyseUploadScreenshotCardTip,
|
|
|
+ topIconWidget: Assets.images.iconIntimacyAnalyseUploadTop.image(
|
|
|
+ height: 63.h,
|
|
|
+ width: 103.w,
|
|
|
+ ),
|
|
|
+ contentWidget: Column(
|
|
|
+ children: [
|
|
|
+ Container(
|
|
|
+ margin: EdgeInsets.only(left: 12.w, top: 17.h, right: 12.w),
|
|
|
+ padding: EdgeInsets.only(
|
|
|
+ left: 12.w,
|
|
|
+ top: 12.h,
|
|
|
+ right: 12.w,
|
|
|
+ bottom: 12.h,
|
|
|
+ ),
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: ColorName.white,
|
|
|
+ borderRadius: BorderRadius.circular(16.r),
|
|
|
+ ),
|
|
|
+ child: Stack(
|
|
|
+ children: [
|
|
|
+ Assets.images.iconUploadScreenshotSampleImage.image(
|
|
|
+ width: 288.w,
|
|
|
+ height: 290.h,
|
|
|
+ // fit: BoxFit.cover,
|
|
|
+ ),
|
|
|
+ Positioned(
|
|
|
+ right: 12.w,
|
|
|
+ bottom: 12.w,
|
|
|
+ child: Container(
|
|
|
+ padding: EdgeInsets.all(6.w),
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: ColorName.black28,
|
|
|
+ borderRadius: BorderRadius.circular(9.r),
|
|
|
+ ),
|
|
|
+ child: Text(
|
|
|
+ StringName.intimacyAnalyseSampleImage,
|
|
|
+ style: TextStyle(
|
|
|
+ color: ColorName.white,
|
|
|
+ fontSize: 12.sp,
|
|
|
+ fontWeight: FontWeight.w500,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ /// 上传截图按钮
|
|
|
+ Widget _buildUploadScreenshotBtn() {
|
|
|
+ return GestureDetector(
|
|
|
+ onTap: () {
|
|
|
+ controller.clickUploadScreenshotBtn();
|
|
|
+ },
|
|
|
+ child: Container(
|
|
|
+ margin: EdgeInsets.symmetric(horizontal: 16.w),
|
|
|
+ padding: EdgeInsets.symmetric(vertical: 14.h),
|
|
|
+ width: double.maxFinite,
|
|
|
+ decoration: ShapeDecoration(
|
|
|
+ // 渐变背景
|
|
|
+ gradient: LinearGradient(
|
|
|
+ colors: [ColorName.purpleGradient3, ColorName.purpleGradient4],
|
|
|
+ begin: Alignment.centerLeft,
|
|
|
+ end: Alignment.centerRight,
|
|
|
+ ),
|
|
|
+ shape: RoundedRectangleBorder(
|
|
|
+ borderRadius: BorderRadius.circular(50.r),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ child: Center(
|
|
|
+ child: Text(
|
|
|
+ StringName.intimacyUploadScreenshot,
|
|
|
+ style: TextStyle(
|
|
|
+ color: ColorName.white,
|
|
|
+ fontSize: 16.sp,
|
|
|
+ fontWeight: FontWeight.w500,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
),
|
|
|
);
|
|
|
}
|
|
|
+
|
|
|
+ /// 底部布局
|
|
|
+ Widget _buildBottomLayout(BuildContext context) {
|
|
|
+ return Column(
|
|
|
+ // 高度包裹内容
|
|
|
+ mainAxisSize: MainAxisSize.min,
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
+ children: [
|
|
|
+ // 上传截图按钮
|
|
|
+ _buildUploadScreenshotBtn(), SizedBox(height: 20.h),
|
|
|
+ ],
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|