fromValue static method

LayoutAlgorithm? fromValue(
  1. String? value
)

Gets a possible LayoutAlgorithm instance from String value.

Implementation

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