fromNativeValue static method

LayoutAlgorithm? fromNativeValue(
  1. String? value
)

Gets a possible LayoutAlgorithm instance from a native value.

Implementation

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