From 60759086791e2a46194439c248656a0cf25fe5fa Mon Sep 17 00:00:00 2001 From: Caijinglong Date: Fri, 12 Oct 2018 08:58:31 +0800 Subject: [PATCH] update example --- example/lib/photo_list.dart | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/example/lib/photo_list.dart b/example/lib/photo_list.dart index fac675a2..24ac2956 100644 --- a/example/lib/photo_list.dart +++ b/example/lib/photo_list.dart @@ -32,11 +32,24 @@ class _PhotoListState extends State { future: entity.thumbData, builder: (BuildContext context, AsyncSnapshot snapshot) { if (snapshot.connectionState == ConnectionState.done && snapshot.data != null) { - return Image.memory( - snapshot.data, - fit: BoxFit.cover, - width: double.infinity, - height: double.infinity, + return Stack( + children: [ + Image.memory( + snapshot.data, + fit: BoxFit.cover, + width: double.infinity, + height: double.infinity, + ), + IgnorePointer( + child: Container( + alignment: Alignment.center, + child: Text( + '${entity.type}', + style: TextStyle(color: Colors.white), + ), + ), + ), + ], ); } return Center(