TextAlignment.fromJson constructor
TextAlignment.fromJson(
- dynamic data
Creates a TextAlignment instance from a JSON representation.
Implementation
TextAlignment.fromJson(dynamic data) {
switch (data) {
case "Left":
case "Center":
case "Right":
_value = data;
break;
default:
throw Exception('Unknown enum value to decode: $data');
}
}