Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fixing the Unicode rendering in flutter

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.

enter image description here

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.

like image 211
yubaraj poudel Avatar asked Mar 30 '18 13:03

yubaraj poudel


1 Answers

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.

like image 153
Arnold Parge Avatar answered Oct 18 '22 18:10

Arnold Parge