decode method

  1. @override
ContentAlignment decode(
  1. dynamic value
)

Implementation

@override
ContentAlignment decode(dynamic value) {
  switch (value) {
    case 'top_left':
      return ContentAlignment.topLeft;
    case 'top_center':
      return ContentAlignment.topCenter;
    case 'top_right':
      return ContentAlignment.topRight;
    case 'center_left':
      return ContentAlignment.centerLeft;
    case 'center':
      return ContentAlignment.center;
    case 'center_right':
      return ContentAlignment.centerRight;
    case 'bottom_left':
      return ContentAlignment.bottomLeft;
    case 'bottom_center':
      return ContentAlignment.bottomCenter;
    case 'bottom_right':
      return ContentAlignment.bottomRight;
    default:
      throw MapperException.unknownEnumValue(value);
  }
}