fromValue static method
Gets a possible SelectionGranularity instance from int value.
Implementation
static SelectionGranularity? fromValue(int? value) {
if (value != null) {
try {
return SelectionGranularity.values
.firstWhere((element) => element.toValue() == value);
} catch (e) {
return null;
}
}
return null;
}