Coverage Summary for Class: DashboardCardStyle (com.georgeci.moneysurfer.domain.dashboard)
| Class |
Method, %
|
Branch, %
|
Line, %
|
Instruction, %
|
| DashboardCardStyle |
100%
(2/2)
|
|
100%
(4/4)
|
100%
(30/30)
|
| DashboardCardStyle$Companion |
100%
(2/2)
|
|
100%
(2/2)
|
100%
(2/2)
|
| Total |
100%
(4/4)
|
|
100%
(6/6)
|
100%
(32/32)
|
package com.georgeci.moneysurfer.domain.dashboard
/**
* How much room a widget takes in the column. Maps 1:1 onto `uikit.widgets.SurferWidgetSize`;
* declared in the domain so a layout can be persisted without leaking UI types into `data`.
*/
enum class DashboardWidgetSize {
Expanded,
Compact,
}
/**
* Visual treatment of a single dashboard widget: its [size] plus an optional widget-specific
* [variant] key (e.g. a chart flavour) that only the widget that defines it understands. The
* variant is free-form on purpose — each widget task can introduce its own values without
* touching this type or the persistence format.
*/
data class DashboardCardStyle(
val size: DashboardWidgetSize = DashboardWidgetSize.Expanded,
val variant: String? = null,
) {
companion object {
val EXPANDED = DashboardCardStyle(DashboardWidgetSize.Expanded)
val COMPACT = DashboardCardStyle(DashboardWidgetSize.Compact)
}
}