|
|
@@ -40,6 +40,9 @@ class ScanImageReplyView extends BaseView<ScanImageReplyController> {
|
|
|
SizedBox(height: 14.h),
|
|
|
// 选项卡片
|
|
|
_buildOptionCard(),
|
|
|
+ SizedBox(height: 14.h),
|
|
|
+ // 回复语气列表卡片
|
|
|
+ _buildReplyToneListCard(),
|
|
|
// 距离底部有一定间距
|
|
|
SizedBox(height: 90.h),
|
|
|
],
|
|
|
@@ -225,6 +228,171 @@ class ScanImageReplyView extends BaseView<ScanImageReplyController> {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+ /// 回复语气列表卡片
|
|
|
+ Widget _buildReplyToneListCard() {
|
|
|
+ return Container(
|
|
|
+ margin: EdgeInsets.only(left: 12.w, right: 12.w),
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ // 渐变背景
|
|
|
+ gradient: LinearGradient(
|
|
|
+ colors: [Color(0xFFEFE9FF), Color(0xFFFBFAFF)],
|
|
|
+ begin: Alignment.topCenter,
|
|
|
+ end: Alignment.bottomCenter,
|
|
|
+ ),
|
|
|
+ borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
|
|
+ ),
|
|
|
+ child: Column(
|
|
|
+ children: [
|
|
|
+ Container(
|
|
|
+ margin: EdgeInsets.only(top: 10.h, bottom: 18.h),
|
|
|
+ child: Column(
|
|
|
+ children: [
|
|
|
+ Row(
|
|
|
+ children: [
|
|
|
+ Expanded(
|
|
|
+ child: Row(
|
|
|
+ children: [
|
|
|
+ // 回复语气的标题
|
|
|
+ SizedBox(
|
|
|
+ width: 80.w,
|
|
|
+ height: 40.h,
|
|
|
+ child: Stack(
|
|
|
+ children: [
|
|
|
+ // 底部的横线
|
|
|
+ Positioned(
|
|
|
+ left: 15.w,
|
|
|
+ bottom: 10.h,
|
|
|
+ child: Container(
|
|
|
+ width: 57.w,
|
|
|
+ height: 7.h,
|
|
|
+ color: Color(0xFFCEB6FF),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ Positioned(
|
|
|
+ left: 0,
|
|
|
+ bottom: 0,
|
|
|
+ child: Container(
|
|
|
+ margin: EdgeInsets.only(
|
|
|
+ left: 16.w,
|
|
|
+ bottom: 10.h,
|
|
|
+ ),
|
|
|
+ child: // 标题
|
|
|
+ Text(
|
|
|
+ StringName.intimacyAnalyseReplyTone,
|
|
|
+ style: TextStyle(
|
|
|
+ color: ColorName.black80,
|
|
|
+ fontSize: 14.sp,
|
|
|
+ fontWeight: FontWeight.w700,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ // 回复内容
|
|
|
+ Text(
|
|
|
+ "😁 键盘侠",
|
|
|
+ style: TextStyle(
|
|
|
+ color: ColorName.black80,
|
|
|
+ fontSize: 14.sp,
|
|
|
+ fontWeight: FontWeight.w500,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ // 重试按钮
|
|
|
+ _buildRetryBtn(),
|
|
|
+ SizedBox(width: 10.w),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ // 回复语气列表
|
|
|
+ for (var replyTone in controller.replyToneList)
|
|
|
+ _buildReplyToneListItem(replyTone),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ /// 重试按钮
|
|
|
+ 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,
|
|
|
+ ),
|
|
|
+ borderRadius: BorderRadius.all(Radius.circular(30.r)),
|
|
|
+ ),
|
|
|
+ child: Text(
|
|
|
+ StringName.retry,
|
|
|
+ style: TextStyle(
|
|
|
+ color: ColorName.white,
|
|
|
+ fontSize: 14.sp,
|
|
|
+ fontWeight: FontWeight.w400,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ /// 回复语气列表条目
|
|
|
+ Widget _buildReplyToneListItem(String replyTone) {
|
|
|
+ return Container(
|
|
|
+ margin: EdgeInsets.only(left: 12.w, right: 12.w, top: 10.h),
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: ColorName.white,
|
|
|
+ borderRadius: BorderRadius.circular(16.r),
|
|
|
+ boxShadow: [
|
|
|
+ BoxShadow(
|
|
|
+ // 阴影颜色
|
|
|
+ color: Color(0x61D2D2D2),
|
|
|
+ // 模糊半径(值越大越模糊)
|
|
|
+ blurRadius: 3.8,
|
|
|
+ // 阴影扩散范围(正值为扩大,负值为缩小)
|
|
|
+ spreadRadius: 1,
|
|
|
+ // 阴影偏移量(x, y)
|
|
|
+ offset: Offset(0, 2),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ child: Row(
|
|
|
+ children: [
|
|
|
+ // 文字
|
|
|
+ Expanded(
|
|
|
+ child: Container(
|
|
|
+ margin: EdgeInsets.only(left: 21.w, top: 12.h, bottom: 12.h),
|
|
|
+ child: Text(
|
|
|
+ replyTone,
|
|
|
+ maxLines: 1,
|
|
|
+ style: TextStyle(
|
|
|
+ overflow: TextOverflow.ellipsis,
|
|
|
+ color: ColorName.black80,
|
|
|
+ fontSize: 14.sp,
|
|
|
+ fontWeight: FontWeight.w500,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ // 图标
|
|
|
+ Container(
|
|
|
+ margin: EdgeInsets.only(right: 14.w),
|
|
|
+ child: Assets.images.iconActionCopy.image(
|
|
|
+ width: 18.w,
|
|
|
+ height: 18.w,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
/// 构建一行选择选项行
|
|
|
Widget _buildOptionRow(OptionSelectConfig config) {
|
|
|
return Column(
|
|
|
@@ -407,7 +575,7 @@ class ScanImageReplyView extends BaseView<ScanImageReplyController> {
|
|
|
),
|
|
|
child: ActionBtn(
|
|
|
leftBtn: _buildReplyModelSwitchBtn(),
|
|
|
- spaceWidget: SizedBox(width: 10.w,),
|
|
|
+ spaceWidget: SizedBox(width: 10.w),
|
|
|
rightBtn: _buildGetReplayBtn(),
|
|
|
),
|
|
|
);
|