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.
103 lines
3.2 KiB
103 lines
3.2 KiB
// import 'dart:typed_data';
|
|
|
|
// import 'package:teso/Classes/API%20Clasess/PostedAd.dart';
|
|
// import 'package:teso/Pages/PageWidgets/Posts/comment.dart';
|
|
// import 'package:teso/Pages/PageWidgets/Posts/expandedPost.dart';
|
|
// import 'package:flutter/material.dart';
|
|
//
|
|
// import 'package:teso/util/consts.dart';
|
|
// import 'package:video_player/video_player.dart';
|
|
|
|
// class PostDetails extends StatefulWidget {
|
|
// final PostedAd type;
|
|
// const PostDetails({Key key, this.type}) : super(key: key);
|
|
// @override
|
|
// _PostDetailsState createState() => _PostDetailsState(post: type);
|
|
// }
|
|
|
|
// class _PostDetailsState extends State<PostDetails> {
|
|
// PostedAd post;
|
|
// _PostDetailsState({this.post});
|
|
// bool available = false;
|
|
// Uint8List bytes;
|
|
// TextEditingController controller;
|
|
// VideoPlayerController _videoPlayerController;
|
|
|
|
// void deleteDialog(context) {
|
|
// showModalBottomSheet(
|
|
// context: context,
|
|
// shape: RoundedRectangleBorder(
|
|
// borderRadius: BorderRadius.vertical(top: Radius.circular(30.0)),
|
|
// ),
|
|
// builder: (BuildContext bc) {
|
|
// return Container(
|
|
// child: new Wrap(
|
|
// children: <Widget>[
|
|
// new Container(
|
|
// width: double.infinity,
|
|
// margin: EdgeInsets.only(
|
|
// top: 20.0,
|
|
// bottom: 12.0,
|
|
// ),
|
|
// child: Center(
|
|
// child: Text(
|
|
// "Delete post",
|
|
// style: TextStyle(
|
|
// fontSize: 12.0,
|
|
// ),
|
|
// ),
|
|
// )),
|
|
// Padding(
|
|
// padding: const EdgeInsets.symmetric(horizontal: 20.0),
|
|
// child: Divider(),
|
|
// ),
|
|
// new ListTile(
|
|
// leading: new Icon(MaterialCommunityIcons.trash_can),
|
|
// title: new Text('Delete'),
|
|
// onTap: () => print("Delete")),
|
|
// ],
|
|
// ),
|
|
// );
|
|
// },
|
|
// );
|
|
// }
|
|
|
|
// @override
|
|
// void initState() {
|
|
// super.initState();
|
|
// _videoPlayerController =
|
|
// VideoPlayerController.network(tesoStreaming + post.post.path)
|
|
// ..initialize().then((_) {
|
|
// _videoPlayerController.play();
|
|
// _videoPlayerController.setLooping(true);
|
|
// setState(() {});
|
|
// });
|
|
// }
|
|
|
|
// @override
|
|
// Widget build(BuildContext context) {
|
|
// return Scaffold(
|
|
// appBar: null,
|
|
// body: Container(
|
|
// margin: EdgeInsets.only(
|
|
// top: 50,
|
|
// left: 10,
|
|
// right: 10,
|
|
// ),
|
|
// height: MediaQuery.of(context).size.height,
|
|
// width: MediaQuery.of(context).size.width,
|
|
// child: SingleChildScrollView(
|
|
// scrollDirection: Axis.vertical,
|
|
// child: Column(
|
|
// children: [
|
|
// buildPostDetails(
|
|
// context, post, deleteDialog, _videoPlayerController),
|
|
// Padding(padding: EdgeInsets.all(05)),
|
|
// buildCommentTile(context, available, bytes, controller),
|
|
// ],
|
|
// ),
|
|
// ),
|
|
// ),
|
|
// );
|
|
// }
|
|
// }
|
|
|