fixing the Unicode rendering in flutter
2,540
Your text has html tags. It should be rendered/viewed as HTML. Check this package. This should solve your problem of hindi rendering as well.
NOTE: If you are unable to install this package, update your flutter as this package is very new and built with the latest flutter.
Author by
yubaraj poudel
I am a computer engineer and actively working as the android developer since 2013. I do have wide interest in the robotics and with other programming language.Besides android programming i have interest in writing the poems.
Updated on December 04, 2022Comments
-
yubaraj poudel over 1 year
I am new to flutter, I manage to receive the data from server and decoded it as well, when i tried to display in the text, it shows like below.
Code to display the text
import 'package:flutter/material.dart'; import 'package:sachchirashifal/model/serverdata.dart'; class RashiFalDetail extends StatelessWidget { Data rashi; RashiFalDetail({this.rashi}); @override Widget build(BuildContext context) { return new Container( child: new Text(rashi.desc, style: new TextStyle( fontSize: 18.0, color: Colors.black )) ); } }
Any suggestions will be great, Thank u.
-
yubaraj poudel about 6 yearsI will try this
-
yubaraj poudel about 6 yearsThis removed the html tags but text are still showing like above.
-
Arnold Parge about 6 yearsOkay. have you tried hindi font? download and add a hindi font in pubspec.yaml and appl that font only to the hindi text. Do let me know what happens!
-
yubaraj poudel about 6 yearsI tried with Hindi font aswell but i guess the problem is with Text widget itself
-
Arnold Parge about 6 yearsHave you tried other Hindi texts. Could be that actual text is not in the correct format.
-
sonill about 6 yearsI have same problem. I tried with Nepali Unicode fonts. No luck yet.
-
Isura Manchanayake about 3 yearsI still get this issue. Has anyone been able to find a solution?