PaddedChildrenList.symmetric constructor

PaddedChildrenList.symmetric({
  1. required List<Widget> children,
  2. double vertical = 16.0,
  3. double horizontal = 16.0,
  4. MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
  5. CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.start,
})

Factory constructor for symmetric padding (vertical and horizontal).

Applies different padding values for vertical and horizontal sides.

Example usage:

PaddedChildrenList.symmetric(
  vertical: 10.0,
  horizontal: 20.0,
  children: [
    Text('Item 1'),
    Text('Item 2'),
    Text('Item 3'),
  ],
);

Implementation

factory PaddedChildrenList.symmetric({
  required List<Widget> children,
  double vertical = 16.0,
  double horizontal = 16.0,
  MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
  CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.start,
}) {
  return PaddedChildrenList(
    padding: EdgeInsets.symmetric(vertical: vertical, horizontal: horizontal),
    mainAxisAlignment: mainAxisAlignment,
    crossAxisAlignment: crossAxisAlignment,
    children: children,
  );
}