getActivityTypeFromString function Null safety

ActivityType getActivityTypeFromString(
  1. String? value
)

Returns the activity type from value.

Implementation

ActivityType getActivityTypeFromString(String? value) {
  return ActivityType.values.firstWhere(
      (e) => e.toString() == 'ActivityType.$value',
      orElse: () => ActivityType.UNKNOWN);
}