Files
kryz-go-flutter/lib/show_card.dart

56 lines
1.5 KiB
Dart

import 'package:flutter/material.dart';
import 'live_info_business_object.dart';
import 'time_formatter.dart';
class ShowCard extends StatelessWidget {
const ShowCard({
super.key,
required this.label,
required this.show,
required this.sourceTimezone,
required this.titleColor,
});
final String label;
final LiveInfoShowInfo? show;
final String? sourceTimezone;
final Color titleColor;
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 10),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.black.withValues(alpha: 0.06),
border: Border.all(color: Colors.black.withValues(alpha: 0.08)),
),
child: Row(
children: [
Icon(Icons.mic_external_on_rounded, color: titleColor, size: 18),
const SizedBox(width: 8),
Expanded(
child: Text(
'$label: ${show?.name ?? 'No scheduled show'}',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: Theme.of(
context,
).textTheme.bodyMedium?.copyWith(fontWeight: FontWeight.w600),
),
),
const SizedBox(width: 8),
Text(
formatStartingTime(
show?.starts,
sourceTimezone: sourceTimezone,
),
style: Theme.of(context).textTheme.labelSmall,
),
],
),
);
}
}