TwWidgetExtensions extension

Tailwind-style chaining extensions on Widget.

Every method wraps this in exactly one Flutter widget and returns Widget, enabling fluent chaining.

on

Methods

align(Alignment alignment) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Aligns this widget within its parent.
aspectRatio(double ratio) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Constrains this widget to a specific aspect ratio.
bg(Color color) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Applies a solid background color.
border({Color color = const Color(0xFF000000), double width = 1}) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Adds a uniform border around all sides.
borderBottom({Color color = const Color(0xFF000000), double width = 1}) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Adds a border on the bottom side only.
borderLeft({Color color = const Color(0xFF000000), double width = 1}) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Adds a border on the left side only.
borderRight({Color color = const Color(0xFF000000), double width = 1}) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Adds a border on the right side only.
borderTop({Color color = const Color(0xFF000000), double width = 1}) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Adds a border on the top side only.
center() → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Centers this widget within its parent.
clipOval() → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Clips this widget to an oval/circle.
clipRect() → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Clips this widget to a rectangle.
expanded({int flex = 1}) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Wraps this widget in an Expanded (fills remaining space in a flex layout).
flexible({int flex = 1}) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Wraps this widget in a Flexible for use inside Row, Column, or Flex.
gradient(Gradient gradient) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Applies a gradient background.
height(double value) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Constrains this widget to a specific height.
invisible() → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Hides this widget while preserving its layout space.
m(double value) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Adds outer spacing (margin) on all sides.
mb(double value) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Adds bottom outer spacing (margin).
ml(double value) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Adds left outer spacing (margin).
mr(double value) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Adds right outer spacing (margin).
mt(double value) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Adds top outer spacing (margin).
mx(double value) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Adds horizontal outer spacing (margin).
my(double value) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Adds vertical outer spacing (margin).
opacity(double value) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Applies an opacity layer.
p(double value) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Adds padding on all sides.
pb(double value) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Adds padding on the bottom only.
pl(double value) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Adds padding on the left only.
pr(double value) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Adds padding on the right only.
pt(double value) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Adds padding on the top only.
px(double value) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Adds horizontal padding (left and right).
py(double value) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Adds vertical padding (top and bottom).
rounded(double radius) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Clips child content with rounded corners.
roundedFull() → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Clips child content into a pill or circle shape.
shadow(List<BoxShadow> shadows) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Applies box shadows.
size(double width, double height) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Constrains this widget to specific dimensions.
tooltip(String message) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Adds a tooltip that appears on long-press or hover.
visible({required bool visible}) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Conditionally shows or hides this widget.
width(double value) → Widget

Available on Widget, provided by the TwWidgetExtensions extension

Constrains this widget to a specific width.