Box class
Easy Box
All in one widget, with all the most basic widget properties. Composing a tree of widgets depending on the properties that you request. Just organize everything with the Box.
Features
- Background
- Size
- Padding and Margin
- Border
- Shape
- List
- Alignment
- Expanded
- Transform
- Text Style
- Inheritance
Constructors
-
Box({Key? key, Widget? child, List<
Widget> ? children, Widget itemBuilder(BuildContext context, int index)?, int? itemCount, ScrollPhysics? physics, Axis? direction, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, Color? backgroundColor, Gradient? backgroundGradient, DecorationImage? backgroundImage, double? width, double? height, Border? border, BorderRadius? borderRadius, BoxShape? shape, Alignment? alignment, Spacing? spacing, Offset? translate, double? scale, double? rotate, Offset? origin, TextStyle? textStyle, Color? splashColor, Color? highlightColor, Color? hoverColor, Color? buttonColor, dynamic onTap()?, dynamic onDoubleTap()?, dynamic onLongPress()?}) -
Easy Box
const
-
Box.column({Key? key, List<
Widget> ? children, Widget itemBuilder(BuildContext context, int index)?, int? itemCount, ScrollPhysics? physics, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, Color? backgroundColor, Gradient? backgroundGradient, DecorationImage? backgroundImage, double? width, double? height, Border? border, BorderRadius? borderRadius, BoxShape? shape, Alignment? alignment = Alignment.topLeft, Spacing? spacing, Offset? translate, double? scale, double? rotate, Offset? origin, TextStyle? textStyle, Color? splashColor, Color? highlightColor, Color? hoverColor, Color? buttonColor, dynamic onTap()?, dynamic onDoubleTap()?, dynamic onLongPress()?}) -
const
-
Box.list({Key? key, List<
Widget> ? children, Widget itemBuilder(BuildContext context, int index)?, int? itemCount, ScrollPhysics? physics, Axis? direction, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, Color? backgroundColor, Gradient? backgroundGradient, DecorationImage? backgroundImage, double? width, double? height, Border? border, BorderRadius? borderRadius, BoxShape? shape, Offset? translate, double? scale, double? rotate, Offset? origin, TextStyle? textStyle, Color? splashColor, Color? highlightColor, Color? hoverColor, Color? buttonColor, dynamic onTap()?, dynamic onDoubleTap()?, dynamic onLongPress()?}) -
const
-
Box.row({Key? key, List<
Widget> ? children, Widget itemBuilder(BuildContext context, int index)?, int? itemCount, ScrollPhysics? physics, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, Color? backgroundColor, Gradient? backgroundGradient, DecorationImage? backgroundImage, double? width, double? height, Border? border, BorderRadius? borderRadius, BoxShape? shape, Alignment? alignment = Alignment.topLeft, Spacing? spacing, Offset? translate, double? scale, double? rotate, Offset? origin, TextStyle? textStyle, Color? splashColor, Color? highlightColor, Color? hoverColor, Color? buttonColor, dynamic onTap()?, dynamic onDoubleTap()?, dynamic onLongPress()?}) -
const
Properties
- alignment → Alignment?
-
Alignment of the items in a list.
final
- backgroundColor → Color?
-
final
- backgroundGradient → Gradient?
-
final
- backgroundImage → DecorationImage?
-
final
- border → Border?
-
final
- borderRadius → BorderRadius?
-
final
-
Uses one color to set
splashColor
,highlightColor
andhoverColor
all at once, with different opacity.final - child → Widget?
-
final
-
children
→ List<
Widget> ? -
final
- direction → Axis?
-
Direction of the items in a list.
final
- hasColumnRow → bool
-
no setter
- hasContainer → bool
-
no setter
- hasDecoration → bool
-
no setter
- hasGestureDetector → bool
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasInkWell → bool
-
no setter
- hasList → bool
-
no setter
- hasTransform → bool
-
no setter
- height → double?
-
final
- highlightColor → Color?
-
final
- hoverColor → Color?
-
final
- itemBuilder → (Widget Function(BuildContext context, int index)?)
-
final
- itemCount → int?
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- margin → EdgeInsetsGeometry?
-
final
- onDoubleTap → (dynamic Function()?)
-
Callback to when the Box is double tapped.
final
- onLongPress → (dynamic Function()?)
-
Callback to when the Box is pressed for a bit.
final
- onTap → (dynamic Function()?)
-
Callback to when the Box is tapped.
final
- origin → Offset?
-
Offset of the transform, relative to the center of the widget.
final
- padding → EdgeInsetsGeometry?
-
final
- physics → ScrollPhysics?
-
final
- rotate → double?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scale → double?
-
final
- shape → BoxShape?
-
final
- spacing → Spacing?
-
Spacing of the items in a list.
final
- splashColor → Color?
-
final
- textStyle → TextStyle?
-
Sets the default text style for all Text widgets within this Box.
final
- translate → Offset?
-
final
- width → double?
-
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
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
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → 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
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited