fromValue static method

VerticalScrollbarPosition? fromValue(
  1. int? value
)

Gets a possible VerticalScrollbarPosition instance from int value.

Implementation

static VerticalScrollbarPosition? fromValue(int? value) {
  if (value != null) {
    try {
      return VerticalScrollbarPosition.values
          .firstWhere((element) => element.toValue() == value);
    } catch (e) {
      return null;
    }
  }
  return null;
}