You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.1 KiB
35 lines
1.1 KiB
import 'package:cached_network_image/cached_network_image.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:teso/Classes/Firebase/Posts.dart';
|
|
import 'package:teso/Pages/Sub_Pages/Posts/UserPosts.dart';
|
|
import 'package:teso/util/consts.dart';
|
|
|
|
buildPosted(BuildContext context, FBPosts post, double height) {
|
|
return Container(
|
|
margin: EdgeInsets.all(3),
|
|
width: MediaQuery.of(context).size.width * 0.5,
|
|
height: MediaQuery.of(context).size.width * height,
|
|
color: Colors.black,
|
|
child: GestureDetector(
|
|
onTap: () {
|
|
Navigator.of(context).push(new PageRouteBuilder(
|
|
pageBuilder: (_, __, ___) => new UserPosts(postedAd: post),
|
|
));
|
|
},
|
|
child: CachedNetworkImage(
|
|
imageUrl: tesoPostThumb(
|
|
post.playbackID,
|
|
),
|
|
imageBuilder: (context, imageProvider) => FadeInImage(
|
|
width: double.infinity,
|
|
fit: BoxFit.fill,
|
|
image: imageProvider,
|
|
placeholder: AssetImage("assets/images/blank.jpg"),
|
|
),
|
|
errorWidget: (context, url, error) => Container(
|
|
color: Colors.grey[800],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|