I want to use Style in html in flutter. My imports are :
import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_html/style.dart';
But when I use Style in the code, it shows an error that says
Style' isn't a function. (Documentation) Try correcting the name to match an existing function, or define a method or function named 'Style'.
The name 'Style' is defined in the libraries 'package:flutter_html/style.dart' and 'package:path/src/style.dart (via package:path/path.dart)'
My code :
subtitle: Html(
data: user.bangla_trans.replaceAll("\\n", "<br>"),
style: {
"body": Style(
color: Colors.green,
fontSize: FontSize(18.0),
// fontWeight: FontWeight.bold,
),
},
),