PaddedChildrenList.only constructor

PaddedChildrenList.only({
  1. required List<Widget> children,
  2. double left = 16.0,
  3. double right = 16.0,
  4. double top = 0.0,
  5. double bottom = 16.0,
  6. MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
  7. 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,
  );
}