flexAlignFromValue function

FlexAlign? flexAlignFromValue(
  1. String? value
)

Implementation

FlexAlign? flexAlignFromValue(String? value) {
  if (value == null || value.isEmpty) {
    return null;
  }
  switch (value.replaceKey()) {
    case 'AUTO':
      return FlexAlign.auto;
    case 'FLEX_START':
      return FlexAlign.flexStart;
    case 'CENTER':
      return FlexAlign.center;
    case 'FLEX_END':
      return FlexAlign.flexEnd;
    case 'STRETCH':
      return FlexAlign.stretch;
    case 'BASELINE':
      return FlexAlign.baseline;
    case 'SPACE_BETWEEN':
      return FlexAlign.spaceBetween;
    case 'SPACE_AROUND':
      return FlexAlign.spaceAround;
    default:
      _convertError("flexAlignFromInt Unknown enum value: $value");
      return null;
  }
}