fromValue static method

Gets a possible AttributedStringTextEffectStyle instance from String value.

Implementation

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