fromNativeValue static method

RendererPriority? fromNativeValue(
  1. int? value
)

Gets a possible RendererPriority instance from a native value.

Implementation

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