From c402615f791e54c784e03e4d961945f0474a4594 Mon Sep 17 00:00:00 2001 From: lupanfeng Date: Wed, 25 Dec 2019 21:57:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9cached=5Fnetwork=5Fimage=20?= =?UTF-8?q?=E5=8F=82=E8=80=83=20https://flutter.dev/docs/cookbook/images/c?= =?UTF-8?q?ached-images?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cookbook/images/cached-images.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbook/images/cached-images.md b/cookbook/images/cached-images.md index 741cddd..d90391c 100644 --- a/cookbook/images/cached-images.md +++ b/cookbook/images/cached-images.md @@ -20,7 +20,7 @@ new CachedNetworkImage( ```dart new CachedNetworkImage( - placeholder: new CircularProgressIndicator(), + placeholder: (context, url) => CircularProgressIndicator(), imageUrl: 'https://github.com/flutter/website/blob/master/_includes/code/layout/lakes/images/lake.jpg?raw=true', ); ``` @@ -48,7 +48,7 @@ class MyApp extends StatelessWidget { ), body: new Center( child: new CachedNetworkImage( - placeholder: new CircularProgressIndicator(), + placeholder: (context, url) => CircularProgressIndicator(), imageUrl: 'https://github.com/flutter/website/blob/master/_includes/code/layout/lakes/images/lake.jpg?raw=true', ),