Universal constructor

const Universal({
  1. Key? key,
  2. bool addCard = false,
  3. bool addInkWell = false,
  4. bool isScroll = false,
  5. bool useSingleChildScrollView = true,
  6. bool isStack = false,
  7. bool isWrap = false,
  8. bool expanded = false,
  9. bool expand = false,
  10. bool shrink = false,
  11. bool intrinsicHeight = false,
  12. bool intrinsicWidth = false,
  13. bool isOval = false,
  14. bool isClipRRect = false,
  15. bool isClipRect = false,
  16. bool visible = true,
  17. bool offstage = false,
  18. bool enabled = false,
  19. bool reverse = false,
  20. bool autoFocus = false,
  21. bool maintainState = false,
  22. bool transitionOnUserGestures = false,
  23. bool isCircleAvatar = false,
  24. bool maintainAnimation = false,
  25. bool maintainSize = false,
  26. bool maintainSemantics = false,
  27. bool maintainInteractivity = false,
  28. bool excludeFromSemantics = false,
  29. bool? enableFeedback = true,
  30. bool canRequestFocus = true,
  31. bool noScrollBehavior = true,
  32. bool sized = true,
  33. bool gaussian = false,
  34. bool safeLeft = false,
  35. bool safeTop = false,
  36. bool safeRight = false,
  37. bool safeBottom = false,
  38. double fuzzyDegree = 4,
  39. double wrapSpacing = 0.0,
  40. double runSpacing = 0.0,
  41. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  42. Color? shadowColor = Colors.transparent,
  43. Widget replacement = const SizedBox.shrink(),
  44. StackFit stackFit = StackFit.loose,
  45. MainAxisSize mainAxisSize = MainAxisSize.max,
  46. MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
  47. CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center,
  48. WrapAlignment wrapAlignment = WrapAlignment.start,
  49. WrapAlignment runAlignment = WrapAlignment.start,
  50. WrapCrossAlignment wrapCrossAlignment = WrapCrossAlignment.start,
  51. VerticalDirection verticalDirection = VerticalDirection.down,
  52. Axis direction = Axis.vertical,
  53. Axis? scrollDirection,
  54. HitTestBehavior behavior = HitTestBehavior.opaque,
  55. BorderRadius? borderRadius,
  56. Color? color,
  57. AlignmentGeometry? alignment,
  58. Widget? child,
  59. List<Widget>? children,
  60. EdgeInsetsGeometry? padding,
  61. ScrollPhysics? physics,
  62. ScrollController? scrollController,
  63. bool? primary,
  64. Decoration? foregroundDecoration,
  65. Matrix4? transform,
  66. Offset? origin,
  67. BoxConstraints? constraints,
  68. double? width,
  69. double? height,
  70. EdgeInsetsGeometry? margin,
  71. Decoration? decoration,
  72. TextBaseline? textBaseline,
  73. TextDirection? textDirection,
  74. GestureTapCallback? onTap,
  75. GestureTapDownCallback? onTapDown,
  76. GestureTapUpCallback? onTapUp,
  77. GestureTapCancelCallback? onTapCancel,
  78. GestureTapDownCallback? onSecondaryTapDown,
  79. GestureTapUpCallback? onSecondaryTapUp,
  80. GestureTapCancelCallback? onSecondaryTapCancel,
  81. GestureTapCallback? onDoubleTap,
  82. GestureLongPressCallback? onLongPress,
  83. GestureLongPressStartCallback? onLongPressStart,
  84. GestureLongPressMoveUpdateCallback? onLongPressMoveUpdate,
  85. GestureLongPressUpCallback? onLongPressUp,
  86. GestureLongPressEndCallback? onLongPressEnd,
  87. GestureDragDownCallback? onVerticalDragDown,
  88. GestureDragStartCallback? onVerticalDragStart,
  89. GestureDragUpdateCallback? onVerticalDragUpdate,
  90. GestureDragEndCallback? onVerticalDragEnd,
  91. GestureDragCancelCallback? onVerticalDragCancel,
  92. GestureDragDownCallback? onHorizontalDragDown,
  93. GestureDragStartCallback? onHorizontalDragStart,
  94. GestureDragUpdateCallback? onHorizontalDragUpdate,
  95. GestureDragEndCallback? onHorizontalDragEnd,
  96. GestureDragCancelCallback? onHorizontalDragCancel,
  97. GestureDragDownCallback? onPanDown,
  98. GestureDragStartCallback? onPanStart,
  99. GestureDragUpdateCallback? onPanUpdate,
  100. GestureDragEndCallback? onPanEnd,
  101. GestureDragCancelCallback? onPanCancel,
  102. GestureScaleStartCallback? onScaleStart,
  103. GestureScaleUpdateCallback? onScaleUpdate,
  104. GestureScaleEndCallback? onScaleEnd,
  105. GestureForcePressStartCallback? onForcePressStart,
  106. GestureForcePressPeakCallback? onForcePressPeak,
  107. GestureForcePressUpdateCallback? onForcePressUpdate,
  108. GestureForcePressEndCallback? onForcePressEnd,
  109. ShapeBorder? shape,
  110. ValueChanged<bool>? onHighlightChanged,
  111. ValueChanged<bool>? onHover,
  112. Color? focusColor,
  113. Color? hoverColor,
  114. Color? highlightColor,
  115. Color? splashColor,
  116. InteractiveInkFeatureFactory? splashFactory,
  117. double? radius,
  118. ShapeBorder? customBorder,
  119. FocusNode? focusNode,
  120. ValueChanged<bool>? onFocusChange,
  121. String? heroTag,
  122. CreateRectTween? createRectTween,
  123. HeroFlightShuttleBuilder? flightShuttleBuilder,
  124. HeroPlaceholderBuilder? placeholderBuilder,
  125. ImageProvider<Object>? backgroundImage,
  126. ImageErrorListener? onBackgroundImageError,
  127. Color? foregroundColor,
  128. double? minRadius,
  129. double? maxRadius,
  130. CustomClipper? clipper,
  131. Size? size,
  132. GestureTapCallback? onSecondaryTap,
  133. GestureLongPressMoveUpdateCallback? onSecondaryLongPressMoveUpdate,
  134. GestureLongPressCallback? onSecondaryLongPressUp,
  135. GestureLongPressCallback? onSecondaryLongPress,
  136. GestureLongPressEndCallback? onSecondaryLongPressEnd,
  137. GestureLongPressStartCallback? onSecondaryLongPressStart,
  138. double? left,
  139. double? top,
  140. double? right,
  141. double? bottom,
  142. int? flex,
  143. double? elevation,
  144. double? opacity,
  145. Clip? clipBehavior,
  146. RefreshConfig? refreshConfig,
  147. double? widthFactor,
  148. double? heightFactor,
  149. ImageFilter? filter,
  150. dynamic builder,
  151. BoxFit? fit,
  152. SystemUiOverlayStyle? systemOverlayStyle,
})

Implementation

const Universal({
  super.key,
  this.addCard = false,
  this.addInkWell = false,
  this.isScroll = false,
  this.useSingleChildScrollView = true,
  this.isStack = false,
  this.isWrap = false,
  this.expanded = false,
  this.expand = false,
  this.shrink = false,
  this.intrinsicHeight = false,
  this.intrinsicWidth = false,
  this.isOval = false,
  this.isClipRRect = false,
  this.isClipRect = false,
  this.visible = true,
  this.offstage = false,
  this.enabled = false,
  this.reverse = false,
  this.autoFocus = false,
  this.maintainState = false,
  this.transitionOnUserGestures = false,
  this.isCircleAvatar = false,
  this.maintainAnimation = false,
  this.maintainSize = false,
  this.maintainSemantics = false,
  this.maintainInteractivity = false,
  this.excludeFromSemantics = false,
  this.enableFeedback = true,
  this.canRequestFocus = true,
  this.noScrollBehavior = true,
  this.sized = true,
  this.gaussian = false,
  this.safeLeft = false,
  this.safeTop = false,
  this.safeRight = false,
  this.safeBottom = false,
  this.fuzzyDegree = 4,
  this.wrapSpacing = 0.0,
  this.runSpacing = 0.0,
  this.dragStartBehavior = DragStartBehavior.start,
  this.shadowColor = Colors.transparent,
  this.replacement = const SizedBox.shrink(),
  this.stackFit = StackFit.loose,
  this.mainAxisSize = MainAxisSize.max,
  this.mainAxisAlignment = MainAxisAlignment.start,
  this.crossAxisAlignment = CrossAxisAlignment.center,
  this.wrapAlignment = WrapAlignment.start,
  this.runAlignment = WrapAlignment.start,
  this.wrapCrossAlignment = WrapCrossAlignment.start,
  this.verticalDirection = VerticalDirection.down,
  this.direction = Axis.vertical,
  this.scrollDirection,
  this.behavior = HitTestBehavior.opaque,
  this.borderRadius,
  this.color,
  this.alignment,
  this.child,
  this.children,
  this.padding,
  this.physics,
  this.scrollController,
  this.primary,
  this.foregroundDecoration,
  this.transform,
  this.origin,
  this.constraints,
  this.width,
  this.height,
  this.margin,
  this.decoration,
  this.textBaseline,
  this.textDirection,
  this.onTap,
  this.onTapDown,
  this.onTapUp,
  this.onTapCancel,
  this.onSecondaryTapDown,
  this.onSecondaryTapUp,
  this.onSecondaryTapCancel,
  this.onDoubleTap,
  this.onLongPress,
  this.onLongPressStart,
  this.onLongPressMoveUpdate,
  this.onLongPressUp,
  this.onLongPressEnd,
  this.onVerticalDragDown,
  this.onVerticalDragStart,
  this.onVerticalDragUpdate,
  this.onVerticalDragEnd,
  this.onVerticalDragCancel,
  this.onHorizontalDragDown,
  this.onHorizontalDragStart,
  this.onHorizontalDragUpdate,
  this.onHorizontalDragEnd,
  this.onHorizontalDragCancel,
  this.onPanDown,
  this.onPanStart,
  this.onPanUpdate,
  this.onPanEnd,
  this.onPanCancel,
  this.onScaleStart,
  this.onScaleUpdate,
  this.onScaleEnd,
  this.onForcePressStart,
  this.onForcePressPeak,
  this.onForcePressUpdate,
  this.onForcePressEnd,
  this.shape,
  this.onHighlightChanged,
  this.onHover,
  this.focusColor,
  this.hoverColor,
  this.highlightColor,
  this.splashColor,
  this.splashFactory,
  this.radius,
  this.customBorder,
  this.focusNode,
  this.onFocusChange,
  this.heroTag,
  this.createRectTween,
  this.flightShuttleBuilder,
  this.placeholderBuilder,
  this.backgroundImage,
  this.onBackgroundImageError,
  this.foregroundColor,
  this.minRadius,
  this.maxRadius,
  this.clipper,
  this.size,
  this.onSecondaryTap,
  this.onSecondaryLongPressMoveUpdate,
  this.onSecondaryLongPressUp,
  this.onSecondaryLongPress,
  this.onSecondaryLongPressEnd,
  this.onSecondaryLongPressStart,
  this.left,
  this.top,
  this.right,
  this.bottom,
  this.flex,
  this.elevation,
  this.opacity,
  this.clipBehavior,
  this.refreshConfig,
  this.widthFactor,
  this.heightFactor,
  this.filter,
  this.builder,
  this.fit,
  this.systemOverlayStyle,
}) : assert(!(addCard && addInkWell), 'One of them must be true');