MainScreenComponentOptions class

MainScreenComponentOptions - Configuration options for the MainScreenComponent widget.

Properties:

  • mainSize (double): Determines the size of the main section in percentage (0-100).
  • doStack (bool): If true, splits the main screen into stacked sections; otherwise, all children have equal sizes.
  • containerWidthFraction (double): Fraction of the parent width to use for the component's width (default is 1.0).
  • containerHeightFraction (double): Fraction of the parent height to use for the component's height (default is 1.0).
  • updateComponentSizes (Function(Map<String, double>)): Callback to receive updated component sizes for dynamic layouts.
  • defaultFraction (double): Default fraction for the height when showControls is true (default is 0.94).
  • showControls (bool): If true, applies additional spacing for screen controls; affects component height.

Example Usage:

MainScreenComponentOptions(
  mainSize: 70,
  doStack: true,
  containerWidthFraction: 0.5,
  containerHeightFraction: 0.5,
  updateComponentSizes: (sizes) => print('Updated sizes: $sizes'),
  defaultFraction: 0.9,
  showControls: true,
  children: [
   ChildComponent1(),
   ChildComponent2(),
  ],
);

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})

Properties

children List<Widget>
final
containerHeightFraction double
final
containerWidthFraction double
final
defaultFraction double
final
doStack bool
final
hashCode int
The hash code for this object.
no setterinherited
mainSize double
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