StackBannersOptions constructor
StackBannersOptions({
- double? height,
- double aspectRatio = 16 / 9,
- bool loop = false,
- bool autoPlay = false,
- Duration autoPlayInterval = const Duration(seconds: 4),
- Curve autoPlayCurve = Curves.fastOutSlowIn,
- Axis scrollDirection = Axis.horizontal,
- Alignment alignment = Alignment.centerLeft,
- Curve curve = Curves.fastOutSlowIn,
- EdgeInsetsGeometry padding = const EdgeInsets.all(16),
- double borderRadius = 24.0,
- StackBannersStyle style = StackBannersStyle.style1,
- Duration itemAnimationDuration = const Duration(milliseconds: 400),
- 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.',
);