@override String? toJson(Axis? object) { if (object == null) return null; switch (object) { case Axis.horizontal: return 'horizontal'; case Axis.vertical: return 'vertical'; } }