SizeTransition constructor

const SizeTransition({
  1. Key? key,
  2. Axis axis = Axis.vertical,
  3. required Animation<double> sizeFactor,
  4. @Deprecated('Use alignment instead. ' 'This property provides full control over both axes, which is an improvement over the old axisAlignment. ' 'This feature was deprecated after v3.41.0-1.0.pre.') double? axisAlignment,
  5. AlignmentGeometry? alignment,
  6. double? fixedCrossAxisSizeFactor,
  7. Widget? child,
})

Creates a size transition.

The axis argument defaults to Axis.vertical. The alignment defaults to Alignment.center, which centers the child within the parent during the transition.

Implementation

const SizeTransition({
  super.key,
  this.axis = Axis.vertical,
  required Animation<double> sizeFactor,
  @Deprecated(
    'Use alignment instead. '
    'This property provides full control over both axes, which is an improvement over the old axisAlignment. '
    'This feature was deprecated after v3.41.0-1.0.pre.',
  )
  this.axisAlignment,
  this.alignment,
  this.fixedCrossAxisSizeFactor,
  this.child,
}) : assert(fixedCrossAxisSizeFactor == null || fixedCrossAxisSizeFactor >= 0.0),
     assert(
       axisAlignment == null || alignment == null,
       'Cannot provide both axisAlignment and alignment as axisAlignment has been deprecated and superseded by alignment.',
     ),
     super(listenable: sizeFactor);