123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- import 'package:farmer_client/widgets/DefaultButton.dart';
- import 'package:farmer_client/widgets/layout/BasicPage.dart';
- import 'package:flutter/material.dart';
- import 'package:flutter_screenutil/flutter_screenutil.dart';
- import 'package:fluttertoast/fluttertoast.dart';
- import 'package:get/get.dart';
-
- import '../../services/main.dart';
-
- class Feedback extends BasicPage {
- final text = Rx<String>('');
- final isEdit = Rx<bool>(false);
-
- @override
- Widget builder(BuildContext context) {
- naviTitle = '意见反馈';
- return Container(
- height: 700.h,
- padding: EdgeInsets.all(15.w),
- child: Stack(
- children: [
- Container(
- margin: EdgeInsets.fromLTRB(0, 0, 0, 50.h),
- padding: EdgeInsets.symmetric(vertical: 5.w, horizontal: 18.5.w),
- decoration: BoxDecoration(
- color: const Color(0xFFfefefe),
- borderRadius: BorderRadius.all(Radius.circular(10.w)),
- border: Border.all(
- color: const Color(0xcc000000),
- width: 1.h,
- style: BorderStyle.solid)),
- child: TextFormField(
- minLines: 6,
- maxLines: 6,
- style: TextStyle(fontSize: 17.sp, height: 1.5),
- decoration: const InputDecoration(
- isCollapsed: true,
- border: InputBorder.none,
- counterText: '', //去掉计数
- floatingLabelBehavior: FloatingLabelBehavior.never,
- ),
- onTap: () {
- isEdit.value = true;
- },
- onChanged: (e) {
- text.value = e;
- },
- ),
- ),
- Obx(
- () => Visibility(
- visible: !isEdit(),
- child: Positioned(
- left: 20.w,
- top: 5.w,
- child: Row(
- children: [
- <<<<<<< HEAD
- Image.asset(
- 'images/icons/feedbackIcon.png',
- width: 15.w,
- =======
- Container(
- margin: EdgeInsets.only(right: 8.w),
- child: Image.asset(
- 'images/icons/feedbackIcon.png',
- width: 15.w,
- ),
- >>>>>>> b052c991e6c96dc1b28c3fa153d55d36d0e0272a
- ),
- Text(
- '请留下您宝贵的意见和建议!',
- style: TextStyle(
- fontSize: 17.sp,
- letterSpacing: 2,
- <<<<<<< HEAD
- color: Color(0xFFBEBDBD)),
- =======
- color: const Color(0xFFBEBDBD)),
- >>>>>>> b052c991e6c96dc1b28c3fa153d55d36d0e0272a
- ),
- ],
- ),
- ),
- ),
- ),
- Positioned(
- bottom: 25.h,
- child: DefaultButton(
- color: const Color(0xffffffff),
- backColor: const Color(0xFFFF703B),
- width: 345.w,
- height: 49.h,
- text: '提交',
- onPressed: () {
- if (text() == '') {
- Fluttertoast.showToast(msg: '请输入内容哦');
- } else {
- feedback(text()).then((value) {
- Fluttertoast.showToast(msg: '提交成功!');
- Get.back();
- });
- }
- },
- margin: const EdgeInsets.all(0),
- fontSize: 20.sp,
- radius: 24.5.w,
- ),
- ),
- ],
- ),
- );
- }
- }
|