ScrollableColumn constructor

const ScrollableColumn({
  1. Key? key,
  2. ScrollController? controller,
  3. ScrollPhysics physics = const BouncingScrollPhysics(),
  4. required List<Widget> children,
  5. MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
  6. CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center,
  7. MainAxisSize mainAxisSize = MainAxisSize.max,
  8. TextBaseline textBaseline = TextBaseline.alphabetic,
  9. TextDirection textDirection = TextDirection.ltr,
  10. VerticalDirection verticalDirection = VerticalDirection.down,
  11. EdgeInsets padding = const EdgeInsets.all(0.0),
  12. bool reverse = false,
  13. double verticalCut = 0.0,
  14. bool constrained = true,
})

Creates a ScrollableColumn.

  • controller is the ScrollController passed onto the scroll view.

  • physics is the ScrollPhysics which specifies the scroll behavior on the scroll view. This will be set to BouncingScrollPhysics by default to implement the Cupertino-styled design.

  • mainAxisAlignment is the vertical aligment of the children.

  • crossAxisAlignment is the horizontal aligment of the children.

  • mainAxisSize defines the height of the column. If a high verticalCut value is defined to lower the size of the column, the mainAxisSize might then be set to min.

  • textBaseline is the text base alignment.

  • textDirection is the direction in the text should be displayed in.

  • padding is the inner padding of the scroll view wrapping the children.

  • reverse states whether to reverse scroll view's scroll direction.

  • verticalCut is the vertical cut which will decrease the overall column height. The column's constrains are set to the screen's height. If the column height should be lower than the screen's height, the verticalCut should be set to the amount of pixels, that should be subtracted from the overall box constraints (height).

Implementation

const ScrollableColumn({
  Key? key,
  this.controller,
  this.physics = const BouncingScrollPhysics(),
  required this.children,
  this.mainAxisAlignment = MainAxisAlignment.start,
  this.crossAxisAlignment = CrossAxisAlignment.center,
  this.mainAxisSize = MainAxisSize.max,
  this.textBaseline = TextBaseline.alphabetic,
  this.textDirection = TextDirection.ltr,
  this.verticalDirection = VerticalDirection.down,
  this.padding = const EdgeInsets.all(0.0),
  this.reverse = false,
  this.verticalCut = 0.0,
  this.constrained = true,
}) : super(key: key);