App Startseite anfang
parent
630f836c85
commit
1a7e805480
Binary file not shown.
|
After Width: | Height: | Size: 4.2 MiB |
|
|
@ -11,6 +11,7 @@ class MyApp extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
title: 'Trainer App',
|
title: 'Trainer App',
|
||||||
|
debugShowCheckedModeBanner: false,
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
colorScheme: ColorScheme.fromSeed(seedColor: Colors.pink),
|
colorScheme: ColorScheme.fromSeed(seedColor: Colors.pink),
|
||||||
useMaterial3: true,
|
useMaterial3: true,
|
||||||
|
|
@ -30,14 +31,16 @@ class HomeScreen extends StatelessWidget {
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(16.0),
|
padding: const EdgeInsets.all(16.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
const Text(
|
const Center(
|
||||||
'Hallo Trainer!',
|
child: Text(
|
||||||
style: TextStyle(
|
'Hallo Trainer!',
|
||||||
fontSize: 32,
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontSize: 32,
|
||||||
color: Colors.pink,
|
fontWeight: FontWeight.bold,
|
||||||
|
color: Colors.pink,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
|
|
@ -48,8 +51,12 @@ class HomeScreen extends StatelessWidget {
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
image: const DecorationImage(
|
image: const DecorationImage(
|
||||||
image: AssetImage('assets/training_bg.jpg'),
|
image: AssetImage('images/training_bg.jpg'),
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
|
colorFilter: ColorFilter.mode(
|
||||||
|
Colors.black26,
|
||||||
|
BlendMode.darken,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: const Center(
|
child: const Center(
|
||||||
|
|
@ -67,21 +74,27 @@ class HomeScreen extends StatelessWidget {
|
||||||
// Favorites Section
|
// Favorites Section
|
||||||
const Text(
|
const Text(
|
||||||
'Favoriten',
|
'Favoriten',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
|
||||||
fontSize: 20,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 80,
|
height: 100,
|
||||||
child: ListView(
|
child: ListView(
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
children: const [
|
children: const [
|
||||||
CategoryCircle(title: 'Kondition', icon: Icons.directions_run),
|
CategoryCircle(
|
||||||
|
title: 'Kondition',
|
||||||
|
icon: Icons.directions_run,
|
||||||
|
),
|
||||||
CategoryCircle(title: 'Wurf', icon: Icons.sports_handball),
|
CategoryCircle(title: 'Wurf', icon: Icons.sports_handball),
|
||||||
CategoryCircle(title: 'Passen', icon: Icons.sports_volleyball),
|
CategoryCircle(
|
||||||
CategoryCircle(title: 'Torhüter', icon: Icons.sports_soccer),
|
title: 'Passen',
|
||||||
|
icon: Icons.sports_volleyball,
|
||||||
|
),
|
||||||
|
CategoryCircle(
|
||||||
|
title: 'Torhüter',
|
||||||
|
icon: Icons.sports_soccer,
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -89,22 +102,27 @@ class HomeScreen extends StatelessWidget {
|
||||||
// Suggestions Section
|
// Suggestions Section
|
||||||
const Text(
|
const Text(
|
||||||
'Vorschläge',
|
'Vorschläge',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
|
||||||
fontSize: 20,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
Expanded(
|
SizedBox(
|
||||||
child: ListView(
|
height: 180,
|
||||||
|
child: PageView(
|
||||||
children: const [
|
children: const [
|
||||||
ExerciseCard(
|
ExerciseCard(
|
||||||
title: 'Wurf nach Täuschung',
|
title: 'Wurf',
|
||||||
category: 'Wurf',
|
category: 'Wurf',
|
||||||
|
icon: Icons.sports_handball,
|
||||||
),
|
),
|
||||||
ExerciseCard(
|
ExerciseCard(
|
||||||
title: 'Doppelpass',
|
title: 'Doppelpass',
|
||||||
category: 'Passen',
|
category: 'Passen',
|
||||||
|
icon: Icons.sports_volleyball,
|
||||||
|
),
|
||||||
|
ExerciseCard(
|
||||||
|
title: 'Torhüter Training',
|
||||||
|
category: 'Torhüter',
|
||||||
|
icon: Icons.sports_soccer,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -118,9 +136,18 @@ class HomeScreen extends StatelessWidget {
|
||||||
items: const [
|
items: const [
|
||||||
BottomNavigationBarItem(icon: Icon(Icons.home), label: 'Home'),
|
BottomNavigationBarItem(icon: Icon(Icons.home), label: 'Home'),
|
||||||
BottomNavigationBarItem(icon: Icon(Icons.search), label: 'Suche'),
|
BottomNavigationBarItem(icon: Icon(Icons.search), label: 'Suche'),
|
||||||
BottomNavigationBarItem(icon: Icon(Icons.favorite_border), label: 'Favoriten'),
|
BottomNavigationBarItem(
|
||||||
BottomNavigationBarItem(icon: Icon(Icons.calendar_today), label: 'Kalender'),
|
icon: Icon(Icons.favorite_border),
|
||||||
BottomNavigationBarItem(icon: Icon(Icons.person_outline), label: 'Profil'),
|
label: 'Favoriten',
|
||||||
|
),
|
||||||
|
BottomNavigationBarItem(
|
||||||
|
icon: Icon(Icons.calendar_today),
|
||||||
|
label: 'Kalender',
|
||||||
|
),
|
||||||
|
BottomNavigationBarItem(
|
||||||
|
icon: Icon(Icons.person_outline),
|
||||||
|
label: 'Profil',
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
@ -131,11 +158,7 @@ class CategoryCircle extends StatelessWidget {
|
||||||
final String title;
|
final String title;
|
||||||
final IconData icon;
|
final IconData icon;
|
||||||
|
|
||||||
const CategoryCircle({
|
const CategoryCircle({super.key, required this.title, required this.icon});
|
||||||
super.key,
|
|
||||||
required this.title,
|
|
||||||
required this.icon,
|
|
||||||
});
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
@ -144,8 +167,8 @@ class CategoryCircle extends StatelessWidget {
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
width: 50,
|
width: 70,
|
||||||
height: 50,
|
height: 70,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).colorScheme.primary.withOpacity(0.1),
|
color: Theme.of(context).colorScheme.primary.withOpacity(0.1),
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
|
|
@ -153,12 +176,13 @@ class CategoryCircle extends StatelessWidget {
|
||||||
child: Icon(
|
child: Icon(
|
||||||
icon,
|
icon,
|
||||||
color: Theme.of(context).colorScheme.primary,
|
color: Theme.of(context).colorScheme.primary,
|
||||||
|
size: 35,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 8),
|
||||||
Text(
|
Text(
|
||||||
title,
|
title,
|
||||||
style: const TextStyle(fontSize: 12),
|
style: const TextStyle(fontSize: 14, fontWeight: FontWeight.bold),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -169,28 +193,51 @@ class CategoryCircle extends StatelessWidget {
|
||||||
class ExerciseCard extends StatelessWidget {
|
class ExerciseCard extends StatelessWidget {
|
||||||
final String title;
|
final String title;
|
||||||
final String category;
|
final String category;
|
||||||
|
final IconData icon;
|
||||||
|
|
||||||
const ExerciseCard({
|
const ExerciseCard({
|
||||||
super.key,
|
super.key,
|
||||||
required this.title,
|
required this.title,
|
||||||
required this.category,
|
required this.category,
|
||||||
|
required this.icon,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Card(
|
return Card(
|
||||||
margin: const EdgeInsets.only(bottom: 8.0),
|
margin: const EdgeInsets.symmetric(horizontal: 8.0, vertical: 4.0),
|
||||||
child: ListTile(
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
||||||
title: Text(title),
|
child: Container(
|
||||||
subtitle: Text(category),
|
width: double.infinity,
|
||||||
leading: Container(
|
height: 180,
|
||||||
width: 60,
|
padding: const EdgeInsets.all(16.0),
|
||||||
height: 60,
|
child: Column(
|
||||||
decoration: BoxDecoration(
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
color: Colors.grey[200],
|
children: [
|
||||||
borderRadius: BorderRadius.circular(8),
|
Icon(icon, size: 60, color: Theme.of(context).colorScheme.primary),
|
||||||
),
|
const SizedBox(height: 16),
|
||||||
child: const Icon(Icons.sports_handball),
|
Text(
|
||||||
|
title,
|
||||||
|
style: const TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
Container(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 4),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Theme.of(context).colorScheme.primary.withOpacity(0.1),
|
||||||
|
borderRadius: BorderRadius.circular(16),
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
category,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
color: Theme.of(context).colorScheme.primary,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,9 @@ flutter:
|
||||||
# the material Icons class.
|
# the material Icons class.
|
||||||
uses-material-design: true
|
uses-material-design: true
|
||||||
|
|
||||||
|
assets:
|
||||||
|
- images/training_bg.jpg
|
||||||
|
|
||||||
# To add assets to your application, add an assets section, like this:
|
# To add assets to your application, add an assets section, like this:
|
||||||
# assets:
|
# assets:
|
||||||
# - images/a_dot_burr.jpeg
|
# - images/a_dot_burr.jpeg
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue