class DeliveryStats { final int today; final int week; final int month; final int total; final int cancelled; DeliveryStats({ required this.today, required this.week, required this.month, required this.total, required this.cancelled, }); factory DeliveryStats.fromJson(Map json) { return DeliveryStats( today: json['today'] ?? 0, week: json['week'] ?? 0, month: json['month'] ?? 0, total: json['total'] ?? 0, cancelled: json['cancelled'] ?? 0, ); } }