31 lines
766 B
Dart
31 lines
766 B
Dart
import 'package:flutter/material.dart';
|
|
import '../game/enums.dart';
|
|
|
|
class ItemUtils {
|
|
static IconData getIcon(EquipmentSlot slot) {
|
|
switch (slot) {
|
|
case EquipmentSlot.weapon:
|
|
return Icons.change_history; // Triangle
|
|
case EquipmentSlot.shield:
|
|
return Icons.shield;
|
|
case EquipmentSlot.armor:
|
|
return Icons.checkroom;
|
|
case EquipmentSlot.accessory:
|
|
return Icons.diamond;
|
|
}
|
|
}
|
|
|
|
static Color getColor(EquipmentSlot slot) {
|
|
switch (slot) {
|
|
case EquipmentSlot.weapon:
|
|
return Colors.red;
|
|
case EquipmentSlot.shield:
|
|
return Colors.blue;
|
|
case EquipmentSlot.armor:
|
|
return Colors.blue;
|
|
case EquipmentSlot.accessory:
|
|
return Colors.orange;
|
|
}
|
|
}
|
|
}
|