fromJson method
Implementation
@override
MainAxisAlignment? fromJson(String? json) {
if (json == null) return null;
switch (json) {
case 'center':
return MainAxisAlignment.center;
case 'end':
return MainAxisAlignment.end;
case 'spaceAround':
return MainAxisAlignment.spaceAround;
case 'spaceBetween':
return MainAxisAlignment.spaceBetween;
case 'spaceEvenly':
return MainAxisAlignment.spaceEvenly;
case 'start':
return MainAxisAlignment.start;
}
throw 'Unsuported_Json_Value';
}