Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
  • Loading branch information
CaiJingLong committed Oct 12, 2018
1 parent 6bb13eb commit 6075908
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions example/lib/photo_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,24 @@ class _PhotoListState extends State<PhotoList> {
future: entity.thumbData,
builder: (BuildContext context, AsyncSnapshot<Uint8List> 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: <Widget>[
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(
Expand Down

0 comments on commit 6075908

Please sign in to comment.