KoahAxisSize class sealed

How a Koah ad slot is sized along one axis (width or height). Pass null (the default) for an unbounded axis: the ad wraps its content and every renderable format is eligible. A wrap against a parent that leaves the axis unbounded (e.g. the cross axis of a scroller) still hugs a finite design-max width, so long ad copy cannot stretch the card indefinitely.

Construct values with the factory constructors (KoahAxisSize.range, KoahAxisSize.fixed, KoahAxisSize.fill). The case types (KoahAxisSizeFixed, KoahAxisSizeRange, KoahAxisSizeFill) are public so callers can match on them exhaustively, but their constructors are private — the factories are the construction path, which lets the cases evolve without breaking callers.

  • KoahAxisSizeRange wraps the content within a min..max band (logical pixels): it grows to a min floor taller than the content (leftover absorbed by a format-internal spacer) and never renders larger than max. At least one bound is required — a fully unbounded axis is spelled null, not an empty range.
  • KoahAxisSizeFixed forces the rendered size to exactly dp; when that exceeds the content's natural size the leftover is absorbed by a format-internal spacer.
  • KoahAxisSizeFill fills the parent's available space. It requires a parent that bounds this axis — placing a fill axis in a container that leaves it unbounded (e.g. the scroll axis of a scroller) throws on the slot's first layout, deterministically, before any ad is fetched or filled.
KoahCard(adContext: ctx)                                          // unbounded both axes
KoahCard(adContext: ctx, width: KoahAxisSize.range(min: 240, max: 600))
KoahCard(adContext: ctx, width: KoahAxisSize.fixed(320))
KoahCard(adContext: ctx, height: KoahAxisSize.fill())

Units are logical pixels (Flutter's density-independent unit — Android's dp).

Implementers

Constructors

KoahAxisSize.fill()
Fill the parent's available space along this axis.
factory
KoahAxisSize.fixed(int dp)
Force the rendered size to exactly dp logical pixels.
factory
KoahAxisSize.range({int? min, int? max})
A min..max band in logical pixels. Omit either side for an open end; at least one bound is required.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited