row function
Widget
row({
- EdgeInsets padding = EdgeInsets.zero,
- EdgeInsets margin = EdgeInsets.zero,
- List<
Widget> children = const <Widget>[], - MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
- MainAxisSize mainAxisSize = MainAxisSize.max,
- CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center,
- VerticalDirection verticalDirection = VerticalDirection.down,
- BoxDecoration? decoration,
- double? width,
- double? height,
- bool isScrollable = false,
- ScrollPhysics? physics,
- ScrollController? scrollController,
- VoidCallback? onTap,
Implementation
Widget row({
final EdgeInsets padding = EdgeInsets.zero,
final EdgeInsets margin = EdgeInsets.zero,
final List<Widget> children = const <Widget>[],
final MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
final MainAxisSize mainAxisSize = MainAxisSize.max,
final CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center,
final VerticalDirection verticalDirection = VerticalDirection.down,
final BoxDecoration? decoration,
final double? width,
final double? height,
final bool isScrollable = false,
final ScrollPhysics? physics,
final ScrollController? scrollController,
final VoidCallback? onTap,
}) =>
Container(
width: width,
height: height,
decoration: decoration,
padding: padding,
margin: margin,
child: isScrollable
? SingleChildScrollView(
physics: physics ?? const BouncingScrollPhysics(),
scrollDirection: Axis.horizontal,
controller: scrollController,
child: Row(
mainAxisAlignment: mainAxisAlignment,
mainAxisSize: mainAxisSize,
crossAxisAlignment: crossAxisAlignment,
verticalDirection: verticalDirection,
children: children,
),
)
: GestureDetector(
onTap: onTap,
child: Row(
mainAxisAlignment: mainAxisAlignment,
mainAxisSize: mainAxisSize,
crossAxisAlignment: crossAxisAlignment,
verticalDirection: verticalDirection,
children: children,
),
),
);