fromNativeValue static method

PullToRefreshSize? fromNativeValue(
  1. int? value
)

Gets a possible PullToRefreshSize instance from a native value.

Implementation

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