Initial commit
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
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: 14),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFF1A0A0A),
|
||||
borderRadius: BorderRadius.circular(14),
|
||||
border: Border.all(color: const Color(0xFF2A1515)),
|
||||
),
|
||||
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: const TextStyle(fontSize: 22, fontWeight: FontWeight.w700, color: MeloTheme.rot)),
|
||||
Text(label, style: const TextStyle(fontSize: 11, color: MeloTheme.textSekundaer)),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user