141 lines
4.5 KiB
Dart
141 lines
4.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'package:multimedia/constants.dart';
|
|
|
|
class TVShowDetailsCrewBox extends StatelessWidget {
|
|
const TVShowDetailsCrewBox({super.key, required this.crew});
|
|
|
|
final String crew;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
List<String> crewList = crew.split('|');
|
|
|
|
return Container(
|
|
decoration: BoxDecoration(
|
|
color: BoxColor.backgroundColor,
|
|
borderRadius: const BorderRadius.all(
|
|
Radius.circular(10.0),
|
|
),
|
|
),
|
|
child: Column(
|
|
children: [
|
|
Padding(
|
|
padding: const EdgeInsets.only(
|
|
left: 5.0,
|
|
right: 5.0,
|
|
top: 10.0,
|
|
bottom: 5.0,
|
|
),
|
|
child: Container(
|
|
decoration: BoxDecoration(
|
|
color: BoxColor.titleBackgroundColor,
|
|
borderRadius: const BorderRadius.all(
|
|
Radius.circular(10.0),
|
|
),
|
|
),
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
children: [
|
|
Text(
|
|
'Crew',
|
|
style: TextStyle(
|
|
fontWeight: FontWeight.bold,
|
|
color: BoxColor.titleColor),
|
|
textAlign: TextAlign.center,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.only(
|
|
left: 10.0,
|
|
right: 10.0,
|
|
top: 0.0,
|
|
bottom: 10.0,
|
|
),
|
|
child: Table(
|
|
border: const TableBorder(
|
|
bottom: BorderSide(), horizontalInside: BorderSide()),
|
|
children: const [
|
|
TableRow(children: [
|
|
Padding(
|
|
padding: EdgeInsets.symmetric(vertical: 1, horizontal: 4),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
children: [
|
|
Text(
|
|
'Name',
|
|
style: TextStyle(fontWeight: FontWeight.bold),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
Padding(
|
|
padding: EdgeInsets.symmetric(vertical: 1, horizontal: 4),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
'Crew',
|
|
style: TextStyle(fontWeight: FontWeight.bold),
|
|
),
|
|
],
|
|
),
|
|
)
|
|
]),
|
|
],
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.only(
|
|
left: 10.0,
|
|
right: 10.0,
|
|
top: 0.0,
|
|
bottom: 10.0,
|
|
),
|
|
child: SingleChildScrollView(
|
|
child: SizedBox(
|
|
height: 200,
|
|
child: ListView(
|
|
children: [
|
|
Table(
|
|
children: [
|
|
for (var c in crewList)
|
|
TableRow(children: [
|
|
Padding(
|
|
padding: const EdgeInsets.symmetric(
|
|
vertical: 1, horizontal: 4),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
children: [
|
|
Text(c.split(',').first),
|
|
],
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.symmetric(
|
|
vertical: 1, horizontal: 4),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(c.split(',').last),
|
|
],
|
|
),
|
|
)
|
|
]),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|