| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- import 'package:flutter/material.dart';
- import 'package:flutter_screenutil/flutter_screenutil.dart';
- import 'package:get/get.dart';
- import 'package:nomo/app/base/base_view.dart';
- import 'package:nomo/app/widgets/click_opacity.dart';
- import 'package:nomo/app/widgets/ix_app_bar.dart';
- import 'package:nomo/config/theme/theme_extensions/theme_extension.dart';
- import '../controllers/feedback_controller.dart';
- class FeedbackView extends BaseView<FeedbackController> {
- const FeedbackView({super.key});
- @override
- Widget buildContent(BuildContext context) {
- return Column(
- children: [
- IXAppBar(title: 'Feedback'),
- Expanded(
- child: Padding(
- padding: EdgeInsets.symmetric(horizontal: 14.w, vertical: 20.h),
- child: Column(
- children: [
- // 反馈内容输入区域
- Expanded(
- child: Container(
- decoration: BoxDecoration(
- color: Get.reactiveTheme.highlightColor,
- borderRadius: BorderRadius.circular(16.r),
- ),
- child: Padding(
- padding: EdgeInsets.all(20.w),
- child: TextField(
- controller: controller.feedbackController,
- maxLines: null,
- expands: true,
- textAlignVertical: TextAlignVertical.top,
- style: TextStyle(fontSize: 16.sp, color: Colors.white),
- decoration: InputDecoration(
- hintText:
- 'An English version for reference: Describe\nyour issue or suggestion...',
- hintStyle: TextStyle(
- fontSize: 16.sp,
- color: Get.reactiveTheme.hintColor,
- ),
- border: InputBorder.none,
- contentPadding: EdgeInsets.zero,
- ),
- ),
- ),
- ),
- ),
- SizedBox(height: 20.h),
- // 邮箱输入区域
- Container(
- decoration: BoxDecoration(
- color: Get.reactiveTheme.highlightColor,
- borderRadius: BorderRadius.circular(16.r),
- ),
- child: Padding(
- padding: EdgeInsets.all(20.w),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- TextField(
- controller: controller.emailController,
- style: TextStyle(
- fontSize: 16.sp,
- color: Colors.white,
- ),
- decoration: InputDecoration(
- hintText: 'Enter your email',
- hintStyle: TextStyle(
- fontSize: 16.sp,
- color: Get.reactiveTheme.hintColor,
- ),
- border: InputBorder.none,
- contentPadding: EdgeInsets.zero,
- ),
- ),
- SizedBox(height: 8.h),
- Text(
- '• Your email address (for our reply)',
- style: TextStyle(
- fontSize: 12.sp,
- color: Get.reactiveTheme.hintColor,
- ),
- ),
- ],
- ),
- ),
- ),
- SizedBox(height: 30.h),
- // 发送按钮
- Obx(
- () => ClickOpacity(
- onTap: controller.isSubmitting.value
- ? null
- : controller.submitFeedback,
- child: Container(
- width: double.infinity,
- height: 52.h,
- decoration: BoxDecoration(
- color:
- controller.canSubmit &&
- !controller.isSubmitting.value
- ? const Color(0xFF00A8E8)
- : Get.reactiveTheme.hintColor.withOpacity(0.3),
- borderRadius: BorderRadius.circular(26.r),
- ),
- child: Center(
- child: controller.isSubmitting.value
- ? SizedBox(
- width: 20.w,
- height: 20.w,
- child: CircularProgressIndicator(
- strokeWidth: 2,
- valueColor: AlwaysStoppedAnimation<Color>(
- Colors.white,
- ),
- ),
- )
- : Text(
- 'Send',
- style: TextStyle(
- fontSize: 16.sp,
- fontWeight: FontWeight.w600,
- color: controller.canSubmit
- ? Colors.white
- : Get.reactiveTheme.hintColor,
- ),
- ),
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- ),
- ],
- );
- }
- }
|