如何使用precacheImage()
fromSvgPicture
包flutter_svg: 0.17.4
?
我想在后台加载 svg 图片
Container _graphicSection() {
final String graphic = 'assets/graphic/two_people.svg';
return Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
SvgPicture.asset(
graphic,
height: 150,
alignment: Alignment.center,
)
],
));
}
有人知道如何使用precachImage()
函数加载 svg 图片吗?