fromString static method
Parse from string.
Implementation
static PeriodUnit fromString(String value) {
return PeriodUnit.values.firstWhere(
(e) => e.name == value.toLowerCase(),
orElse: () => throw ArgumentError('Unknown period unit: $value'),
);
}