本文用于记录分析Imge图片加载流程源码分析学习笔记
切入点是Image.network,加载网络图片
构造方法会创建NetworkImage,加载图片的实现类,父类是ImageProvider
加载本地图片等等都是类似
下面进入_ImageState类
void resolveStreamForKey(ImageConfiguration configuration, ImageStream stream, T key, ImageErrorListener handleError) { // This is an unusual edge case where someone has told us that they found // the image we want before getting to this method. We should avoid calling // load again, but still update the image cache with LRU information. //图片正在加载就直接返回,等待图片加载完成之后刷新页面 if (stream.completer != null) { final Imag