我在 Flutter 中使用 HTML 包从 Json Rest API 添加了帖子描述。默认字体大小看起来太小。如何增加以下内容的字体大小 - Html( data: user['news_description'],),
import 'package:flutter_html/flutter_html.dart';
class NewsDetails extends StatelessWidget {
var user;
var image_url = 'http://example.com/news/upload/';
NewsDetails(this.user);
@override
Widget build(BuildContext context) {
return Scaffold(
body: SingleChildScrollView(
child: Column(
children: <Widget>[
Image.network(image_url + user['news_image'], width: double.infinity, height: 300.0, fit: BoxFit.cover,),
SizedBox(height:5.0),
Padding(padding: EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Text(user['news_title'],
style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.w400),),
SizedBox(height:10.0),
Html( data: user['news_description'],)
],
)
)
],
)
),
);
}
}
Run Code Online (Sandbox Code Playgroud)