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.
40 lines
1.3 KiB
40 lines
1.3 KiB
import 'package:cached_network_image/cached_network_image.dart';
|
|
import 'package:teso/Classes/API%20Clasess/Post.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:teso/Classes/TesoUser.dart';
|
|
import 'package:teso/Pages/Sub_Pages/Posts/SpecialPosts.dart';
|
|
import 'package:teso/providers/pageAnimations.dart';
|
|
import 'package:teso/util/consts.dart';
|
|
|
|
buildPosted(BuildContext context, Post post, double height, TesoUser user,
|
|
bool addable) {
|
|
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.push(
|
|
context,
|
|
PageTransition(
|
|
child: new ViewPost(
|
|
postedAd: post,
|
|
play: true,
|
|
),
|
|
type: PageTransitionType.fade));
|
|
},
|
|
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) =>
|
|
Image.asset("assets/images/blank.jpg"),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|