Some checks failed
Deploy to Cloudflare Pages / build-and-deploy (push) Has been cancelled
Reviewed-on: #14 Co-authored-by: mark-cachy <marco@catelli.it> Co-committed-by: mark-cachy <marco@catelli.it>
44 lines
1.3 KiB
Dart
44 lines
1.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flux/features/tickets/models/ticket_model.dart';
|
|
|
|
extension TicketStatusVisuals on TicketStatus {
|
|
Color get color {
|
|
switch (this) {
|
|
case TicketStatus.open:
|
|
return Colors.blueGrey;
|
|
case TicketStatus.waitingForParts:
|
|
return Colors.amber.shade700;
|
|
case TicketStatus.inProgress:
|
|
return Colors.blue;
|
|
case TicketStatus.waitingForShipping:
|
|
// Il tuo rosa storico!
|
|
return Colors.pinkAccent;
|
|
case TicketStatus.waitingForReturn:
|
|
return Colors.purpleAccent;
|
|
case TicketStatus.ready:
|
|
return Colors.green;
|
|
case TicketStatus.closed:
|
|
return Colors.grey.shade400;
|
|
}
|
|
}
|
|
|
|
IconData get icon {
|
|
switch (this) {
|
|
case TicketStatus.open:
|
|
return Icons.inbox;
|
|
case TicketStatus.waitingForParts:
|
|
return Icons.hourglass_empty;
|
|
case TicketStatus.inProgress:
|
|
return Icons.build;
|
|
case TicketStatus.waitingForShipping:
|
|
return Icons.local_shipping_outlined;
|
|
case TicketStatus.waitingForReturn:
|
|
return Icons.undo;
|
|
case TicketStatus.ready:
|
|
return Icons.check_circle_outline;
|
|
case TicketStatus.closed:
|
|
return Icons.lock_outline;
|
|
}
|
|
}
|
|
}
|