getEnumKeyValue static method

List<KeyValue<int>> getEnumKeyValue(
  1. List enumType, {
  2. bool removeFirst = false,
})

Implementation

static List<KeyValue<int>> getEnumKeyValue(List<dynamic> enumType, {bool removeFirst = false}) {
  final items = enumType.map((dynamic e) {
    return KeyValue<int>(getName(e), e.shade);
  }).toList();
  if (removeFirst) {
    items.removeAt(0);
  }
  return items;
}