| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- import 'package:flutter/cupertino.dart';
- import 'package:flutter/material.dart';
- import 'package:flutter/src/widgets/framework.dart';
- import 'package:flutter_screenutil/flutter_screenutil.dart';
- import 'package:get/get.dart';
- import 'package:get/get_core/src/get_main.dart';
- import 'package:location/base/base_page.dart';
- import 'package:location/resource/string.gen.dart';
- import 'package:location/utils/common_expand.dart';
- import '../../resource/colors.gen.dart';
- import '../../router/app_pages.dart';
- import '../../widget/common_view.dart';
- import 'feed_back_controller.dart';
- class FeedBackPage extends BasePage<FeedBackController> {
- const FeedBackPage({super.key});
- static void start() {
- Get.toNamed(RoutePath.feedback);
- }
- @override
- Widget buildBody(BuildContext context) {
- return Stack(
- children: [
- GestureDetector(
- onTap: () => FocusScope.of(Get.context!).unfocus(),
- child: Container(
- color: Colors.white,
- ),
- ),
- Column(
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- CommonView.buildAppBar(StringName.feedBack,
- backOnTap: controller.back, titleCenter: false),
- SizedBox(height: 12.w),
- Align(
- alignment: Alignment.centerLeft,
- child: Padding(
- padding: EdgeInsets.only(left: 14.w),
- child: Text(StringName.feedBackTitle,
- style: TextStyle(fontSize: 14.sp, color: '#202020'.color)),
- ),
- ),
- SizedBox(height: 12.w),
- buildFeedbackPrintView(),
- Spacer(),
- GestureDetector(
- onTap: controller.submit,
- child: Container(
- width: 240.w,
- height: 50.w,
- decoration: BoxDecoration(
- color: ColorName.colorPrimary,
- borderRadius: BorderRadius.circular(100.w),
- ),
- child: Center(
- child: Text(StringName.feedBackSubmitTxt,
- style: TextStyle(fontSize: 16.sp, color: ColorName.white)),
- ),
- ),
- ),
- SizedBox(height: 24.w),
- GestureDetector(
- onTap: controller.onCustomerServiceClick,
- child: Text(StringName.feedBackCustomerService,
- style: TextStyle(
- decoration: TextDecoration.underline,
- fontSize: 14.sp,
- color: ColorName.black)),
- ),
- ],
- )
- ],
- );
- }
- Widget buildFeedbackPrintView() {
- return Container(
- margin: EdgeInsets.symmetric(horizontal: 12.w),
- height: 270.h,
- decoration: BoxDecoration(
- color: '#FAFAFA'.color,
- borderRadius: BorderRadius.circular(6.w),
- ),
- child: Stack(children: [
- TextField(
- keyboardType: TextInputType.multiline,
- maxLength: 500,
- maxLines: null,
- minLines: 12,
- style: TextStyle(fontSize: 14.sp, color: ColorName.primaryTextColor),
- decoration: InputDecoration(
- counterText: "",
- border: InputBorder.none,
- fillColor: Colors.transparent,
- hintText: StringName.feedBackHint,
- hintStyle: TextStyle(fontSize: 14.sp, color: '#A7A7A7'.color),
- contentPadding: EdgeInsets.only(
- left: 12.w, right: 12.w, top: 12.w, bottom: 28.w),
- ),
- onChanged: (value) {
- controller.content = value;
- },
- scrollPhysics: ClampingScrollPhysics(),
- ),
- Obx(() {
- return Positioned(
- bottom: 10.w,
- right: 12.w,
- child: Text('${controller.content.length}/500',
- style: TextStyle(fontSize: 14.sp, color: '#A7A7A7'.color)),
- );
- })
- ]),
- );
- }
- }
|