FlexBoxTileSchema

@Serializable
@SerialName(value = "FlexBox")
data class FlexBoxTileSchema(val id: String, val tiles: SerializableImmutableList<TileSchema>, val events: SerializableImmutableList<EventSchema>?, val style: StyleSchema, val searchableTerms: SerializableImmutableList<String>?, val filterChildrenByTerm: String?, val visibility: TileSchema.Visibility, val direction: FlexBoxTileSchema.FlexDirectionSchema = FlexDirectionSchema.Row, val justifyContent: FlexBoxTileSchema.FlexJustifyContentSchema = FlexJustifyContentSchema.Start, val alignItems: FlexBoxTileSchema.FlexAlignItemsSchema = FlexAlignItemsSchema.Start, val alignContent: FlexBoxTileSchema.FlexAlignContentSchema = FlexAlignContentSchema.Start, val wrap: FlexBoxTileSchema.FlexWrapSchema = FlexWrapSchema.NoWrap, val columnGap: Int = 0, val rowGap: Int = 0) : TileSchema

Renders a Compose FlexBox (experimental flexbox layout) hosting tiles with CSS-flexbox semantics. Every schema enum maps one-to-one onto the corresponding Compose flex value: direction → main axis and its reversal, justifyContent → distribution along the main axis, alignItems → alignment on the cross axis of a single line, alignContent → distribution of the lines themselves, wrap → whether items wrap. columnGap and rowGap are interpreted as dp.

Child scope: the tile publishes its FlexBoxScope as a CompositionLocal, so children can use flex scope modifiers (grow, shrink, basis, align-self).

Filtering: when filterChildrenByTerm is non-null and non-empty, only children whose searchableTerms contain that term (case-insensitive, substring match) are rendered. Children without searchableTerms are filtered out.

Triggers dispatched:

  • OnDisplayEventTrigger — fired once when the tile enters composition (keyed by tile id).

  • OnClickEventTrigger — fired when the flex box is tapped, but only if an OnClick event is declared on this tile.

Notes: alignContent only takes effect when wrap allows multiple lines. The tile is never scrollable and composes every child eagerly.

Constructors

Link copied to clipboard
constructor(id: String, tiles: SerializableImmutableList<TileSchema>, events: SerializableImmutableList<EventSchema>?, style: StyleSchema, searchableTerms: SerializableImmutableList<String>?, filterChildrenByTerm: String?, visibility: TileSchema.Visibility, direction: FlexBoxTileSchema.FlexDirectionSchema = FlexDirectionSchema.Row, justifyContent: FlexBoxTileSchema.FlexJustifyContentSchema = FlexJustifyContentSchema.Start, alignItems: FlexBoxTileSchema.FlexAlignItemsSchema = FlexAlignItemsSchema.Start, alignContent: FlexBoxTileSchema.FlexAlignContentSchema = FlexAlignContentSchema.Start, wrap: FlexBoxTileSchema.FlexWrapSchema = FlexWrapSchema.NoWrap, columnGap: Int = 0, rowGap: Int = 0)

Properties

Link copied to clipboard
@SerialName(value = "alignContent")
val alignContent: FlexBoxTileSchema.FlexAlignContentSchema
Link copied to clipboard
@SerialName(value = "alignItems")
val alignItems: FlexBoxTileSchema.FlexAlignItemsSchema
Link copied to clipboard
@SerialName(value = "columnGap")
val columnGap: Int
Link copied to clipboard
@SerialName(value = "direction")
val direction: FlexBoxTileSchema.FlexDirectionSchema
Link copied to clipboard
@SerialName(value = "events")
open override val events: SerializableImmutableList<EventSchema>?
Link copied to clipboard
@SerialName(value = "filterChildrenByTerm")
val filterChildrenByTerm: String?
Link copied to clipboard
@SerialName(value = "id")
open override val id: String
Link copied to clipboard
@SerialName(value = "justifyContent")
val justifyContent: FlexBoxTileSchema.FlexJustifyContentSchema
Link copied to clipboard
@SerialName(value = "rowGap")
val rowGap: Int
Link copied to clipboard
@SerialName(value = "searchableTerms")
open override val searchableTerms: SerializableImmutableList<String>?
Link copied to clipboard
@SerialName(value = "style")
open override val style: StyleSchema
Link copied to clipboard
@SerialName(value = "tiles")
val tiles: SerializableImmutableList<TileSchema>
Link copied to clipboard
@SerialName(value = "visibility")
open override val visibility: TileSchema.Visibility
Link copied to clipboard
@SerialName(value = "wrap")
val wrap: FlexBoxTileSchema.FlexWrapSchema

Functions

Link copied to clipboard
open fun isGone(): Boolean
Link copied to clipboard
open fun isVisible(): Boolean