DonutSection

@Model()
data class DonutSection(amount: Float, color: Color)

Data class representing the single section of the donut containing amount and color.

Parameters

amount

value of this single section. Eg. when the DonutModel.cap is set to 10f and this is set to 2.5f then this section will take 25% of the whole donut.

color

color of this single section

Constructors

DonutSection
Link copied to clipboard
fun DonutSection(amount: Float, color: Color)
value of this single section.

Functions

component1
Link copied to clipboard
operator fun component1(): Float
component2
Link copied to clipboard
operator fun component2(): Color
copy
Link copied to clipboard
fun copy(amount: Float, color: Color): DonutSection
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open override fun hashCode(): Int
toString
Link copied to clipboard
open override fun toString(): String

Properties

amount
Link copied to clipboard
var amount: Float
value of this single section.
color
Link copied to clipboard
var color: Color
color of this single section