Div.row constructor

Div.row(
  1. List<Widget>? children, {
  2. Key? key,
  3. AlignmentGeometry? alignment,
  4. EdgeInsetsGeometry? padding,
  5. Color? color,
  6. Decoration? decoration,
  7. Decoration? foregroundDecoration,
  8. double? width,
  9. double? height,
  10. BoxConstraints? constraints,
  11. EdgeInsetsGeometry? margin,
  12. Matrix4? transform,
  13. AlignmentGeometry? transformAlignment,
  14. Clip clipBehavior = Clip.none,
  15. GestureTapCallback? onTap,
  16. HitTestBehavior? behavior = HitTestBehavior.opaque,
})

Implementation

Div.row(
  List<Widget>? children, {
  Key? key,
  AlignmentGeometry? alignment,
  EdgeInsetsGeometry? padding,
  Color? color,
  Decoration? decoration,
  Decoration? foregroundDecoration,
  double? width,
  double? height,
  BoxConstraints? constraints,
  EdgeInsetsGeometry? margin,
  Matrix4? transform,
  AlignmentGeometry? transformAlignment,
  Clip clipBehavior = Clip.none,
  // if the prop [onTap] not null, it will wrap the [child] with [GestureDetector]
  // and the [onTap] will be used as the [GestureDetector.onTap]
  GestureTapCallback? onTap,
  // the gesture detector behavior
  HitTestBehavior? behavior = HitTestBehavior.opaque,
}) : super(
        key: key,
        alignment: alignment,
        padding: padding,
        color: color,
        decoration: decoration,
        foregroundDecoration: foregroundDecoration,
        width: width,
        height: height,
        constraints: constraints,
        margin: margin,
        transform: transform,
        transformAlignment: transformAlignment,
        child: onTap != null
            ? GestureDetector(
                behavior: behavior,
                onTap: onTap,
                child: Row(
                  children: children ?? [],
                ),
              )
            : Row(
                children: children ?? [],
              ),
        clipBehavior: clipBehavior,
      );