-
Notifications
You must be signed in to change notification settings - Fork 104
Description
Hello, thanks in advance. I am using flutter_html_view plugin to read display blogs. I am getting html data from wordpress api. I am getting 12-13 blogs from the API. All of them are working, except one.
When I open that blog, it says "The method 'merge' was called on null ".
However, if I remove the stylesheet, I no longer get any error. Below is my code. Please check and help:
`class BlogDetails extends StatefulWidget {
Map data={};
BlogDetails({this.data});
@OverRide
_BlogDetailsState createState() => _BlogDetailsState();
}
class _BlogDetailsState extends State {
@OverRide
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.data['title']['rendered']),
),
body:
Padding(
padding: const EdgeInsets.all(8.0),
child: HtmlView(
data: widget.data['content']['rendered'],
styleSheet: MarkdownStyleSheet(
p: TextStyle(fontSize: 18, color: Colors.black, fontWeight: FontWeight.w300),
h1: TextStyle(fontSize: 25, color: Colors.black, letterSpacing: 3),
a: TextStyle(color: Colors.blue),
strong: TextStyle(fontWeight: FontWeight.w400),
blockSpacing: 15,
listIndent: 5,
),
onLaunchFail: ()=>print('Waheguru'),
),
)
);
}
}`