Initial commit

This commit is contained in:
Kazimierz Ciołek
2026-02-19 02:49:29 +01:00
commit 782986a632
148 changed files with 29230 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
import 'package:flutter/material.dart';
import 'package:trainhub_flutter/domain/entities/analysis_session.dart';
class AnalysisSessionList extends StatelessWidget {
final List<AnalysisSessionEntity> sessions;
final Function(AnalysisSessionEntity) onSessionSelected;
final Function(AnalysisSessionEntity) onDeleteSession;
const AnalysisSessionList({
super.key,
required this.sessions,
required this.onSessionSelected,
required this.onDeleteSession,
});
@override
Widget build(BuildContext context) {
if (sessions.isEmpty) {
return const Center(
child: Text('No analysis sessions yet. Tap + to create one.'),
);
}
return ListView.builder(
itemCount: sessions.length,
itemBuilder: (context, index) {
final session = sessions[index];
return ListTile(
leading: const CircleAvatar(child: Icon(Icons.video_library)),
title: Text(session.name),
subtitle: Text(session.date),
trailing: IconButton(
icon: const Icon(Icons.delete_outline),
onPressed: () => onDeleteSession(session),
),
onTap: () => onSessionSelected(session),
);
},
);
}
}