WidgetLayoutExtensions extension

Adds explicit layout and decoration wrappers to a widget.

Calls wrap from left to right: child.padding(insets).expanded() produces an Expanded containing a Padding containing child. Flutter parent-data and constraint rules still apply.

on

Methods

align(AlignmentGeometry alignment, {Key? key, double? widthFactor, double? heightFactor}) → Align

Available on Widget, provided by the WidgetLayoutExtensions extension

Aligns this widget within the available space.
center({Key? key, double? widthFactor, double? heightFactor}) → Center

Available on Widget, provided by the WidgetLayoutExtensions extension

Centers this widget within the available space.
clipRounded(BorderRadiusGeometry borderRadius, {Key? key, Clip clipBehavior = Clip.antiAlias}) → ClipRRect

Available on Widget, provided by the WidgetLayoutExtensions extension

Clips this widget to a rounded rectangle using the supplied radius.
decorated(BoxDecoration decoration, {Key? key, DecorationPosition position = DecorationPosition.background}) → DecoratedBox

Available on Widget, provided by the WidgetLayoutExtensions extension

Paints a caller-provided box decoration behind or in front of this widget.
expanded({Key? key, int flex = 1}) → Expanded

Available on Widget, provided by the WidgetLayoutExtensions extension

Fills a share of remaining space in a Row, Column, or Flex.
flexible({Key? key, int flex = 1, FlexFit fit = FlexFit.loose}) → Flexible

Available on Widget, provided by the WidgetLayoutExtensions extension

Allocates flex space with either loose or tight child constraints.
padding(EdgeInsetsGeometry insets, {Key? key}) → Padding

Available on Widget, provided by the WidgetLayoutExtensions extension

Insets this widget using caller-provided, non-negative padding.
positioned({Key? key, double? left, double? top, double? right, double? bottom, double? width, double? height}) → Positioned

Available on Widget, provided by the WidgetLayoutExtensions extension

Positions this widget relative to a Stack's edges.
positionedFill({Key? key, double? left = 0, double? top = 0, double? right = 0, double? bottom = 0}) → Positioned

Available on Widget, provided by the WidgetLayoutExtensions extension

Stretches this widget between a Stack's edges.
sized({Key? key, double? width, double? height}) → SizedBox

Available on Widget, provided by the WidgetLayoutExtensions extension

Requests a width and/or height, subject to the parent's constraints.