feat: inventory

This commit is contained in:
efrilm
2025-08-17 23:54:28 +07:00
parent 577adb7964
commit d22ffdd6d0
20 changed files with 5118 additions and 506 deletions
@@ -8,14 +8,12 @@ class InventoryStatCard extends StatelessWidget {
final String value;
final IconData icon;
final Color color;
final String change;
const InventoryStatCard({
super.key,
required this.title,
required this.value,
required this.icon,
required this.color,
required this.change,
});
@override
@@ -52,20 +50,6 @@ class InventoryStatCard extends StatelessWidget {
child: Icon(icon, color: color, size: 24),
),
const Spacer(),
Container(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
decoration: BoxDecoration(
color: _getChangeColor(change).withOpacity(0.1),
borderRadius: BorderRadius.circular(12),
),
child: Text(
change,
style: AppStyle.sm.copyWith(
color: _getChangeColor(change),
fontWeight: FontWeight.w700,
),
),
),
],
),
SpaceHeight(16),
@@ -88,14 +72,4 @@ class InventoryStatCard extends StatelessWidget {
),
);
}
Color _getChangeColor(String change) {
if (change.startsWith('+')) {
return AppColor.success;
} else if (change.startsWith('-')) {
return AppColor.error;
} else {
return AppColor.warning;
}
}
}