movie and tvshow list
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -166,6 +166,9 @@ class _TVShowDetailsSeasonBoxState extends State<TVShowDetailsSeasonBox> {
|
||||
color: BoxColor.titleBackgroundColor,
|
||||
borderRadius: BorderRadius.circular(17)),
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor:
|
||||
BoxColor.titleBackgroundColor),
|
||||
onPressed: initClicked,
|
||||
child: Text(
|
||||
'init',
|
||||
@@ -179,7 +182,7 @@ class _TVShowDetailsSeasonBoxState extends State<TVShowDetailsSeasonBox> {
|
||||
TableCell(
|
||||
child: Checkbox(
|
||||
side: MaterialStateBorderSide.resolveWith(
|
||||
(states) => const BorderSide(
|
||||
(states) => const BorderSide(
|
||||
width: 1.0, color: Colors.grey),
|
||||
),
|
||||
value: s.split('|')[1] == '1',
|
||||
@@ -208,6 +211,9 @@ class _TVShowDetailsSeasonBoxState extends State<TVShowDetailsSeasonBox> {
|
||||
color: BoxColor.titleBackgroundColor,
|
||||
borderRadius: BorderRadius.circular(17)),
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor:
|
||||
BoxColor.titleBackgroundColor),
|
||||
onPressed: progClicked,
|
||||
child: Text(
|
||||
'prog',
|
||||
@@ -221,7 +227,7 @@ class _TVShowDetailsSeasonBoxState extends State<TVShowDetailsSeasonBox> {
|
||||
TableCell(
|
||||
child: Checkbox(
|
||||
side: MaterialStateBorderSide.resolveWith(
|
||||
(states) => const BorderSide(
|
||||
(states) => const BorderSide(
|
||||
width: 1.0, color: Colors.grey),
|
||||
),
|
||||
value: s.split('|')[1] == '2',
|
||||
@@ -250,6 +256,9 @@ class _TVShowDetailsSeasonBoxState extends State<TVShowDetailsSeasonBox> {
|
||||
color: BoxColor.titleBackgroundColor,
|
||||
borderRadius: BorderRadius.circular(17)),
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor:
|
||||
BoxColor.titleBackgroundColor),
|
||||
onPressed: doneClicked,
|
||||
child: Text(
|
||||
'done',
|
||||
@@ -263,7 +272,7 @@ class _TVShowDetailsSeasonBoxState extends State<TVShowDetailsSeasonBox> {
|
||||
TableCell(
|
||||
child: Checkbox(
|
||||
side: MaterialStateBorderSide.resolveWith(
|
||||
(states) => const BorderSide(
|
||||
(states) => const BorderSide(
|
||||
width: 1.0, color: Colors.grey),
|
||||
),
|
||||
value: s.split('|')[1] == '3',
|
||||
|
||||
@@ -20,32 +20,66 @@ class TVShowDetailsSettingsBox extends StatelessWidget {
|
||||
final String resolution;
|
||||
final int cliffhanger;
|
||||
|
||||
List<Widget> generateInputs(BuildContext context) {
|
||||
// double width = MediaQuery.of(context).size.width;
|
||||
Widget generateInputs(BuildContext context) {
|
||||
double width = MediaQuery.of(context).size.width;
|
||||
|
||||
return [
|
||||
TVShowDetailsSettingsBoxDownloadLink(
|
||||
downloadLink: downloadLink,
|
||||
),
|
||||
const SizedBox(
|
||||
width: 5,
|
||||
),
|
||||
TVShowDetailsSettingsBoxLocalPath(
|
||||
localPath: localPath,
|
||||
),
|
||||
const SizedBox(
|
||||
width: 5,
|
||||
),
|
||||
TVShowDetailsSettingsBoxResolution(
|
||||
resolution: resolution,
|
||||
),
|
||||
const SizedBox(
|
||||
width: 5,
|
||||
),
|
||||
TVShowDetailsSettingsBoxCliffhanger(
|
||||
cliffhanger: cliffhanger,
|
||||
),
|
||||
];
|
||||
if (width < 1000) {
|
||||
return Table(
|
||||
columnWidths: const {
|
||||
0: IntrinsicColumnWidth(),
|
||||
1: IntrinsicColumnWidth(),
|
||||
},
|
||||
children: [
|
||||
TableRow(
|
||||
children: [
|
||||
TVShowDetailsSettingsBoxDownloadLink(
|
||||
downloadLink: downloadLink,
|
||||
),
|
||||
TVShowDetailsSettingsBoxResolution(
|
||||
resolution: resolution,
|
||||
),
|
||||
],
|
||||
),
|
||||
TableRow(
|
||||
children: [
|
||||
TVShowDetailsSettingsBoxLocalPath(
|
||||
localPath: localPath,
|
||||
),
|
||||
TVShowDetailsSettingsBoxCliffhanger(
|
||||
cliffhanger: cliffhanger,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
return Table(
|
||||
columnWidths: const {
|
||||
0: IntrinsicColumnWidth(),
|
||||
1: IntrinsicColumnWidth(),
|
||||
2: IntrinsicColumnWidth(),
|
||||
3: IntrinsicColumnWidth(),
|
||||
},
|
||||
children: [
|
||||
TableRow(
|
||||
children: [
|
||||
TVShowDetailsSettingsBoxDownloadLink(
|
||||
downloadLink: downloadLink,
|
||||
),
|
||||
TVShowDetailsSettingsBoxLocalPath(
|
||||
localPath: localPath,
|
||||
),
|
||||
TVShowDetailsSettingsBoxResolution(
|
||||
resolution: resolution,
|
||||
),
|
||||
TVShowDetailsSettingsBoxCliffhanger(
|
||||
cliffhanger: cliffhanger,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -88,8 +122,12 @@ class TVShowDetailsSettingsBox extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: generateInputs(context),
|
||||
Container(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: generateInputs(context),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -25,8 +25,13 @@ class _TVShowDetailsSettingsBoxCliffhangerState
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Expanded(
|
||||
flex: 1,
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 5.0,
|
||||
right: 5.0,
|
||||
top: 5.0,
|
||||
bottom: 5.0,
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
const Text(
|
||||
@@ -40,7 +45,7 @@ class _TVShowDetailsSettingsBoxCliffhangerState
|
||||
),
|
||||
Checkbox(
|
||||
side: MaterialStateBorderSide.resolveWith(
|
||||
(states) => BorderSide(width: 1.0, color: Colors.grey),
|
||||
(states) => BorderSide(width: 1.0, color: Colors.grey),
|
||||
),
|
||||
value: (_curCliffhanger == 1),
|
||||
onChanged: (bool? value) {
|
||||
|
||||
@@ -10,9 +10,7 @@ class TVShowDetailsSettingsBoxDownloadLink extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Expanded(
|
||||
flex: 10,
|
||||
child: Padding(
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 5.0,
|
||||
right: 5.0,
|
||||
@@ -36,7 +34,6 @@ class TVShowDetailsSettingsBoxDownloadLink extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,25 +10,30 @@ class TVShowDetailsSettingsBoxLocalPath extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Expanded(
|
||||
flex: 10,
|
||||
child: Column(
|
||||
children: [
|
||||
const Text(
|
||||
'Local Path',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 5.0,
|
||||
right: 5.0,
|
||||
top: 5.0,
|
||||
bottom: 5.0,
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
const Text(
|
||||
'Local Path',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
TextFormField(
|
||||
decoration: const InputDecoration(
|
||||
border: OutlineInputBorder(),
|
||||
labelText: 'Local Path',
|
||||
TextFormField(
|
||||
decoration: const InputDecoration(
|
||||
border: OutlineInputBorder(),
|
||||
labelText: 'Local Path',
|
||||
),
|
||||
initialValue: localPath,
|
||||
),
|
||||
initialValue: localPath,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,34 +41,39 @@ class _TVShowDetailsSettingsBoxResolutionState
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Expanded(
|
||||
flex: 2,
|
||||
child: Column(
|
||||
children: [
|
||||
const Text(
|
||||
'Resolution',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 5.0,
|
||||
right: 5.0,
|
||||
top: 5.0,
|
||||
bottom: 5.0,
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
const Text(
|
||||
'Resolution',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
DropdownButtonFormField(
|
||||
decoration: const InputDecoration(
|
||||
border: OutlineInputBorder(),
|
||||
labelText: 'Resolution',
|
||||
DropdownButtonFormField(
|
||||
decoration: const InputDecoration(
|
||||
border: OutlineInputBorder(),
|
||||
labelText: 'Resolution',
|
||||
),
|
||||
dropdownColor: const Color.fromARGB(255, 127, 127, 127),
|
||||
value: _curResolution,
|
||||
items: resolutions.map((String res) {
|
||||
return DropdownMenuItem(value: res, child: Text(res));
|
||||
}).toList(),
|
||||
onChanged: (String? newValue) {
|
||||
setState(() {
|
||||
_curResolution = newValue!;
|
||||
});
|
||||
},
|
||||
),
|
||||
dropdownColor: const Color.fromARGB(255, 127, 127, 127),
|
||||
value: _curResolution,
|
||||
items: resolutions.map((String res) {
|
||||
return DropdownMenuItem(value: res, child: Text(res));
|
||||
}).toList(),
|
||||
onChanged: (String? newValue) {
|
||||
setState(() {
|
||||
_curResolution = newValue!;
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user