So, i am using API to fetch data and it responds with a string containing Hindi character. But when I printed the response.body it shows as following (gibberish)
Now same is shown on my emulator screen but if I copy pasted the Hindi text and render then it works:
Code snippet of both scenario i.e in title data from API response and in body same string copy pasted( and working as expected):
ListTile(
dense: true,
contentPadding: EdgeInsets.all(0),
title: Text(
data['testVersion']['name'] != null
? data['testVersion']['name']
: 'NA',
style: TextStyle(
fontFamily: 'NatoSansDevnagri',
fontWeight: FontWeight.w700,
fontSize: 18,
color: Colors.black),
),
trailing: Text(data['testVersion']['time'] != null
? data['testVersion']['time']
: 'NA'),
),
Text('Below string is copy pasted in text widget from swagger response'),
Text(
( 'इस पेपर में 150 वस्तुनिष्ठ बहुविकल्पीय प्रश्न हैं। यह प्रश्न पुस्तिका निम्नलिखित पांच खंडों से बनी है: धारा- I, 11, 111, IV और 30-30 प्रश्न प्रत्येक। उम्मीदवार को सभी वर्गों का प्रयास करना होगा। प्रत्येक प्रश्न एक अंक का है। गलत उत्तर के लिए कोई नकारात्मक अंकन नहीं है'),
),
So, please help me how is it not working from api response ?
Thanks

