MainScreenComponentOptions class

Configuration payload for MainScreenComponent.

Drives MediaSFU's adaptive spotlight/gallery split with advanced options for stacking vs. equal-size tiles:

  • mainSize (0–100): percentage of space allocated to the primary (spotlight) region when doStack is true. Ignored when doStack is false.
  • doStack: when true the first child receives mainSize and remaining children split the rest. When false all children share space equally.
  • containerWidthFraction / containerHeightFraction: scale factors applied to the parent's layout space, allowing the component to occupy less than the full viewport.
  • updateComponentSizes: callback delivering computed ComponentSizes so downstream widgets can react to dimension changes (e.g., repositioning control overlays or adjusting padding).
  • showControls: reserves vertical space for a control bar. The component applies defaultFraction (default 0.94) to the height, leaving room for buttons.
  • Builder hooks (containerBuilder, childrenBuilder, childBuilder) let you wrap or re-theme the default widget tree without re-implementing the responsive math.

Override this component via MediasfuUICustomOverrides.mainScreen when you need a custom spotlight layout or branded child arrangements.

Constructors

MainScreenComponentOptions({required double mainSize, required bool doStack, double containerWidthFraction = 1, double containerHeightFraction = 1, required dynamic updateComponentSizes(ComponentSizes), double defaultFraction = 0.94, bool showControls = false, required List<Widget> children, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, Decoration? decoration, AlignmentGeometry? alignment, Clip clipBehavior = Clip.none, MainScreenContainerBuilder? containerBuilder, MainScreenChildrenBuilder? childrenBuilder, MainScreenChildBuilder? childBuilder})

Properties

alignment AlignmentGeometry?
final
childBuilder MainScreenChildBuilder?
final
children List<Widget>
final
childrenBuilder MainScreenChildrenBuilder?
final
clipBehavior Clip
final
containerBuilder MainScreenContainerBuilder?
final
containerHeightFraction double
final
containerWidthFraction double
final
decoration Decoration?
final
defaultFraction double
final
doStack bool
final
hashCode int
The hash code for this object.
no setterinherited
mainSize double
final
margin EdgeInsetsGeometry?
final
padding EdgeInsetsGeometry?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showControls bool
final
updateComponentSizes → dynamic Function(ComponentSizes)
final

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