Skip to content

Commit

Permalink
Implement Preview attribute grabbing on image/link posts. This means …
Browse files Browse the repository at this point in the history
…images will be higher resolution than the thumbnails we used to load
  • Loading branch information
TheNightmanCodeth committed Aug 26, 2018
1 parent ca57624 commit 1286de3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/views/widgets/image_post_card_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ class _ImagePostState extends State<ImagePost> {
.toString()
.contains(RegExp(r'(gif\b)|(png)|(jpg)'))) {
return InkWell(
child: Image(
image: NetworkImage(post.thumbnail.toString()),
fit: BoxFit.fitWidth,
width: 500.0,
child: Container(
child: Image(
image: NetworkImage(post.data["preview"]["images"][0]["source"]["url"]),
fit: BoxFit.fitWidth,
width: 500.0,
),
),
onTap: () {
Navigator.of(context).push(MaterialPageRoute(
Expand Down

0 comments on commit 1286de3

Please sign in to comment.