Skip to content

Commit

Permalink
bug fixing (#312)
Browse files Browse the repository at this point in the history
Signed-off-by: Sachin S P <[email protected]>
Co-authored-by: Sachin S P <[email protected]>
  • Loading branch information
SachinPremkumar and Sachin S P authored Apr 23, 2024
1 parent a153886 commit c546fe4
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions lib/ui/process_ui/widgets/document_upload_control.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class DocumentUploadControl extends StatefulWidget {
class _DocumentUploadControlState extends State<DocumentUploadControl> {

late Future<List<String?>> myGetDocumentCategoryFuture;
Map<String, String> transliterationLangMapper = {};

FixedExtentScrollController scrollController = FixedExtentScrollController();
@override
Expand Down Expand Up @@ -69,6 +70,12 @@ class _DocumentUploadControlState extends State<DocumentUploadControl> {
super.initState();
}

@override
void didChangeDependencies() {
super.didChangeDependencies();
_getListOfReferenceNumber();
}


String _getDataFromMap(String lang) {
String response = "";
Expand Down Expand Up @@ -229,6 +236,16 @@ class _DocumentUploadControlState extends State<DocumentUploadControl> {
}
}

_getListOfReferenceNumber(){
List<String?> langList = context.read<GlobalProvider>().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;
Expand Down Expand Up @@ -557,19 +574,9 @@ class _DocumentUploadControlState extends State<DocumentUploadControl> {
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,
Expand Down

0 comments on commit c546fe4

Please sign in to comment.