|
|
|
|
@ -20,6 +20,227 @@ class TVShowDetailsScreen extends StatelessWidget {
|
|
|
|
|
final TVShow tvShow;
|
|
|
|
|
String firstAiredYear = '?';
|
|
|
|
|
|
|
|
|
|
Widget generateLists(BuildContext context) {
|
|
|
|
|
double width = MediaQuery.of(context).size.width;
|
|
|
|
|
|
|
|
|
|
if (width < 750) {
|
|
|
|
|
return Table(
|
|
|
|
|
children: [
|
|
|
|
|
TableRow(
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
|
left: 10.0,
|
|
|
|
|
right: 5.0,
|
|
|
|
|
top: 5.0,
|
|
|
|
|
bottom: 5.0,
|
|
|
|
|
),
|
|
|
|
|
child: TVShowDetailsCastBox(
|
|
|
|
|
cast: tvShow.cast,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
TableRow(
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
|
left: 5.0,
|
|
|
|
|
right: 5.0,
|
|
|
|
|
top: 5.0,
|
|
|
|
|
bottom: 5.0,
|
|
|
|
|
),
|
|
|
|
|
child: TVShowDetailsCrewBox(
|
|
|
|
|
crew: tvShow.crew,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
TableRow(
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
|
left: 5.0,
|
|
|
|
|
right: 5.0,
|
|
|
|
|
top: 5.0,
|
|
|
|
|
bottom: 5.0,
|
|
|
|
|
),
|
|
|
|
|
child: TVShowDetailsGenreBox(
|
|
|
|
|
genre: tvShow.genre,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
TableRow(
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
|
left: 5.0,
|
|
|
|
|
right: 5.0,
|
|
|
|
|
top: 5.0,
|
|
|
|
|
bottom: 5.0,
|
|
|
|
|
),
|
|
|
|
|
child: TVShowDetailsCompaniesBox(
|
|
|
|
|
companies: tvShow.productionCompanies,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
TableRow(
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
|
left: 5.0,
|
|
|
|
|
right: 10.0,
|
|
|
|
|
top: 5.0,
|
|
|
|
|
bottom: 5.0,
|
|
|
|
|
),
|
|
|
|
|
child: TVShowDetailsCountriesBox(
|
|
|
|
|
countries: tvShow.originCountries,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (width < 1000) {
|
|
|
|
|
return Table(
|
|
|
|
|
children: [
|
|
|
|
|
TableRow(
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
|
left: 10.0,
|
|
|
|
|
right: 5.0,
|
|
|
|
|
top: 5.0,
|
|
|
|
|
bottom: 5.0,
|
|
|
|
|
),
|
|
|
|
|
child: TVShowDetailsCastBox(
|
|
|
|
|
cast: tvShow.cast,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
|
left: 5.0,
|
|
|
|
|
right: 5.0,
|
|
|
|
|
top: 5.0,
|
|
|
|
|
bottom: 5.0,
|
|
|
|
|
),
|
|
|
|
|
child: TVShowDetailsCrewBox(
|
|
|
|
|
crew: tvShow.crew,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
|
left: 5.0,
|
|
|
|
|
right: 5.0,
|
|
|
|
|
top: 5.0,
|
|
|
|
|
bottom: 5.0,
|
|
|
|
|
),
|
|
|
|
|
child: TVShowDetailsGenreBox(
|
|
|
|
|
genre: tvShow.genre,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
TableRow(
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
|
left: 5.0,
|
|
|
|
|
right: 5.0,
|
|
|
|
|
top: 5.0,
|
|
|
|
|
bottom: 5.0,
|
|
|
|
|
),
|
|
|
|
|
child: TVShowDetailsCompaniesBox(
|
|
|
|
|
companies: tvShow.productionCompanies,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
|
left: 5.0,
|
|
|
|
|
right: 10.0,
|
|
|
|
|
top: 5.0,
|
|
|
|
|
bottom: 5.0,
|
|
|
|
|
),
|
|
|
|
|
child: TVShowDetailsCountriesBox(
|
|
|
|
|
countries: tvShow.originCountries,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
const Text(''),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return Table(
|
|
|
|
|
children: [
|
|
|
|
|
TableRow(
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
|
left: 10.0,
|
|
|
|
|
right: 5.0,
|
|
|
|
|
top: 5.0,
|
|
|
|
|
bottom: 5.0,
|
|
|
|
|
),
|
|
|
|
|
child: TVShowDetailsCastBox(
|
|
|
|
|
cast: tvShow.cast,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
|
left: 5.0,
|
|
|
|
|
right: 5.0,
|
|
|
|
|
top: 5.0,
|
|
|
|
|
bottom: 5.0,
|
|
|
|
|
),
|
|
|
|
|
child: TVShowDetailsCrewBox(
|
|
|
|
|
crew: tvShow.crew,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
|
left: 5.0,
|
|
|
|
|
right: 5.0,
|
|
|
|
|
top: 5.0,
|
|
|
|
|
bottom: 5.0,
|
|
|
|
|
),
|
|
|
|
|
child: TVShowDetailsGenreBox(
|
|
|
|
|
genre: tvShow.genre,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
|
left: 5.0,
|
|
|
|
|
right: 5.0,
|
|
|
|
|
top: 5.0,
|
|
|
|
|
bottom: 5.0,
|
|
|
|
|
),
|
|
|
|
|
child: TVShowDetailsCompaniesBox(
|
|
|
|
|
companies: tvShow.productionCompanies,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
|
left: 5.0,
|
|
|
|
|
right: 10.0,
|
|
|
|
|
top: 5.0,
|
|
|
|
|
bottom: 5.0,
|
|
|
|
|
),
|
|
|
|
|
child: TVShowDetailsCountriesBox(
|
|
|
|
|
countries: tvShow.originCountries,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
String url = 'http://image.tmdb.org/t/p/original${tvShow.backdropPath}';
|
|
|
|
|
@ -52,55 +273,7 @@ class TVShowDetailsScreen extends StatelessWidget {
|
|
|
|
|
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,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
generateLists(context),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
|
left: 10.0,
|
|
|
|
|
|