Update: 2026-06-26 17:29:23
This commit is contained in:
@@ -12,23 +12,23 @@ class DashboardStatCard extends StatelessWidget {
|
||||
final Color? valueColor;
|
||||
|
||||
const DashboardStatCard({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.title,
|
||||
required this.value,
|
||||
this.icon,
|
||||
this.iconColor,
|
||||
this.backgroundColor,
|
||||
this.valueColor,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// Attempt to use AppStyle.boxDecoration1 properties if it's a BoxDecoration
|
||||
BoxDecoration? baseDecoration = AppStyle.boxDecoration1;
|
||||
Color? finalBackgroundColor =
|
||||
backgroundColor ?? baseDecoration?.color ?? Theme.of(context).cardColor;
|
||||
backgroundColor ?? baseDecoration.color ?? Theme.of(context).cardColor;
|
||||
BorderRadius? finalBorderRadius =
|
||||
baseDecoration?.borderRadius?.resolve(Directionality.of(context)) ??
|
||||
baseDecoration.borderRadius?.resolve(Directionality.of(context)) ??
|
||||
BorderRadius.circular(12.0);
|
||||
|
||||
return Container(
|
||||
|
||||
Reference in New Issue
Block a user