StackBannersOptions constructor

StackBannersOptions({
  1. double? height,
  2. double aspectRatio = 16 / 9,
  3. bool loop = false,
  4. bool autoPlay = false,
  5. Duration autoPlayInterval = const Duration(seconds: 4),
  6. Curve autoPlayCurve = Curves.fastOutSlowIn,
  7. Axis scrollDirection = Axis.horizontal,
  8. Alignment alignment = Alignment.centerLeft,
  9. Curve curve = Curves.fastOutSlowIn,
  10. EdgeInsetsGeometry padding = const EdgeInsets.all(16),
  11. double borderRadius = 24.0,
  12. StackBannersStyle style = StackBannersStyle.style1,
  13. Duration itemAnimationDuration = const Duration(milliseconds: 400),
  14. Clip clipBehavior = Clip.hardEdge,
})

Implementation

StackBannersOptions({
  this.height,
  this.aspectRatio = 16 / 9,
  this.loop = false,
  this.autoPlay = false,
  this.autoPlayInterval = const Duration(seconds: 4),
  this.autoPlayCurve = Curves.fastOutSlowIn,
  this.scrollDirection = Axis.horizontal,
  this.alignment = Alignment.centerLeft,
  this.curve = Curves.fastOutSlowIn,
  this.padding = const EdgeInsets.all(16),
  this.borderRadius = 24.0,
  this.style = StackBannersStyle.style1,
  this.itemAnimationDuration = const Duration(milliseconds: 400),
  this.clipBehavior = Clip.hardEdge,
}) : assert(
       alignment == Alignment.topCenter ||
           alignment == Alignment.bottomCenter ||
           alignment == Alignment.centerLeft ||
           alignment == Alignment.centerRight,
       'Alignment $alignment is not supported. '
       'Supported alignments are: Alignment.topCenter, Alignment.bottomCenter, '
       'Alignment.centerLeft, Alignment.centerRight.',
     );