VxUniversal class

VxUniversal is an universal super widget which can be used to do almost everything.

Inheritance
Available Extensions

Constructors

VxUniversal({Key? key, bool addCard = false, bool addInkWell = false, bool useSingleChildScrollView = true, bool isStack = false, bool isWrap = false, bool expanded = false, bool expand = false, bool shrink = false, bool intrinsicHeight = false, bool intrinsicWidth = false, bool isOval = false, bool isClipRRect = false, bool isClipRect = false, bool visible = true, bool offstage = false, bool enabled = false, bool reverse = false, bool autoFocus = false, bool maintainState = false, bool transitionOnUserGestures = false, bool isCircleAvatar = false, bool maintainAnimation = false, bool maintainSize = false, bool maintainSemantics = false, bool maintainInteractivity = false, bool excludeFromSemantics = false, bool? enableFeedback = true, bool canRequestFocus = true, bool noScrollBehavior = true, bool sized = true, bool gaussian = false, bool safeLeft = false, bool safeTop = false, bool safeRight = false, bool safeBottom = false, double fuzzyDegree = 4, double wrapSpacing = 0.0, double runSpacing = 0.0, DragStartBehavior dragStartBehavior = DragStartBehavior.start, Color? shadowColor = Colors.transparent, Widget replacement = const SizedBox.shrink(), StackFit stackFit = StackFit.loose, MainAxisSize mainAxisSize = MainAxisSize.max, MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start, CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center, WrapAlignment wrapAlignment = WrapAlignment.start, WrapAlignment runAlignment = WrapAlignment.start, WrapCrossAlignment wrapCrossAlignment = WrapCrossAlignment.start, VerticalDirection verticalDirection = VerticalDirection.down, Axis direction = Axis.vertical, Axis? scrollDirection, HitTestBehavior behavior = HitTestBehavior.opaque, BorderRadius borderRadius = BorderRadius.zero, Color? color, AlignmentGeometry? alignment, Widget? child, List<Widget>? children, EdgeInsetsGeometry? padding, ScrollPhysics? physics, ScrollController? scrollController, bool? primary, Decoration? foregroundDecoration, Matrix4? transform, Offset? origin, BoxConstraints? constraints, double? width, double? height, EdgeInsetsGeometry? margin, Decoration? decoration, TextBaseline? textBaseline, TextDirection? textDirection, GestureTapCallback? onTap, GestureTapDownCallback? onTapDown, GestureTapUpCallback? onTapUp, GestureTapCancelCallback? onTapCancel, GestureTapDownCallback? onSecondaryTapDown, GestureTapUpCallback? onSecondaryTapUp, GestureTapCancelCallback? onSecondaryTapCancel, GestureTapCallback? onDoubleTap, GestureLongPressCallback? onLongPress, GestureLongPressStartCallback? onLongPressStart, GestureLongPressMoveUpdateCallback? onLongPressMoveUpdate, GestureLongPressUpCallback? onLongPressUp, GestureLongPressEndCallback? onLongPressEnd, GestureDragDownCallback? onVerticalDragDown, GestureDragStartCallback? onVerticalDragStart, GestureDragUpdateCallback? onVerticalDragUpdate, GestureDragEndCallback? onVerticalDragEnd, GestureDragCancelCallback? onVerticalDragCancel, GestureDragDownCallback? onHorizontalDragDown, GestureDragStartCallback? onHorizontalDragStart, GestureDragUpdateCallback? onHorizontalDragUpdate, GestureDragEndCallback? onHorizontalDragEnd, GestureDragCancelCallback? onHorizontalDragCancel, GestureDragDownCallback? onPanDown, GestureDragStartCallback? onPanStart, GestureDragUpdateCallback? onPanUpdate, GestureDragEndCallback? onPanEnd, GestureDragCancelCallback? onPanCancel, GestureScaleStartCallback? onScaleStart, GestureScaleUpdateCallback? onScaleUpdate, GestureScaleEndCallback? onScaleEnd, GestureForcePressStartCallback? onForcePressStart, GestureForcePressPeakCallback? onForcePressPeak, GestureForcePressUpdateCallback? onForcePressUpdate, GestureForcePressEndCallback? onForcePressEnd, ShapeBorder? shape, ValueChanged<bool>? onHighlightChanged, ValueChanged<bool>? onHover, Color? focusColor, Color? hoverColor, Color? highlightColor, Color? splashColor, InteractiveInkFeatureFactory? splashFactory, double? radius, ShapeBorder? customBorder, FocusNode? focusNode, ValueChanged<bool>? onFocusChange, String? heroTag, CreateRectTween? createRectTween, HeroFlightShuttleBuilder? flightShuttleBuilder, HeroPlaceholderBuilder? placeholderBuilder, ImageProvider<Object>? backgroundImage, ImageErrorListener? onBackgroundImageError, Color? foregroundColor, double? minRadius, double? maxRadius, CustomClipper? clipper, Size? size, GestureTapCallback? onSecondaryTap, GestureLongPressMoveUpdateCallback? onSecondaryLongPressMoveUpdate, GestureLongPressCallback? onSecondaryLongPressUp, GestureLongPressCallback? onSecondaryLongPress, GestureLongPressEndCallback? onSecondaryLongPressEnd, GestureLongPressStartCallback? onSecondaryLongPressStart, double? left, double? top, double? right, double? bottom, int? flex, double? elevation, double? opacity, Clip? clipBehavior, double? widthFactor, double? heightFactor, ImageFilter? filter, dynamic builder, BoxFit? fit, SystemUiOverlayStyle? systemOverlayStyle})
const

Properties

addCard bool
****** Card ****** ///
final
addInkWell bool
addInkWell Add InkWell to have water ripple effect
final
alignment AlignmentGeometry?
****** Align ****** ///
final
autoFocus bool
Get focus automatically
final
backgroundImage ImageProvider<Object>?
final
behavior HitTestBehavior
HitTestBehavior.opaque handles events by itself HitTestBehavior.deferToChild child handles events HitTestBehavior.translucent itself and child can receive events
final
borderRadius BorderRadius
InkWell splash radius Material Corner radius ClipRRect Clip radius
final
bottom double?
final
builder → dynamic
****** StatefulBuilderBuilderLayoutBuilder ****** /// builder types LayoutWidgetBuilderWidgetBuilderStatefulWidgetBuilder
final
canRequestFocus bool
final
child Widget?
****** childchildrenbuilder ****** /// child < children < builder Only one of the three is valid
final
children List<Widget>?
final
clipBehavior Clip?
Control the clipping method Clip.none No clip is the fastest Clip.hardEdge is not antialiasing fast Clip.antiAlias Anti-aliasing is slow Clip.antiAliasWithSaveLayer Antialiasing and saveLayer are slow Components used Stack , ClipRRect , ClipPath , ClipRect , ClipOval , Container , Material , Card , Stack , SingleChildScrollView
final
clipper CustomClipper?
****** ClipRRectClipPathClipRectClipOval ****** /// RRectPathRect
final
color Color?
****** ColoredBox||DecoratedBox ****** ///
final
constraints BoxConstraints?
****** ConstrainedBox ****** ///
final
createRectTween CreateRectTween?
final
crossAxisAlignment CrossAxisAlignment
final
customBorder ShapeBorder?
A custom clip border that overrides borderRadius
final
decoration Decoration?
****** DecoratedBox ****** ///
final
direction Axis
final
dragStartBehavior DragStartBehavior
GestureDetectorSingleChildScrollView
final
elevation double?
final
enabled bool
enabled defaults to false addInkWell defaults to false ( enabled =false || addInkWell =true ) GestureDetector properties are invalid except for onTap ( enabled =true && addInkWell =false ) GestureDetector properties are all valid
final
enableFeedback bool?
Whether the detected gesture should provide sound and/or haptic feedback, default true
final
excludeFromSemantics bool
final
expand bool
****** SizedBox ****** ///
final
expanded bool
expanded =true flex =1 is equivalent to adding the Expanded component
final
filter ImageFilter?
****** ImageFilter ****** /// fuzzyDegree is invalid when filter !=null
final
fit BoxFit?
****** FittedBox ****** ///
final
flex int?
****** Flexible ****** ///
final
flightShuttleBuilder HeroFlightShuttleBuilder?
final
focusColor Color?
Get the focus color
final
focusNode FocusNode?
focus management
final
foregroundColor Color?
final
foregroundDecoration Decoration?
final
fuzzyDegree double
Blur level 0-100
final
gaussian bool
Whether to start the background blur ImageFilter
final
hashCode int
The hash code for this object.
no setterinherited
height double?
final
heightFactor double?
final
heroTag String?
****** Hero ****** ///
final
highlightColor Color?
The color of the click
final
hoverColor Color?
Color when the pointer hovers
final
intrinsicHeight bool
****** IntrinsicHeightIntrinsicWidth ****** ///
final
intrinsicWidth bool
final
isCircleAvatar bool
****** CircleAvatar ****** ///
final
isClipRect bool
final
isClipRRect bool
final
isOval bool
final
isStack bool
****** Stack ****** ///
final
isWrap bool
****** Wrap ****** ///
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
left double?
****** Positioned ****** ///
final
mainAxisAlignment MainAxisAlignment
****** Flex=Column+Row ****** ///
final
mainAxisSize MainAxisSize
final
maintainAnimation bool
final
maintainInteractivity bool
final
maintainSemantics bool
final
maintainSize bool
final
maintainState bool
final
margin EdgeInsetsGeometry?
****** Padding ****** ///
final
maxRadius double?
final
minRadius double?
final
noScrollBehavior bool
Remove the top and bottom blue shadows
final
offstage bool
final
onBackgroundImageError ImageErrorListener?
final
onDoubleTap GestureTapCallback?
The user touches the screen twice in a short period of time
final
onFocusChange ValueChanged<bool>?
Focus change callback
final
onForcePressEnd GestureForcePressEndCallback?
final
onForcePressPeak GestureForcePressPeakCallback?
final
onForcePressStart GestureForcePressStartCallback?
final
onForcePressUpdate GestureForcePressUpdateCallback?
final
onHighlightChanged ValueChanged<bool>?
****** Click event related ****** /// ****** InkWell ****** /// Highlight change callback Called when this part of the material is highlighted or stops being highlighted
final
onHorizontalDragCancel GestureDragCancelCallback?
Triggered when onHorizontalDragDown does not complete successfully
final
onHorizontalDragDown GestureDragDownCallback?
Triggered when a touch point starts to interact with the screen while moving in the horizontal direction
final
onHorizontalDragEnd GestureDragEndCallback?
Triggered when the horizontal drag ends
final
onHorizontalDragStart GestureDragStartCallback?
Triggered when the touch point starts to move in the horizontal direction
final
onHorizontalDragUpdate GestureDragUpdateCallback?
This callback is triggered every time the touch point position on the screen changes
final
onHover ValueChanged<bool>?
Called when the pointer enters or exits the ink response area
final
onLongPress GestureLongPressCallback?
Triggered when the user touches the screen for more than 500ms
final
onLongPressEnd GestureLongPressEndCallback?
Trigger to end when the user touches the screen for more than 500ms
final
onLongPressMoveUpdate GestureLongPressMoveUpdateCallback?
Move the touch when the user touches the screen for more than 500ms
final
onLongPressStart GestureLongPressStartCallback?
Trigger to start when the user touches the screen for more than 500ms
final
onLongPressUp GestureLongPressUpCallback?
Triggered when the user touches the screen for more than 500ms
final
onPanCancel GestureDragCancelCallback?
Triggered when the user touches the screen but does not complete the tap action
final
onPanDown GestureDragDownCallback?
Triggered when the touch point starts interacting with the screen
final
onPanEnd GestureDragEndCallback?
Triggered when the pan operation completes
final
onPanStart GestureDragStartCallback?
Triggered when the touch point starts to move
final
onPanUpdate GestureDragUpdateCallback?
This callback is triggered every time the touch point position on the screen changes
final
onScaleEnd GestureScaleEndCallback?
The touch point no longer has any interaction with the screen, and also indicates that the scale gesture is completed
final
onScaleStart GestureScaleStartCallback?
Triggered when the touch point begins to interact with the screen, and a focus of 1.0 will be established at the same time.
final
onScaleUpdate GestureScaleUpdateCallback?
Triggered when interacting with the screen, and will mark a new focus
final
onSecondaryLongPress GestureLongPressCallback?
final
onSecondaryLongPressEnd GestureLongPressEndCallback?
final
onSecondaryLongPressMoveUpdate GestureLongPressMoveUpdateCallback?
final
onSecondaryLongPressStart GestureLongPressStartCallback?
final
onSecondaryLongPressUp GestureLongPressCallback?
final
onSecondaryTap GestureTapCallback?
final
onSecondaryTapCancel GestureTapCancelCallback?
final
onSecondaryTapDown GestureTapDownCallback?
final
onSecondaryTapUp GestureTapUpCallback?
final
onTap GestureTapCallback?
Triggered when the screen is briefly touched
final
onTapCancel GestureTapCancelCallback?
Triggers cancel when you touch the screen briefly
final
onTapDown GestureTapDownCallback?
Called every time the user interacts with the screen
final
onTapUp GestureTapUpCallback?
****** GestureDetector ****** /// Click to lift
final
onVerticalDragCancel GestureDragCancelCallback?
Triggered when the user suddenly stops dragging
final
onVerticalDragDown GestureDragDownCallback?
Triggered when a touch point starts to interact with the screen while moving vertically
final
onVerticalDragEnd GestureDragEndCallback?
When the user stops moving, the drag operation is considered complete and this callback is triggered
final
onVerticalDragStart GestureDragStartCallback?
Triggered when the touch point starts to move in the vertical direction
final
onVerticalDragUpdate GestureDragUpdateCallback?
This callback is triggered every time the touch point position on the screen changes
final
opacity double?
****** Opacity ****** ///
final
origin Offset?
final
padding EdgeInsetsGeometry?
final
physics ScrollPhysics?
****** SingleChildScrollView ****** ///
final
placeholderBuilder HeroPlaceholderBuilder?
final
primary bool?
final
radius double?
Water ripple radius
final
replacement Widget
****** Visibility ****** ///
final
reverse bool
final
final
runAlignment WrapAlignment
final
runSpacing double
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
safeBottom bool
final
safeLeft bool
****** SafeArea ****** ///
final
safeRight bool
final
safeTop bool
final
scrollController ScrollController?
final
scrollDirection Axis?
final
shadowColor Color?
final
shape ShapeBorder?
final
shrink bool
final
size Size?
final
sized bool
final
splashColor Color?
Water ripple color
final
splashFactory InteractiveInkFeatureFactory?
Custom water ripples
final
stackFit StackFit
final
systemOverlayStyle SystemUiOverlayStyle?
****** AnnotatedRegion ****** ///
final
textBaseline TextBaseline?
final
textDirection TextDirection?
final
top double?
final
transform Matrix4?
****** Transform ****** ///
final
transitionOnUserGestures bool
final
useSingleChildScrollView bool
Whether to use SingleChildScrollView to create scrolling components Set to false when the page logic is complex to improve the sliding performance
final
verticalDirection VerticalDirection
final
visible bool
final
width double?
final
widthFactor double?
final
wrapAlignment WrapAlignment
final
wrapCrossAlignment WrapCrossAlignment
final
wrapSpacing double
final

Methods

annotatedRegionWidget(Widget current) Widget
backdropFilter(Widget current) Widget
build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
builderWidget(Widget current) Widget
cardWidget(Widget current, BuildContext context) Widget
circleAvatarWidget(Widget current) Widget
clipWidget(Widget current, {CustomClipper? clipper}) Widget
Crop component
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
fittedBox(Widget current) Widget
flexibleWidget(Widget current) Widget
flexWidget(List<Widget> children) Widget
gestureDetectorWidget(Widget current) Widget
heroWidget(Widget current) Widget
inkWellWidget(Widget current) Widget
material(Widget current, {required MaterialType mType, Color? mShadowColor, Color? mColor, TextStyle? mTextStyle, required double mElevation, BorderRadiusGeometry? mBorderRadius, ShapeBorder? mShape, required bool mBorderOnForeground, required Clip mClipBehavior}) Material
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
offstageWidget(Widget current) Widget
paddingWidget(Widget current) Widget
singleChildScrollViewWidget(Widget current) Widget
stackWidget(List<Widget> children) Widget
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
universal(Widget current, {GestureTapCallback? onTap}) Widget
visibilityWidget(Widget current) Widget
wrapWidget(List<Widget> children) Widget

Operators

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