use a Drawercontext to be able to have a specific scaffold for each page
This commit is contained in:
@ -7,6 +7,7 @@ import 'package:openmediacentermobile/types/video_data.dart';
|
||||
import 'package:openmediacentermobile/preview/actor_tile.dart';
|
||||
|
||||
import '../api/api.dart';
|
||||
import '../log/log.dart';
|
||||
import '../types/actor.dart';
|
||||
|
||||
class InfoView extends StatefulWidget {
|
||||
@ -51,11 +52,21 @@ class _InfoViewState extends State<InfoView> {
|
||||
} else if (snapshot.hasData) {
|
||||
final actors = snapshot.data;
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(left: 10, right: 10, top: 30),
|
||||
padding: EdgeInsets.only(left: 10, right: 10, top: 60),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text("Likes: ${widget.vdata.likes}"),
|
||||
IconButton(onPressed: () async {
|
||||
final data = await API
|
||||
.query("video", "addLike", {'MovieId': widget.vdata.movieId});
|
||||
final d = jsonDecode(data);
|
||||
if (d["result"] != 'success') {
|
||||
Log.w(d);
|
||||
}
|
||||
// bit hacky but it works
|
||||
widget.vdata.likes += 1;
|
||||
}, icon: Icon(Icons.thumb_up)),
|
||||
Text("Quality: ${widget.vdata.quality}"),
|
||||
Text("Length: ${widget.vdata.length}sec"),
|
||||
Text("Actors:"),
|
||||
|
@ -1,6 +1,7 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import '../api/api.dart';
|
||||
import '../api/token.dart';
|
||||
@ -64,9 +65,9 @@ class _VideoScreenState extends State<VideoScreen> {
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
_controller.dispose();
|
||||
_appBarTimer?.cancel();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
void _setAppBarTimer() {
|
||||
|
Reference in New Issue
Block a user