home added

This commit is contained in:
gitea
2026-08-31 12:57:17 +02:00
parent 92581e6d55
commit 7692809219
18 changed files with 1446 additions and 384 deletions
+24
View File
@@ -0,0 +1,24 @@
/// Counts and recent trips shown on the home dashboard.
library;
import 'shop.dart';
class AppOverview {
const AppOverview({
required this.productCount,
required this.favouriteCount,
required this.tripCount,
required this.monthTripCount,
required this.monthTotal,
required this.listCount,
required this.recentShops,
});
final int productCount;
final int favouriteCount;
final int tripCount;
final int monthTripCount;
final double monthTotal;
final int listCount;
final List<Shop> recentShops;
}
+3 -3
View File
@@ -59,7 +59,7 @@ class ShopItem {
const ShopItem({
required this.id,
required this.shopId,
required this.productId,
this.productId,
required this.name,
required this.price,
this.quantity,
@@ -68,7 +68,7 @@ class ShopItem {
final int id;
final int shopId;
final int productId;
final int? productId;
final String name;
final double price;
final int? quantity;
@@ -78,7 +78,7 @@ class ShopItem {
return ShopItem(
id: map['id']! as int,
shopId: map['shop_id']! as int,
productId: map['product_id']! as int,
productId: map['product_id'] as int?,
name: map['name']! as String,
price: (map['price'] as num).toDouble(),
quantity: map['quantity'] as int?,