import 'package:customer/constant/const_texts.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart' hide Trans; import '../../controllers/complain_controller.dart'; import '../../controllers/theme_controller.dart'; import '../../themes/app_them_data.dart'; import '../../themes/round_button_fill.dart'; import '../../constant/constant.dart'; import '../../themes/text_field_widget.dart'; class ComplainScreen extends StatelessWidget { const ComplainScreen({super.key}); @override Widget build(BuildContext context) { final themeController = Get.find(); final isDark = themeController.isDark.value; return GetBuilder( init: ComplainController(), builder: (controller) { return Obx( () => Scaffold( appBar: AppBar( automaticallyImplyLeading: false, backgroundColor: AppThemeData.taxiBooking300, title: Padding( padding: const EdgeInsets.only(bottom: 10), child: Row( children: [ GestureDetector( onTap: () => Get.back(), child: Container( height: 42, width: 42, decoration: BoxDecoration( shape: BoxShape.circle, color: AppThemeData.grey50, ), child: const Center( child: Icon( Icons.arrow_back_ios, color: AppThemeData.grey900, size: 20, ), ), ), ), const SizedBox(width: 10), Text( ConstTexts.complain.tr(), style: AppThemeData.boldTextStyle( fontSize: 18, color: AppThemeData.grey900, ), ), ], ), ), ), body: controller.isLoading.value ? Constant.loader() : SingleChildScrollView( padding: const EdgeInsets.all(16), child: Column( children: [ Obx( () => TextFieldWidget( title: ConstTexts.title.tr(), hintText: ConstTexts.title.tr(), controller: controller.title.value, ), ), const SizedBox(height: 10), Obx( () => TextFieldWidget( title: ConstTexts.complain.tr(), hintText: ConstTexts.typeDescription.tr(), controller: controller.comment.value, maxLine: 8, ), ), const SizedBox(height: 20), RoundedButtonFill( borderRadius: 10.r, title: ConstTexts.save.tr(), color: AppThemeData.primary300, textColor: AppThemeData.grey50, onPress: () => controller.submitComplain(), ), ], ), ), ), ); }, ); } }