- Design-System: MeloDesignTokens ThemeExtension, Outfit-Font, Farben #0B0B10/#14141C/#1C1C26 - Akzentfarbe-User-Einstellung behalten (MeloTheme.akzentNotifier), Gradient aus Akzent - Startseite: Hero-Weiterhören-Karte mit Cover, Titel, Glow-Play-Button - 2-stufige Einstellungen: Standard + Expertenmodus (SharedPreferences Key 'experten_modus') - Komponenten: Pill-Buttons (radius 999), Card-Radius 20, Glow-Shadow, PressScale-Widget - Login: Gradient-Button mit Akzent-Glow - 199 Tests grün (194 bestehend + 5 neu): ThemeExtension, Expertenmodus, Akzent, PressScale, Hero - flutter analyze lib/ + test/ = 0 Issues - KEIN APK
51 lines
1.4 KiB
Dart
51 lines
1.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import '../utils/farb_theme.dart';
|
|
|
|
class StatistikCard extends StatelessWidget {
|
|
final int anzahlSongs;
|
|
final String gesamtMB;
|
|
final int gesamtMin;
|
|
final int anzahlFavoriten;
|
|
|
|
const StatistikCard({
|
|
super.key,
|
|
required this.anzahlSongs,
|
|
required this.gesamtMB,
|
|
required this.gesamtMin,
|
|
required this.anzahlFavoriten,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 8),
|
|
child: Container(
|
|
padding: const EdgeInsets.symmetric(vertical: 16),
|
|
decoration: BoxDecoration(
|
|
color: MeloTheme.dunkel1,
|
|
borderRadius: BorderRadius.circular(20),
|
|
border: Border.all(color: MeloTheme.dunkel2),
|
|
),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
children: [
|
|
_item('$anzahlSongs', 'Lieder'),
|
|
_item(gesamtMB, 'MB'),
|
|
_item('$gesamtMin', 'Min'),
|
|
_item('$anzahlFavoriten', 'Favoriten'),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget _item(String zahl, String label) {
|
|
return Column(
|
|
children: [
|
|
Text(zahl, style: TextStyle(fontSize: 22, fontWeight: FontWeight.w700, color: MeloTheme.akzent)),
|
|
Text(label, style: const TextStyle(fontSize: 11, color: MeloTheme.textSekundaer)),
|
|
],
|
|
);
|
|
}
|
|
}
|