🌈 Create new beautiful Compose Gradients with our new wesite ->

Represents a flexible unit used for sizing Grid tracks.

Source set: Common
public class Fr(public val value: Float)

Represents a flexible unit used for sizing Grid tracks.

One Fr unit represents a fraction of the remaining space in the grid container after GridTrackSize.Fixed and GridTrackSize.Percentage tracks have been allocated.

When multiple tracks use Fr units (e.g., 1.fr, 2.fr, 1.fr), the remaining space is divided proportionally to their weights. The total number of "fractional units" is the sum of all weights (in the example, 1 + 2 + 1 = 4). Each track receives a share of the space equal to its weight divided by the total weight.

  • The 1.fr tracks would each get 1/4 of the remaining space.
  • The 2.fr track would get 2/4 (or 1/2) of the remaining space.

Functions

toString

Source set: Common
override fun toString(): String