From 3c93245e4d24eb633d2058fcdaa5c38ebf7c0bfd Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Sun, 2 Nov 2025 11:32:04 +0300 Subject: [PATCH] census q type changed from int to string. --- .../traf_module/create_traf_request_page.dart | 16 ++++++++-------- lib/modules/traf_module/traf_request_model.dart | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/modules/traf_module/create_traf_request_page.dart b/lib/modules/traf_module/create_traf_request_page.dart index e2d066a9..fe9dc296 100644 --- a/lib/modules/traf_module/create_traf_request_page.dart +++ b/lib/modules/traf_module/create_traf_request_page.dart @@ -194,9 +194,9 @@ class _CreateTRAFRequestPageState extends State { backgroundColor: AppColor.fieldBgColor(context), labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)), showShadow: false, - textInputType: TextInputType.number, + textInputType: TextInputType.text, onChange: (value) { - trafRequest?.censusQ1 = int.tryParse(value); + trafRequest?.censusQ1 = value; }, ), 12.height, @@ -207,9 +207,9 @@ class _CreateTRAFRequestPageState extends State { backgroundColor: AppColor.fieldBgColor(context), labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)), showShadow: false, - textInputType: TextInputType.number, + textInputType: TextInputType.text, onChange: (value) { - trafRequest?.censusQ2 = int.tryParse(value); + trafRequest?.censusQ2 = value; }, ), 12.height, @@ -220,9 +220,9 @@ class _CreateTRAFRequestPageState extends State { backgroundColor: AppColor.fieldBgColor(context), labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)), showShadow: false, - textInputType: TextInputType.number, + textInputType: TextInputType.text, onChange: (value) { - trafRequest?.censusQ3 = int.tryParse(value); + trafRequest?.censusQ3 = value; }, ), 12.height, @@ -233,9 +233,9 @@ class _CreateTRAFRequestPageState extends State { backgroundColor: AppColor.fieldBgColor(context), labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)), showShadow: false, - textInputType: TextInputType.number, + textInputType: TextInputType.text, onChange: (value) { - trafRequest?.censusQ4 = int.tryParse(value); + trafRequest?.censusQ4 = value; }, ), 12.height, diff --git a/lib/modules/traf_module/traf_request_model.dart b/lib/modules/traf_module/traf_request_model.dart index 021b6199..7818ee90 100644 --- a/lib/modules/traf_module/traf_request_model.dart +++ b/lib/modules/traf_module/traf_request_model.dart @@ -74,10 +74,10 @@ class TrafRequestDataModel { int? qty; String? purposeAnswer; String? currentPractise; - int? censusQ1; - int? censusQ2; - int? censusQ3; - int? censusQ4; + String? censusQ1; + String? censusQ2; + String? censusQ3; + String? censusQ4; List? trafContacts; int? usingSolelyOrSharedId; String? usingSolelyOrSharedName;