MainAspectComponentOptions class
MainAspectComponentOptions
- Configuration options for the MainAspectComponent
.
Properties:
backgroundColor
(Color
): Background color of the component.children
(List<Widget>
): List of child widgets displayed inside the component.showControls
(bool
): Determines if additional UI controls are displayed (default istrue
).containerWidthFraction
(double
): Fraction of the screen width that the container occupies (default is1.0
).containerHeightFraction
(double
): Fraction of the screen height that the container occupies (default is1.0
).defaultFraction
(double
): Default fraction value used to adjust dimensions whenshowControls
is enabled (default is0.94
).updateIsWideScreen
,updateIsMediumScreen
,updateIsSmallScreen
: Callback functions for screen size changes, providing updates based on screen width breakpoints.
Example Usage:
MainAspectComponentOptions(
backgroundColor: Colors.blue,
children: [
Text("Sample Text"),
],
showControls: true,
containerWidthFraction: 0.8,
containerHeightFraction: 0.6,
defaultFraction: 0.9,
updateIsWideScreen: (isWide) => print('Wide screen: $isWide'),
updateIsMediumScreen: (isMedium) => print('Medium screen: $isMedium'),
updateIsSmallScreen: (isSmall) => print('Small screen: $isSmall'),
);
Constructors
-
MainAspectComponentOptions({required Color backgroundColor, required List<
Widget> children, bool showControls = true, double containerWidthFraction = 1.0, double containerHeightFraction = 1.0, double defaultFraction = 0.94, required dynamic updateIsWideScreen(bool), required dynamic updateIsMediumScreen(bool), required dynamic updateIsSmallScreen(bool)}) -
Constructs a MainAspectComponentOptions object.
const
Properties
- backgroundColor → Color
-
The background color of the component.
final
-
children
→ List<
Widget> -
The list of child widgets to be displayed inside the component.
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
- defaultFraction → double
-
The default fraction value used when showControls is true.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showControls → bool
-
A flag indicating whether to show controls.
final
- updateIsMediumScreen → dynamic Function(bool)
-
Callback to update whether the screen is medium-sized.
final
- updateIsSmallScreen → dynamic Function(bool)
-
Callback to update whether the screen is small.
final
- updateIsWideScreen → dynamic Function(bool)
-
Callback to update whether the screen is wide.
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