toJson method
Serializes an Availability to its JSON representation.
Implementation
@override
Map<String, dynamic> toJson() => {
"state": state.value,
if (since != null) "since": since?.toIso8601String(),
if (until != null) "until": until?.toIso8601String(),
};