From c546fe457723aedcf5d53f6e309c8ffadd7f61b5 Mon Sep 17 00:00:00 2001 From: Sachin s p <52343650+SachinPremkumar@users.noreply.github.com> Date: Tue, 23 Apr 2024 09:15:39 +0530 Subject: [PATCH] bug fixing (#312) Signed-off-by: Sachin S P Co-authored-by: Sachin S P --- .../widgets/document_upload_control.dart | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/lib/ui/process_ui/widgets/document_upload_control.dart b/lib/ui/process_ui/widgets/document_upload_control.dart index b9e167084..c8a1e79ad 100644 --- a/lib/ui/process_ui/widgets/document_upload_control.dart +++ b/lib/ui/process_ui/widgets/document_upload_control.dart @@ -40,6 +40,7 @@ class DocumentUploadControl extends StatefulWidget { class _DocumentUploadControlState extends State { late Future> myGetDocumentCategoryFuture; + Map transliterationLangMapper = {}; FixedExtentScrollController scrollController = FixedExtentScrollController(); @override @@ -69,6 +70,12 @@ class _DocumentUploadControlState extends State { super.initState(); } + @override + void didChangeDependencies() { + super.didChangeDependencies(); + _getListOfReferenceNumber(); + } + String _getDataFromMap(String lang) { String response = ""; @@ -229,6 +236,16 @@ class _DocumentUploadControlState extends State { } } + _getListOfReferenceNumber(){ + List langList = context.read().languages; + for(var element in langList){ + setState(() { + transliterationLangMapper[element.toString()] = + AppLocalizations.of(context)!.referenceNumber(element.toString()); + }); + } + } + @override Widget build(BuildContext context) { bool isMobile = MediaQuery.of(context).size.width < 750; @@ -557,19 +574,9 @@ class _DocumentUploadControlState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Row( - children: [ - Text( - AppLocalizations.of(context)!.referenceNumber(lang), - style: TextStyle(fontSize: isPortrait && !isMobileSize ? 18 : 14, fontWeight: semiBold), - ), - const SizedBox( - width: 5, - ), - ], - ), + CustomLabel(field: Field(label: transliterationLangMapper,required: false)), SizedBox( - height: 14.h, + height: 10.h, ), TextFormField( autovalidateMode: AutovalidateMode.onUserInteraction,