CenteredContent class

A centered content container with max-width and padding.

Combines SmartContainer with automatic horizontal centering and responsive padding.

Inheritance
Available extensions

Constructors

CenteredContent({required Widget child, Key? key, double maxWidth = 1200, double horizontalPadding = SmartSpacing.md, double verticalPadding = 0})
Creates a CenteredContent widget.
const

Properties

child Widget
The child widget.
final
hashCode int
The hash code for this object.
no setterinherited
horizontalPadding double
The horizontal padding.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxWidth double
The maximum width of the content.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
verticalPadding double
The vertical padding.
final

Methods

aligned(AlignmentGeometry alignment) Widget

Available on Widget, provided by the SmartWidgetExtension extension

Aligns this widget within its parent.
build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
centered() Widget

Available on Widget, provided by the SmartWidgetExtension extension

Centers this widget.
clipped({BorderRadius borderRadius = BorderRadius.zero}) Widget

Available on Widget, provided by the SmartWidgetExtension extension

Wraps this widget with a ClipRRect.
constrained({double? minWidth, double? maxWidth, double? minHeight, double? maxHeight}) Widget

Available on Widget, provided by the SmartWidgetExtension extension

Wraps this widget in a ConstrainedBox.
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
decorated(BoxDecoration decoration) Widget

Available on Widget, provided by the SmartWidgetExtension extension

Wraps this widget in a DecoratedBox.
expanded({int flex = 1}) Widget

Available on Widget, provided by the SmartWidgetExtension extension

Expands this widget to fill available space.
flexible({int flex = 1, FlexFit fit = FlexFit.loose}) Widget

Available on Widget, provided by the SmartWidgetExtension extension

Makes this widget flexible.
hideOn(List<SmartBreakpoint> breakpoints, {Widget? replacement}) Widget

Available on Widget, provided by the SmartWidgetExtension extension

Hides this widget on the specified breakpoints.
hideOnDesktop({Widget? replacement}) Widget

Available on Widget, provided by the SmartWidgetExtension extension

Hides this widget on desktop and TV breakpoints.
hideOnMobile({Widget? replacement}) Widget

Available on Widget, provided by the SmartWidgetExtension extension

Hides this widget on mobile and watch breakpoints.
inkWell({VoidCallback? onTap, BorderRadius? borderRadius}) Widget

Available on Widget, provided by the SmartWidgetExtension extension

Wraps this widget with Material and InkWell for ripple effects.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onTap(VoidCallback? onTap) Widget

Available on Widget, provided by the SmartWidgetExtension extension

Wraps this widget in a GestureDetector.
opacity(double opacity) Widget

Available on Widget, provided by the SmartWidgetExtension extension

Adds opacity to this widget.
padded(EdgeInsets padding) Widget

Available on Widget, provided by the SmartWidgetExtension extension

Adds padding using EdgeInsets.
paddedAll(double value) Widget

Available on Widget, provided by the SmartWidgetExtension extension

Adds equal padding on all sides.
paddedHorizontal(double value) Widget

Available on Widget, provided by the SmartWidgetExtension extension

Adds horizontal padding.
paddedSymmetric({double horizontal = 0, double vertical = 0}) Widget

Available on Widget, provided by the SmartWidgetExtension extension

Adds symmetric padding.
paddedVertical(double value) Widget

Available on Widget, provided by the SmartWidgetExtension extension

Adds vertical padding.
responsivePadding({EdgeInsets? watch, EdgeInsets? mobile, EdgeInsets? tablet, EdgeInsets? desktop, EdgeInsets? tv}) Widget

Available on Widget, provided by the SmartWidgetExtension extension

Adds responsive padding to this widget.
safeArea({bool left = true, bool top = true, bool right = true, bool bottom = true}) Widget

Available on Widget, provided by the SmartWidgetExtension extension

Wraps this widget in a SafeArea.
scrollable({Axis scrollDirection = Axis.vertical, EdgeInsets? padding}) Widget

Available on Widget, provided by the SmartWidgetExtension extension

Wraps this widget in a SingleChildScrollView.
showOnDesktop({Widget? replacement}) Widget

Available on Widget, provided by the SmartWidgetExtension extension

Shows this widget only on desktop and TV breakpoints.
showOnly(List<SmartBreakpoint> breakpoints, {Widget? replacement}) Widget

Available on Widget, provided by the SmartWidgetExtension extension

Shows this widget only on the specified breakpoints.
showOnMobile({Widget? replacement}) Widget

Available on Widget, provided by the SmartWidgetExtension extension

Shows this widget only on mobile and watch breakpoints.
showOnTablet({Widget? replacement}) Widget

Available on Widget, provided by the SmartWidgetExtension extension

Shows this widget only on tablet breakpoint.
sized({double? width, double? height}) Widget

Available on Widget, provided by the SmartWidgetExtension extension

Wraps this widget in a SizedBox with the given dimensions.
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited
withPadding(SpacingSize size) Widget

Available on Widget, provided by the SmartWidgetExtension extension

Adds padding using spacing tokens.
withPaddingOnly({SpacingSize? left, SpacingSize? top, SpacingSize? right, SpacingSize? bottom}) Widget

Available on Widget, provided by the SmartWidgetExtension extension

Adds padding on specific sides using spacing tokens.
withSymmetricPadding({SpacingSize? horizontal, SpacingSize? vertical}) Widget

Available on Widget, provided by the SmartWidgetExtension extension

Adds symmetric padding using spacing tokens.

Operators

operator ==(Object other) bool
The equality operator.
inherited