2020-04-06 11:42:07 +02:00
|
|
|
import 'package:flutter/material.dart';
|
2020-04-24 22:41:52 +02:00
|
|
|
import 'package:musicus_database/musicus_database.dart';
|
2020-04-06 11:42:07 +02:00
|
|
|
|
|
|
|
|
import 'texts.dart';
|
|
|
|
|
|
|
|
|
|
class RecordingTile extends StatelessWidget {
|
2020-04-26 15:35:45 +02:00
|
|
|
final WorkInfo workInfo;
|
|
|
|
|
final RecordingInfo recordingInfo;
|
2020-04-06 11:42:07 +02:00
|
|
|
|
|
|
|
|
RecordingTile({
|
2020-04-26 15:35:45 +02:00
|
|
|
this.workInfo,
|
|
|
|
|
this.recordingInfo,
|
2020-04-06 11:42:07 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
final textTheme = Theme.of(context).textTheme;
|
|
|
|
|
|
2020-04-26 15:35:45 +02:00
|
|
|
return Padding(
|
|
|
|
|
padding: const EdgeInsets.symmetric(
|
|
|
|
|
vertical: 8.0,
|
|
|
|
|
),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
DefaultTextStyle(
|
|
|
|
|
style: textTheme.subtitle1,
|
|
|
|
|
child: Text(workInfo.composers
|
|
|
|
|
.map((p) => '${p.firstName} ${p.lastName}')
|
|
|
|
|
.join(', ')),
|
|
|
|
|
),
|
|
|
|
|
DefaultTextStyle(
|
|
|
|
|
style: textTheme.headline6,
|
|
|
|
|
child: Text(workInfo.work.title),
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(
|
|
|
|
|
height: 4.0,
|
|
|
|
|
),
|
|
|
|
|
DefaultTextStyle(
|
|
|
|
|
style: textTheme.bodyText1,
|
|
|
|
|
child: PerformancesText(
|
|
|
|
|
performanceInfos: recordingInfo.performances,
|
2020-04-22 10:10:25 +02:00
|
|
|
),
|
2020-04-26 15:35:45 +02:00
|
|
|
),
|
|
|
|
|
],
|
2020-04-06 11:42:07 +02:00
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|