PaddedChildrenList.only constructor
PaddedChildrenList.only({
- required List<
Widget> children, - double left = 16.0,
- double right = 16.0,
- double top = 0.0,
- double bottom = 16.0,
- MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
- CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.start,
Factory constructor for custom padding (only specific sides).
Implementation
factory PaddedChildrenList.only({
required List<Widget> children,
double left = 16.0,
double right = 16.0,
double top = 0.0,
double bottom = 16.0, // Ensure the bottom defaults to 16.0
MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.start,
}) {
return PaddedChildrenList(
padding:
EdgeInsets.only(left: left, right: right, top: top, bottom: bottom),
mainAxisAlignment: mainAxisAlignment,
crossAxisAlignment: crossAxisAlignment,
children: children,
);
}