fromValue static method

AndroidScrollBarStyle? fromValue(
  1. int? value
)

Gets a possible AndroidScrollBarStyle instance from int value.

Implementation

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