Home > OS >  how to translate variable to other language
how to translate variable to other language

Time:10-27

I want to translate my app into different languages.Work fine on text widget but not working when a variable comes with a TEXT widget

date == null
              ?  Text(
                  'Expected_Date'.tr,
                  
                )
              : Text(
                  'Expected_Date = $dueDate'.tr,
                  
                ),

CodePudding user response:

Change variable to this :

Text(
  '${'Expected_Date'.tr} = $dueDate'
)
  • Related