Refactors visual widgets from live_info_panel into their own widgets.
removes the play history widget from the live info panel. Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
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.titleColor,
|
||||
});
|
||||
|
||||
final String label;
|
||||
final LiveInfoShowInfo? show;
|
||||
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(
|
||||
formatTimeWindow(show?.starts, show?.ends),
|
||||
style: Theme.of(context).textTheme.labelSmall,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user