122 lines
3.6 KiB
Dart
122 lines
3.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:multimedia/widgets/tvshowDetailsCompaniesBox.dart';
|
|
import 'package:multimedia/widgets/tvshowDetailsCountriesBox.dart';
|
|
import 'package:multimedia/widgets/tvshowDetailsCrewBox.dart';
|
|
import 'package:multimedia/widgets/tvshowDetailsCastBox.dart';
|
|
import 'package:multimedia/widgets/tvshowDetailsGenreBox.dart';
|
|
import 'package:multimedia/widgets/tvshowDetailsOverviewBox.dart';
|
|
import 'package:multimedia/widgets/tvshowDetailsSettingsBox.dart';
|
|
import 'package:transparent_image/transparent_image.dart';
|
|
|
|
import '../data/tvshows.dart';
|
|
|
|
class TVShowDetailsScreen extends StatelessWidget {
|
|
TVShowDetailsScreen({
|
|
super.key,
|
|
required this.tvShow,
|
|
});
|
|
|
|
final TVShow tvShow;
|
|
String firstAiredYear = '?';
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
String url = 'http://image.tmdb.org/t/p/original${tvShow.backdropPath}';
|
|
|
|
firstAiredYear = tvShow.firstAired.toString().substring(0, 4);
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
title: Text("${tvShow.seriesName} ($firstAiredYear)"),
|
|
),
|
|
body: Stack(children: [
|
|
Container(
|
|
decoration: BoxDecoration(
|
|
image: DecorationImage(
|
|
image: NetworkImage(url),
|
|
fit: BoxFit.cover,
|
|
),
|
|
),
|
|
),
|
|
Column(
|
|
children: [
|
|
Padding(
|
|
padding: const EdgeInsets.only(
|
|
left: 10.0,
|
|
right: 10.0,
|
|
top: 10.0,
|
|
bottom: 5.0,
|
|
),
|
|
child: TVShowDetailsOverviewBox(
|
|
overview: tvShow.overview,
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.only(
|
|
left: 10.0,
|
|
right: 10.0,
|
|
top: 5.0,
|
|
bottom: 5.0,
|
|
),
|
|
child: Row(
|
|
children: [
|
|
Expanded(
|
|
child: TVShowDetailsCastBox(
|
|
cast: tvShow.cast,
|
|
),
|
|
),
|
|
const SizedBox(
|
|
width: 10,
|
|
),
|
|
Expanded(
|
|
child: TVShowDetailsCrewBox(
|
|
crew: tvShow.crew,
|
|
),
|
|
),
|
|
const SizedBox(
|
|
width: 10,
|
|
),
|
|
Expanded(
|
|
child: TVShowDetailsGenreBox(
|
|
genre: tvShow.genre,
|
|
),
|
|
),
|
|
const SizedBox(
|
|
width: 10,
|
|
),
|
|
Expanded(
|
|
child: TVShowDetailsCompaniesBox(
|
|
companies: tvShow.productionCompanies,
|
|
),
|
|
),
|
|
const SizedBox(
|
|
width: 10,
|
|
),
|
|
Expanded(
|
|
child: TVShowDetailsCountriesBox(
|
|
countries: tvShow.originCountries,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.only(
|
|
left: 10.0,
|
|
right: 10.0,
|
|
top: 5.0,
|
|
bottom: 5.0,
|
|
),
|
|
child: TVShowDetailsSettingsBox(
|
|
downloadLink: tvShow.download,
|
|
localPath: tvShow.localPath,
|
|
resolution: tvShow.resolution,
|
|
cliffhanger: tvShow.cliffhanger,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
]),
|
|
);
|
|
}
|
|
}
|