FlyBox class

A unified widget that intelligently renders as either a container or layout

The widget automatically determines its behavior based on the properties provided:

  • If child is provided, it renders as a container
  • If children is provided, it renders as a layout widget
  • If both are provided, child takes precedence
  • If neither is provided, it renders as an empty container
Inheritance
Mixed-in types
Implementers

Constructors

FlyBox({Key? key, Widget? child, List<Widget>? children, AlignmentGeometry? alignment, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, Decoration? decoration, Decoration? foregroundDecoration, double? width, double? height, BoxConstraints? constraints, Matrix4? transform, AlignmentGeometry? transformAlignment, Clip? clipBehavior, FlyStyle flyStyle = const FlyStyle()})

Properties

alignment → AlignmentGeometry?
final
child → Widget?
final
children → List<Widget>?
final
clipBehavior → Clip?
final
constraints → BoxConstraints?
final
copyWith → FlyBox Function(FlyStyle newStyle)
no setteroverride
decoration → Decoration?
final
flyStyle → FlyStyle
no setteroverride
foregroundDecoration → Decoration?
final
hasFlexProperties → bool
Check if any flex properties are set
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
hasPositionProperties → bool
Check if any position properties are set
no setterinherited
height → double?
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
margin → EdgeInsetsGeometry?
final
padding → EdgeInsetsGeometry?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
transform → Matrix4?
final
transformAlignment → AlignmentGeometry?
final
width → double?
final

Methods

align(dynamic value) → FlyBox
Set text alignment - accepts String ('left', 'right', 'center', 'justify', 'start', 'end') or TextAlign
inherited
applyBorder(BuildContext context, Widget child) → Widget
Applies border styling to a widget using the resolved Border
inherited
applyFlex(BuildContext context, Widget child) → Widget
Apply flex properties to a widget
inherited
applyMargin(BuildContext context, Widget child) → Widget
Applies margin to a widget using the resolved EdgeInsets
inherited
applyPadding(BuildContext context, Widget child) → Widget
Applies padding to a widget using the resolved EdgeInsets
inherited
applyPosition(BuildContext context, Widget child) → Widget
Apply position properties to a widget
inherited
applyRounded(BuildContext context, Widget child) → Widget
Applies rounded styling to a widget using the resolved BorderRadius
inherited
applySize(BuildContext context, Widget child) → Widget
Applies size constraints to a widget using the resolved values
inherited
applyTracking(BuildContext context, TextStyle? baseStyle) → TextStyle
Applies tracking styling to a TextStyle using the resolved value
inherited
basis(String value) → FlyBox
Set flex basis - accepts String ('s32', 's40', 's48', etc.) This method can be chained with other flex methods, with later calls overriding earlier ones
inherited
bg(dynamic value) → FlyBox
Set background color - accepts Color object or String (token name/hex)
inherited
border(dynamic value) → FlyBox
Set uniform border width - accepts int, double, or String (token name/unit)
inherited
borderB(dynamic value) → FlyBox
Set bottom border width - accepts int, double, or String (token name/unit)
inherited
borderColor(dynamic value) → FlyBox
Set border color - accepts Color object or String (token name/hex)
inherited
borderL(dynamic value) → FlyBox
Set left border width - accepts int, double, or String (token name/unit)
inherited
borderR(dynamic value) → FlyBox
Set right border width - accepts int, double, or String (token name/unit)
inherited
borderStyle(String value) → FlyBox
Set border style - accepts String ('solid', 'dashed', 'dotted', 'none', 'hidden')
inherited
borderT(dynamic value) → FlyBox
Set top border width - accepts int, double, or String (token name/unit)
inherited
bottom(dynamic value) → FlyBox
Set bottom position - accepts int, double, or String (token name like 's2', 's4', etc.)
inherited
build(BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
override
capitalize() → FlyBox
Transform text to capitalize first letter of each word
inherited
col({MainAxisAlignment? mainAxisAlignment, CrossAxisAlignment? crossAxisAlignment, MainAxisSize? mainAxisSize, TextBaseline? textBaseline, TextDirection? textDirection, VerticalDirection? verticalDirection}) → FlyBox
Set layout type to column with optional direct Flutter API access
inherited
color(dynamic value) → FlyBox
Set text color - accepts Color object or String (token name/hex)
inherited
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
flex(dynamic value) → FlyBox
Set flex value - accepts int (1-12) or String ('auto', 'initial', 'none') This method can be chained with other flex methods, with later calls overriding earlier ones
inherited
font(dynamic value) → FlyBox
Set font family - accepts:
inherited
gap(String value) → FlyBox
Set gap spacing - accepts String ('s0' to 's96', 'px')
inherited
gapX(String value) → FlyBox
Set horizontal gap spacing - accepts String ('s0' to 's96', 'px')
inherited
gapY(String value) → FlyBox
Set vertical gap spacing - accepts String ('s0' to 's96', 'px')
inherited
getDefaultStyle(FlyStyle incomingStyle) → FlyStyle
Override this to provide component-specific default styles The incoming flyStyle will be merged with these defaults
grow(int value) → FlyBox
Set flex grow - accepts int (0-2) This method can be chained with other flex methods, with later calls overriding earlier ones
inherited
h(dynamic value) → FlyBox
Set height - accepts int, double, or String (token name/unit)
inherited
inline() → FlyBox
Set inline layout - accepts bool
inherited
inset(dynamic value) → FlyBox
Set inset (all sides) - accepts int, double, or String (token name like 's2', 's4', etc.)
inherited
insetX(dynamic value) → FlyBox
Set insetX (left and right) - accepts int, double, or String (token name like 's2', 's4', etc.)
inherited
insetY(dynamic value) → FlyBox
Set insetY (top and bottom) - accepts int, double, or String (token name like 's2', 's4', etc.)
inherited
items(String value) → FlyBox
Set cross-axis alignment - accepts String ('start', 'end', 'center', 'stretch', 'baseline')
inherited
justify(String value) → FlyBox
Set main-axis alignment - accepts String ('start', 'end', 'center', 'between', 'around', 'evenly')
inherited
leading(dynamic value) → FlyBox
Set line height - accepts int, double, or String (token name like 'tight', 'normal', 'relaxed')
inherited
left(dynamic value) → FlyBox
Set left position - accepts int, double, or String (token name like 's2', 's4', etc.)
inherited
lineThrough() → FlyBox
Add line-through decoration to text
inherited
lowercase() → FlyBox
Transform text to lowercase
inherited
m(dynamic value) → FlyBox
Set uniform margin - accepts int, double, or String (token name/unit)
inherited
maxH(dynamic value) → FlyBox
Set max height - accepts int, double, or String (token name/unit)
inherited
maxW(dynamic value) → FlyBox
Set max width - accepts int, double, or String (token name/unit)
inherited
mb(dynamic value) → FlyBox
Set bottom margin - accepts int, double, or String (token name/unit)
inherited
minH(dynamic value) → FlyBox
Set min height - accepts int, double, or String (token name/unit)
inherited
minW(dynamic value) → FlyBox
Set min width - accepts int, double, or String (token name/unit)
inherited
ml(dynamic value) → FlyBox
Set left margin - accepts int, double, or String (token name/unit)
inherited
mr(dynamic value) → FlyBox
Set right margin - accepts int, double, or String (token name/unit)
inherited
mt(dynamic value) → FlyBox
Set top margin - accepts int, double, or String (token name/unit)
inherited
mx(dynamic value) → FlyBox
Set horizontal margin (left + right) - accepts int, double, or String (token name/unit)
inherited
my(dynamic value) → FlyBox
Set vertical margin (top + bottom) - accepts int, double, or String (token name/unit)
inherited
noDecoration() → FlyBox
Remove text decoration
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
overline() → FlyBox
Add overline decoration to text
inherited
p(dynamic value) → FlyBox
Set uniform padding - accepts int, double, or String (token name/unit)
inherited
pb(dynamic value) → FlyBox
Set bottom padding - accepts int, double, or String (token name/unit)
inherited
pl(dynamic value) → FlyBox
Set left padding - accepts int, double, or String (token name/unit)
inherited
pr(dynamic value) → FlyBox
Set right padding - accepts int, double, or String (token name/unit)
inherited
pt(dynamic value) → FlyBox
Set top padding - accepts int, double, or String (token name/unit)
inherited
px(dynamic value) → FlyBox
Set horizontal padding (left + right) - accepts int, double, or String (token name/unit)
inherited
py(dynamic value) → FlyBox
Set vertical padding (top + bottom) - accepts int, double, or String (token name/unit)
inherited
resolveBorder(BuildContext context) → Border
Resolves border from FlyStyle and FlyTheme into Border
inherited
resolveHeight(BuildContext context) → double?
Resolves height from FlyStyle and FlyTheme into double
inherited
resolveIntrinsicWidth() → FlyIntrinsicWidth?
Resolves intrinsic width from FlyStyle
inherited
resolveMargin(BuildContext context) → EdgeInsets
Resolves margin from FlyStyle and FlyTheme into EdgeInsets
inherited
resolveMaxHeight(BuildContext context) → double?
Resolves max height from FlyStyle and FlyTheme into double
inherited
resolveMaxWidth(BuildContext context) → double?
Resolves max width from FlyStyle and FlyTheme into double
inherited
resolveMinHeight(BuildContext context) → double?
Resolves min height from FlyStyle and FlyTheme into double
inherited
resolveMinWidth(BuildContext context) → double?
Resolves min width from FlyStyle and FlyTheme into double
inherited
resolvePadding(BuildContext context) → EdgeInsets
Resolves padding from FlyStyle and FlyTheme into EdgeInsets
inherited
resolveRounded(BuildContext context) → BorderRadius
Resolves rounded styling from FlyStyle and FlyConfig into BorderRadius
inherited
resolveTracking(BuildContext context) → double?
Resolves tracking styling from FlyStyle and FlyThemeData into double
inherited
resolveWidth(BuildContext context) → double?
Resolves width from FlyStyle and FlyTheme into double
inherited
reverse() → FlyBox
Set reverse direction - accepts bool
inherited
Set right position - accepts int, double, or String (token name like 's2', 's4', etc.)
inherited
rounded(dynamic value) → FlyBox
Set uniform rounded styling - accepts int, double, or String (token name/unit)
inherited
roundedB(dynamic value) → FlyBox
Set bottom rounded styling (bottom-left + bottom-right) - accepts int, double, or String (token name/unit)
inherited
roundedBl(dynamic value) → FlyBox
Set bottom-left rounded styling - accepts int, double, or String (token name/unit)
inherited
roundedBr(dynamic value) → FlyBox
Set bottom-right rounded styling - accepts int, double, or String (token name/unit)
inherited
roundedL(dynamic value) → FlyBox
Set left rounded styling (top-left + bottom-left) - accepts int, double, or String (token name/unit)
inherited
roundedR(dynamic value) → FlyBox
Set right rounded styling (top-right + bottom-right) - accepts int, double, or String (token name/unit)
inherited
roundedT(dynamic value) → FlyBox
Set top rounded styling (top-left + top-right) - accepts int, double, or String (token name/unit)
inherited
roundedTl(dynamic value) → FlyBox
Set top-left rounded styling - accepts int, double, or String (token name/unit)
inherited
roundedTr(dynamic value) → FlyBox
Set top-right rounded styling - accepts int, double, or String (token name/unit)
inherited
row({MainAxisAlignment? mainAxisAlignment, CrossAxisAlignment? crossAxisAlignment, MainAxisSize? mainAxisSize, TextBaseline? textBaseline, TextDirection? textDirection, VerticalDirection? verticalDirection}) → FlyBox
Set layout type to row with optional direct Flutter API access
inherited
shrink(int value) → FlyBox
Set flex shrink - accepts int (0-1) This method can be chained with other flex methods, with later calls overriding earlier ones
inherited
stack({AlignmentGeometry? alignment, TextDirection? textDirection, StackFit? fit, Clip? clipBehavior}) → FlyBox
Set layout type to stack with optional direct Flutter API access
inherited
text(dynamic value) → FlyBox
Set text style - accepts String (token name like 'sm', 'base', 'lg', etc.) or TextStyle Pass null to remove all text styling and use Flutter's default text style
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
top(dynamic value) → FlyBox
Set top position - accepts int, double, or String (token name like 's2', 's4', etc.)
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
tracking(dynamic value) → FlyBox
Set letter spacing - accepts int, double, or String (token name like 'tight', 'normal', 'wide')
inherited
underline() → FlyBox
Add underline decoration to text
inherited
uppercase() → FlyBox
Transform text to uppercase
inherited
w(dynamic value) → FlyBox
Set width - accepts int, double, or String (token name/unit)
inherited
weight(dynamic value) → FlyBox
Set font weight - accepts String ('thin', 'light', 'normal', 'medium', 'bold', etc.) or FontWeight
inherited
wrap({Axis? direction, WrapAlignment? alignment, double? spacing, WrapAlignment? runAlignment, double? runSpacing, WrapCrossAlignment? crossAxisAlignment, TextDirection? textDirection, VerticalDirection? verticalDirection, Clip? clipBehavior}) → FlyBox
Set layout type to wrap with optional direct Flutter API access
inherited

Operators

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