Use the precacheImage
function to start loading an image before your drawer is built. For example, in the widget that contains your drawer:
class MyWidgetState extends State<MyWidget> {
@override
void initState() {
// adjust the provider based on the image type
precacheImage(new AssetImage('...'));
super.initState();
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…