BSContainer constructor
BSContainer({
- Key? key,
- bool fluid = false,
- BSBreakPointLabels? maxWidthIdentifier,
- List<
Widget> builder(- BuildContext context
- Key? singleChildScrollViewKey,
- ScrollController? singleChildScrollViewController,
- Clip singleChildScrollViewClipBehavior = Clip.hardEdge,
- EdgeInsetsGeometry? singleChildScrollViewPadding,
- ScrollPhysics? singleChildScrollViewPhysics,
- bool? singleChildScrollViewPrimary,
- String? singleChildScrollViewRestorationId,
- bool singleChildScrollViewReverse = false,
- Axis singleChildScrollViewScrollDirection = Axis.vertical,
- Key? sizedBoxKey,
- double? height,
- Key? containerKey,
- Alignment containerAlignment = Alignment.topCenter,
- double? containerHeight,
- double? containerWidth,
- EdgeInsetsGeometry? containerPadding,
- Clip containerClipBehavior = Clip.none,
- Decoration? containerDecoration,
- Color? containerColor,
- BoxConstraints? containerConstraints,
- Decoration? containerForegroundDecoration,
- EdgeInsetsGeometry? containerMargin,
- Matrix4? containerTransform,
- AlignmentGeometry? containerTransformAlignment,
- Key? bsContainerInheritanceKey,
- List<
Widget> ? children, - Key? columnKey,
- VerticalDirection columnVerticalDirection = VerticalDirection.down,
- TextDirection? columnTextDirection,
- TextBaseline? columnTextBaseline,
- MainAxisAlignment columnMainAxisAlignment = MainAxisAlignment.start,
- CrossAxisAlignment columnCrossAxisAlignment = CrossAxisAlignment.center,
- MainAxisSize columnMainAxisSize = MainAxisSize.max,
Needs to be a child of a Widget that contains MediaQueryData, typically this will be a MaterialApp Acts similarly to a Bootstrap container, can be fluid - match the width of the nearest MediaQueryData parent non-fluid - a static size when the screen is xxl, xl, lg, md, sm - acts the same as fluid if smaller than sm
- maxWidthIdentifier
- same as non-fluid, but will never be bigger than the specified breakpoint label
Implementation
BSContainer({
super.key,
this.fluid = false,
this.maxWidthIdentifier,
this.builder,
/*
passed to the SingleChildScrollView
*/
this.singleChildScrollViewKey,
this.singleChildScrollViewController,
this.singleChildScrollViewClipBehavior = Clip.hardEdge,
this.singleChildScrollViewPadding,
this.singleChildScrollViewPhysics,
this.singleChildScrollViewPrimary,
this.singleChildScrollViewRestorationId,
this.singleChildScrollViewReverse = false,
this.singleChildScrollViewScrollDirection = Axis.vertical,
/*
passed to the SizedBox
*/
this.sizedBoxKey,
this.height,
/*
Container
*/
this.containerKey,
this.containerAlignment = Alignment.topCenter,
this.containerHeight,
this.containerWidth,
this.containerPadding,
this.containerClipBehavior = Clip.none,
this.containerDecoration,
this.containerColor,
this.containerConstraints,
this.containerForegroundDecoration,
this.containerMargin,
this.containerTransform,
this.containerTransformAlignment,
/*
BSContainerInheritance
*/
this.bsContainerInheritanceKey,
/*
Column
*/
this.children,
this.columnKey,
this.columnVerticalDirection = VerticalDirection.down,
this.columnTextDirection,
this.columnTextBaseline,
this.columnMainAxisAlignment = MainAxisAlignment.start,
this.columnCrossAxisAlignment = CrossAxisAlignment.center,
this.columnMainAxisSize = MainAxisSize.max,
}) {
// confirm not both fluid and maxWidthIdentifier
if (fluid && maxWidthIdentifier != null) {
throw Exception(
"BSContainer: fluid can't be true if a maxWidthIdentifier is passed",
);
}
}