MainContainerComponentOptions class
Configuration payload for MainContainerComponent.
Powers the root container that wraps all MediaSFU UI surfaces. Typically
overridden via MediasfuUICustomOverrides.mainContainer
to apply branded
theming, shadows, borders, or gradient backgrounds without rebuilding the
entire experience:
containerWidthFraction
/containerHeightFraction
: scale the container relative to the screen dimensions. Defaults to 1.0 (full viewport).- Legacy margin fields (
marginLeft
,marginRight
,marginTop
,marginBottom
) combine into a single EdgeInsets unlessmargin
is explicitly set—in which casemargin
overrides the legacy values. decoration
: replaces the defaultBoxDecoration(color: backgroundColor)
so you can inject gradients, images, or multi-layer effects.children
: rendered inside a Stack, enabling layered overlays, floating action buttons, or positioned widgets.
Use this options object when you want to inject theming providers, apply rounded corners, or add debug overlays to the entire MediaSFU surface.
Constructors
-
MainContainerComponentOptions({required Color backgroundColor, required List<
Widget> children, double containerWidthFraction = 1.0, double containerHeightFraction = 1.0, double marginLeft = 0.0, double marginRight = 0.0, double marginTop = 0.0, double marginBottom = 0.0, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, Decoration? decoration, AlignmentGeometry? alignment, Clip? clipBehavior}) -
Constructs a MainContainerComponentOptions object.
const
Properties
- alignment → AlignmentGeometry?
-
Alignment for the child stack within the container.
final
- backgroundColor → Color
-
The background color of the container.
final
-
children
→ List<
Widget> -
The list of child widgets to be displayed inside the container.
final
- clipBehavior → Clip?
-
Clip behaviour applied to the container.
final
- containerHeightFraction → double
-
The fraction of the screen height that the container should occupy.
final
- containerWidthFraction → double
-
The fraction of the screen width that the container should occupy.
final
- decoration → Decoration?
-
Optional decoration for advanced styling (gradients, borders, etc.).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- margin → EdgeInsetsGeometry?
-
Optional custom margin that overrides the individual margin values when provided.
final
- marginBottom → double
-
The bottom margin of the container.
final
- marginLeft → double
-
The left margin of the container.
final
- marginRight → double
-
The right margin of the container.
final
- marginTop → double
-
The top margin of the container.
final
- padding → EdgeInsetsGeometry?
-
Optional padding applied within the container.
final
- 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