Added theme, reworked UI
This commit is contained in:
39
lib/pages/stats/widgets/global_counter.dart
Normal file
39
lib/pages/stats/widgets/global_counter.dart
Normal file
@@ -0,0 +1,39 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
class GlobalCounter extends StatelessWidget {
|
||||
final double value;
|
||||
|
||||
const GlobalCounter({super.key, required this.value});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(10),
|
||||
margin: const EdgeInsets.all(20),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
color: Theme.of(context).colorScheme.primaryContainer,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Theme.of(context).colorScheme.shadow,
|
||||
blurRadius: 10,
|
||||
offset: const Offset(2, 2),
|
||||
spreadRadius: 0.1,
|
||||
blurStyle: BlurStyle.normal,
|
||||
)
|
||||
]
|
||||
),
|
||||
alignment: Alignment.centerRight,
|
||||
child: Text(
|
||||
NumberFormat('000.00 €', 'fr_FR').format(value),
|
||||
style: TextStyle(
|
||||
fontFamily: 'NovaMono',
|
||||
fontSize: 60,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: value > 0 ? Theme.of(context).colorScheme.primary : Theme.of(context).colorScheme.error
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user