FadeInImage是一个可以在图片加载时给予加载动画的,加载图片的一个Widget.

FadeInImage
FadeInImage
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import 'package:flutter/material.dart';

class GoogleFadeInImage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return FadeInImage.assetNetwork(
fadeInCurve: Curves.easeIn,
fadeOutCurve: Curves.easeOut,
fadeInDuration: Duration(seconds: 2),
fadeOutDuration: Duration(seconds: 2),
placeholder: 'assets/images/wechat.jpg',
image:
'http://img3.redocn.com/tupian/20141202/xiaochaoyeshanjunmeishi_3491615.jpg',
);
}
}