enumToString function Null safety

String enumToString(
  1. Object enumValue
)

Converts an enumValue to a string.

Implementation

String enumToString(Object enumValue) => enumValue.toString().split('.').last;