PaddedChildrenList.all constructor
PaddedChildrenList.all({
- required List<
Widget> children, - double padding = 16.0,
- MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
- CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.start,
Factory constructor for default padding (all sides equal).
Applies the same padding value to all sides of the list.
Example usage:
PaddedChildrenList.all(
padding: 20.0,
children: [
Text('Item 1'),
Text('Item 2'),
Text('Item 3'),
],
);
Implementation
factory PaddedChildrenList.all({
required List<Widget> children,
double padding = 16.0,
MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.start,
}) {
return PaddedChildrenList(
padding: EdgeInsets.all(padding),
mainAxisAlignment: mainAxisAlignment,
crossAxisAlignment: crossAxisAlignment,
children: children,
);
}