119 lines
3.7 KiB
Dart
119 lines
3.7 KiB
Dart
import 'package:flutter/material.dart';
|
|
import '../widgets/category_circle.dart';
|
|
import '../widgets/exercise_card.dart';
|
|
|
|
class HomeTab extends StatelessWidget {
|
|
const HomeTab({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return SafeArea(
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(16.0),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: [
|
|
// Begrüßung
|
|
const Center(
|
|
child: Text(
|
|
'Hallo Trainer!',
|
|
style: TextStyle(
|
|
fontSize: 32,
|
|
fontWeight: FontWeight.bold,
|
|
color: Colors.pink,
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(height: 20),
|
|
// Bild mit Titel
|
|
Container(
|
|
height: 200,
|
|
width: double.infinity,
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.circular(12),
|
|
image: const DecorationImage(
|
|
image: AssetImage('images/training_bg.jpg'),
|
|
fit: BoxFit.cover,
|
|
colorFilter: ColorFilter.mode(
|
|
Colors.black26,
|
|
BlendMode.darken,
|
|
),
|
|
),
|
|
),
|
|
child: Center(
|
|
child: Text(
|
|
'Dein nächstes Training',
|
|
style: TextStyle(
|
|
color: Colors.blueAccent,
|
|
fontSize: 24,
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(height: 20),
|
|
// Favoriten Kategorien
|
|
const Text(
|
|
'Favoriten',
|
|
style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
|
|
),
|
|
const SizedBox(height: 10),
|
|
SizedBox(
|
|
height: 100,
|
|
child: ListView(
|
|
scrollDirection: Axis.horizontal,
|
|
children: const [
|
|
CategoryCircle(
|
|
title: 'Kondition',
|
|
icon: Icons.directions_run,
|
|
),
|
|
CategoryCircle(title: 'Wurf', icon: Icons.sports_handball),
|
|
CategoryCircle(
|
|
title: 'Passen',
|
|
icon: Icons.sports_volleyball,
|
|
),
|
|
CategoryCircle(title: 'Torhüter', icon: Icons.sports_soccer),
|
|
],
|
|
),
|
|
),
|
|
const SizedBox(height: 20),
|
|
// Vorschläge
|
|
const Text(
|
|
'Vorschläge',
|
|
style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
|
|
),
|
|
const SizedBox(height: 10),
|
|
SizedBox(
|
|
height: 180,
|
|
child: Stack(
|
|
alignment: Alignment.center,
|
|
children: [
|
|
PageView(
|
|
children: const [
|
|
ExerciseCard(
|
|
title: 'Wurf',
|
|
category: 'Wurf',
|
|
icon: Icons.sports_handball,
|
|
),
|
|
ExerciseCard(
|
|
title: 'Doppelpass',
|
|
category: 'Passen',
|
|
icon: Icons.sports_volleyball,
|
|
),
|
|
ExerciseCard(
|
|
title: 'Torhüter Training',
|
|
category: 'Torhüter',
|
|
icon: Icons.sports_soccer,
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|