fromNativeValue static method

JsConfirmResponseAction? fromNativeValue(
  1. int? value
)

Gets a possible JsConfirmResponseAction instance from a native value.

Implementation

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