fromNativeValue static method

ScrollBarStyle? fromNativeValue(
  1. int? value
)

Gets a possible ScrollBarStyle instance from a native value.

Implementation

static ScrollBarStyle? fromNativeValue(int? value) {
  if (value != null) {
    try {
      return ScrollBarStyle.values
          .firstWhere((element) => element.toNativeValue() == value);
    } catch (e) {
      return null;
    }
  }
  return null;
}