parse static method

String? parse(
  1. dynamic enumItem
)

Implementation

static String? parse(enumItem) {
  /// Returns the name of the enum item.
  /// It receives an [enumItem] as a parameter.
  /// It returns a [String] with the name of the enum item.
  /// If the [enumItem] is null, it returns null.
  if (enumItem == null) return null;
  return enumItem.toString().split('.')[1];
}