flutter_gridview_tut
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//... | |
class _MyHomePageState extends State<MyHomePage> { | |
_openImage(context, index) async { | |
showDialog( | |
context: context, | |
builder: (a) => AlertDialog( | |
title: Text("Look at this! Very Nice!"), | |
content: FadeInImage.memoryNetwork( | |
placeholder: kTransparentImage, | |
image: 'https://picsum.photos/id/$index/512'), | |
actions: <Widget>[ | |
FlatButton( | |
onPressed: () { | |
_dismissDialog(context); | |
}, | |
child: Text('Close')) | |
], | |
), | |
); | |
} | |
//... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment