You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
188 lines
9.0 KiB
188 lines
9.0 KiB
import 'package:dating_touchme_app/components/page_appbar.dart';
|
|
import 'package:dating_touchme_app/controller/discover/room_controller.dart';
|
|
import 'package:dating_touchme_app/model/discover/task_template_data.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:get/get.dart';
|
|
|
|
class TaskDetail extends StatefulWidget {
|
|
const TaskDetail({super.key});
|
|
|
|
@override
|
|
State<TaskDetail> createState() => _TaskDetailState();
|
|
}
|
|
|
|
class _TaskDetailState extends State<TaskDetail> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
|
|
final roomController = Get.find<RoomController>();
|
|
return Obx(
|
|
() {
|
|
return Scaffold(
|
|
appBar: PageAppbar(title: "任务详情"),
|
|
body: SingleChildScrollView(
|
|
child: Container(
|
|
padding: EdgeInsets.symmetric(
|
|
vertical: 20.w,
|
|
horizontal: 15.w
|
|
),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
IntrinsicHeight(
|
|
child: Container(
|
|
margin: EdgeInsets.only(bottom: 21.w),
|
|
decoration: BoxDecoration(
|
|
border: Border(
|
|
bottom: BorderSide(width: 1.w, color: const Color.fromRGBO(212, 212, 212, 1))
|
|
)
|
|
),
|
|
child: Row(
|
|
children: [
|
|
Container(
|
|
width: 229.w,
|
|
decoration: BoxDecoration(
|
|
border: Border(
|
|
right: BorderSide(width: 1.w, color: const Color.fromRGBO(212, 212, 212, 1))
|
|
)
|
|
),
|
|
child: Column(
|
|
children: [
|
|
Container(
|
|
height: 37.w,
|
|
color: const Color.fromRGBO(247, 247, 247, 1),
|
|
child: Center(
|
|
child: Text(
|
|
"任务详情",
|
|
style: TextStyle(
|
|
fontSize: 14.w
|
|
),
|
|
),
|
|
),
|
|
),
|
|
Container(
|
|
padding: EdgeInsets.only(left: 14.w, right: 18.w, top: 8.w, bottom: 8.w),
|
|
decoration: BoxDecoration(
|
|
border: Border(
|
|
bottom: BorderSide(width: 1.w, color: const Color.fromRGBO(212, 212, 212, 1))
|
|
)
|
|
),
|
|
alignment: Alignment.centerLeft,
|
|
child: Text(
|
|
"1.${
|
|
roomController.taskTemplateData.value.subList!.firstWhere(
|
|
(e) => e.sort == 1,
|
|
orElse: () => SubList(sort: 0),
|
|
).sort != 0 ? roomController.taskTemplateData.value.subList!.firstWhere(
|
|
(e) => e.sort == 1,
|
|
orElse: () => SubList(sort: 0),
|
|
).subTaskDesc : ""
|
|
};",
|
|
style: TextStyle(
|
|
fontSize: 14.w
|
|
),
|
|
),
|
|
),
|
|
Container(
|
|
padding: EdgeInsets.only(left: 14.w, right: 18.w, top: 8.w, bottom: 8.w),
|
|
decoration: BoxDecoration(
|
|
border: Border(
|
|
bottom: BorderSide(width: 1.w, color: const Color.fromRGBO(212, 212, 212, 1))
|
|
)
|
|
),
|
|
alignment: Alignment.centerLeft,
|
|
child: Text(
|
|
"2.${
|
|
roomController.taskTemplateData.value.subList!.firstWhere(
|
|
(e) => e.sort == 2,
|
|
orElse: () => SubList(sort: 0),
|
|
).sort != 0 ? roomController.taskTemplateData.value.subList!.firstWhere(
|
|
(e) => e.sort == 2,
|
|
orElse: () => SubList(sort: 0),
|
|
).subTaskDesc : ""
|
|
};",
|
|
style: TextStyle(
|
|
fontSize: 14.w
|
|
),
|
|
),
|
|
),
|
|
Container(
|
|
padding: EdgeInsets.only(left: 14.w, right: 18.w, top: 8.w, bottom: 8.w),
|
|
alignment: Alignment.centerLeft,
|
|
child: Text(
|
|
"3.${
|
|
roomController.taskTemplateData.value.subList!.firstWhere(
|
|
(e) => e.sort == 3,
|
|
orElse: () => SubList(sort: 0),
|
|
).sort != 0 ? roomController.taskTemplateData.value.subList!.firstWhere(
|
|
(e) => e.sort == 3,
|
|
orElse: () => SubList(sort: 0),
|
|
).subTaskDesc : ""
|
|
}",
|
|
style: TextStyle(
|
|
fontSize: 14.w
|
|
),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
Expanded(
|
|
child: Column(
|
|
children: [
|
|
Container(
|
|
height: 37.w,
|
|
color: const Color.fromRGBO(247, 247, 247, 1),
|
|
child: Center(
|
|
child: Text(
|
|
"任务奖励",
|
|
style: TextStyle(
|
|
fontSize: 14.w
|
|
),
|
|
),
|
|
),
|
|
),
|
|
Expanded(
|
|
child: Container(
|
|
padding: EdgeInsets.only(left: 14.w, right: 18.w),
|
|
alignment: Alignment.center,
|
|
child: Text(
|
|
"${roomController.taskTemplateData.value.rewardValue ?? ""}元",
|
|
style: TextStyle(
|
|
fontSize: 18.w,
|
|
color: const Color.fromRGBO(239, 19, 46, 1)
|
|
),
|
|
),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
),
|
|
Text(
|
|
"任务说明",
|
|
style: TextStyle(
|
|
fontSize: 14.w
|
|
),
|
|
),
|
|
SizedBox(height: 6.w,),
|
|
Text(
|
|
"${roomController.taskTemplateData.value.taskDesc ?? ""}",
|
|
style: TextStyle(
|
|
fontSize: 14.w,
|
|
color: const Color.fromRGBO(144, 144, 144, 1)
|
|
),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
);
|
|
}
|
|
}
|