fromJson method
Implementation
@override
TextAlign? fromJson(String? json) {
if (json == null) return null;
switch (json) {
case 'center':
return TextAlign.center;
case 'end':
return TextAlign.end;
case 'justify':
return TextAlign.justify;
case 'left':
return TextAlign.left;
case 'right':
return TextAlign.right;
case 'start':
return TextAlign.start;
}
throw 'Unsuported_Json_Value';
}