Map<String, Object> serialize() => { if (backgroundColor != null) "backgroundColor": backgroundColor!.value, if (foregroundColor != null) "foregroundColor": foregroundColor!.value, };