diff --git a/gsf/lib/views/pages/feedback/feedback.dart b/gsf/lib/views/pages/feedback/feedback.dart index cfc14e7..56fb52f 100644 --- a/gsf/lib/views/pages/feedback/feedback.dart +++ b/gsf/lib/views/pages/feedback/feedback.dart @@ -25,6 +25,7 @@ class _FeedBackState extends State { RxBool active = false.obs; RxBool active1 = false.obs; + final TextEditingController _textarea = TextEditingController(); @override void initState() { @@ -33,6 +34,7 @@ class _FeedBackState extends State { if (getFeedback!.result != null && getFeedback!.result!.isNotEmpty) { int lastIndex = getFeedback!.result!.length - 1; reaction = getFeedback!.result![lastIndex].reaction; + message = getFeedback!.result![lastIndex].message; if (reaction == 0) { active.value = true; @@ -42,6 +44,7 @@ class _FeedBackState extends State { active1.value = true; } } + _textarea.text = message!; super.initState(); } @@ -57,10 +60,11 @@ class _FeedBackState extends State { // RxBool feedActive = true.obs; GlobalKey _formkey = GlobalKey(); - final TextEditingController _textarea = TextEditingController(); + // RxString getapidata = ''.obs; // RxString getapidata2 = ''.obs; _feedbackbutton() async { + // FocusScope.of(context).unfocus(); if (!active.value && !active1.value) { print("Please select a smile container before submitting."); Flushbar( @@ -88,6 +92,7 @@ class _FeedBackState extends State { final resp = await FeedbackServices().feedbackApi(updata); if (resp.status == ResponseStatus.SUCCESS) { // btnController.reset(); + Get.to(() => Home()); print('data---$data'); Flushbar( @@ -193,9 +198,7 @@ class _FeedBackState extends State { maxLines: 12, decoration: InputDecoration( fillColor: const Color(0xff212121), - hintText: getFeedback!.result!.isNotEmpty - ? message - : "Type your feedback...", + hintText: "Type your feedback...", contentPadding: const EdgeInsets.only( top: 20, bottom: 20, @@ -278,7 +281,8 @@ class _FeedBackState extends State { ), // const Spacer(), InkWell( - onTap: () { + onTap: () async { + FocusScope.of(context).unfocus(); _feedbackbutton(); }, child: Container(