home added
This commit is contained in:
@@ -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;
|
||||
}
|
||||
@@ -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?,
|
||||
|
||||
Reference in New Issue
Block a user