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