TextAlignment.fromJson constructor

TextAlignment.fromJson(
  1. dynamic data
)

Implementation

TextAlignment.fromJson(dynamic data) {
  switch (data) {
    case "Left":
      value = data;
      break;
    case "Center":
      value = data;
      break;
    case "Right":
      value = data;
      break;
    default:
      throw Exception('Unknown enum value to decode: $data');
  }
}