Created
April 2, 2018 13:05
-
-
Save wilburx9/b0f185757cbacf96ab24e969239619ad to your computer and use it in GitHub Desktop.
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
Widget _getPostWidgets(int index) { | |
var post = postList[index]; | |
return new GestureDetector( | |
onTap: () { | |
openDetailsUI(post); | |
}, | |
child: new Container( | |
margin: const EdgeInsets.symmetric(horizontal: 5.0, vertical: 5.0), | |
child: new Card( | |
elevation: 3.0, | |
child: new Row( | |
children: <Widget>[ | |
new Container( | |
width: 150.0, | |
child: new Image.network( | |
post.thumbUrl, | |
fit: BoxFit.cover, | |
), | |
), | |
new Expanded( | |
child: new Container( | |
margin: new EdgeInsets.all(10.0), | |
child: new Text( | |
post.title, | |
style: new TextStyle(color: Colors.black, fontSize: 18.0), | |
), | |
)), | |
], | |
), | |
), | |
), | |
); | |
} | |
openDetailsUI(Post post) { | |
// The details UI will be opened here | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment