chore: init repository with project sources

This commit is contained in:
2025-10-30 10:29:33 +01:00
commit 65f1175ba7
97 changed files with 7762 additions and 0 deletions
@@ -0,0 +1,59 @@
import 'package:flutter/material.dart';
import '../../../../core/status.dart';
import '../../data/episode_model.dart';
class EpisodeStatusStrip extends StatelessWidget {
final List<EpisodeItem> episodes;
final double barWidth; // Breite eines Quadrats
final double barHeight; // Höhe eines Quadrats
final double spacing; // Abstand zwischen Quadraten
const EpisodeStatusStrip({
super.key,
required this.episodes,
this.barWidth = 7,
this.barHeight = 25,
this.spacing = 0,
});
Color _fill(ItemStatus s) {
switch (s) {
case ItemStatus.Init:
return Colors.grey.shade200; // wie Filme (Init)
case ItemStatus.Progress:
return Colors.blue; // wie Filme (Progress)
case ItemStatus.Done:
return Colors.green; // wie Filme (Done)
}
}
@override
Widget build(BuildContext context) {
if (episodes.isEmpty) return const SizedBox.shrink();
return SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(
children: [
for (int i = 0; i < episodes.length; i++) ...[
Container(
width: barWidth,
height: barHeight,
decoration: BoxDecoration(
color: _fill(episodes[i].status),
border: Border(
left: BorderSide(color: Colors.black, width: i == 0 ? 1 : 0),
top: const BorderSide(color: Colors.black, width: 1),
right: const BorderSide(color: Colors.black, width: 1),
bottom: const BorderSide(color: Colors.black, width: 1),
),
),
),
if (i != episodes.length - 1 && spacing != 0) SizedBox(width: spacing),
],
],
),
);
}
}