relatica/lib/models/delivery_data.dart

18 lines
348 B
Dart
Raw Normal View History

class DeliveryData {
static const empty = DeliveryData(total: 0, done: 0, failed: 0);
final int total;
final int done;
final int failed;
const DeliveryData({
required this.total,
required this.done,
required this.failed,
});
bool get hasDeliveryData => total > 0;
int get leftForDelivery => total - done - failed;
}