column function
Widget
column({
- 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,
- VoidCallback? onTap,
- ScrollController? scrollController,
Implementation
Widget column({
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 VoidCallback? onTap,
final ScrollController? scrollController,
}) =>
Container(
width: width,
height: height,
decoration: decoration,
padding: padding,
margin: margin,
child: isScrollable
? SingleChildScrollView(
physics: physics ?? const BouncingScrollPhysics(),
controller: scrollController,
child: Column(
mainAxisAlignment: mainAxisAlignment,
mainAxisSize: mainAxisSize,
crossAxisAlignment: crossAxisAlignment,
verticalDirection: verticalDirection,
children: children,
),
)
: GestureDetector(
onTap: onTap,
child: Column(
mainAxisAlignment: mainAxisAlignment,
mainAxisSize: mainAxisSize,
crossAxisAlignment: crossAxisAlignment,
verticalDirection: verticalDirection,
children: children,
),
),
);