SliderView class

A customizable carousel slider widget with drag gestures, custom image widgets, and optional questions and answer buttons.

Inheritance

Constructors

SliderView({required List<Widget> imageWidgets, String? titleOne, String? titleTwo, List? questions, List? answerOptions, List<Widget> answerButtonBuilder(int index)?, Curve animationCurve = Curves.easeInOut, Duration animationDuration = const Duration(milliseconds: 300), Color primaryColor = Colors.blue, Color secondaryColor = Colors.blueAccent, double? paddingScale, double? fontScale, double? imageWidthScale, double? centerImageWidthScale, double? centerImageHeightScale, double? buttonPaddingScale, double? borderRadiusScale, double? nextImageOffsetScale, double? nextImageWidthScale, double? nextToLeftTop, double? nextToLeftBottom, double? nextToLeftOffset, double? leftTop, double? leftBottom, double? leftOffset, double? centerTop, double? centerBottom, double? rightTop, double? rightBottom, double? rightOffset, double? nextToRightTop, double? nextToRightBottom, double? nextToRightOffset, bool arrowShow = true, dynamic onIndexChanged(int)?, Key? key})
const

Properties

animationCurve Curve
Animation curve for transitions.
final
animationDuration Duration
Duration of animations.
final
answerButtonBuilder List<Widget> Function(int index)?
Optional function to build custom answer buttons for each question.
final
answerOptions List?
Optional list of answer options for each question.
final
arrowShow bool
Whether to show navigation arrows.
final
borderRadiusScale double?
Border radius scale for images and containers.
final
buttonPaddingScale double?
Padding scale for buttons.
final
centerBottom double?
final
centerImageHeightScale double?
Height scale for the center image.
final
centerImageWidthScale double?
Width scale for the center image.
final
centerTop double?
final
fontScale double?
Font scale for text elements.
final
hashCode int
The hash code for this object.
no setterinherited
imageWidgets List<Widget>
List of custom image widgets to display in the carousel.
final
imageWidthScale double?
Width scale for side images.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leftBottom double?
final
leftOffset double?
final
leftTop double?
final
nextImageOffsetScale double?
Offset scale for next-to-center images.
final
nextImageWidthScale double?
Width scale for next-to-center images.
final
nextToLeftBottom double?
final
nextToLeftOffset double?
final
nextToLeftTop double?
Positioning parameters for image placement.
final
nextToRightBottom double?
final
nextToRightOffset double?
final
nextToRightTop double?
final
onIndexChanged → dynamic Function(int)?
Callback when the current index changes.
final
paddingScale double?
Padding scale for the slider.
final
primaryColor Color
Primary color for the slider (replaces AppColors.primary2).
final
questions List?
Optional list of questions to display below the center image.
final
rightBottom double?
final
rightOffset double?
final
rightTop double?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secondaryColor Color
Secondary color for borders and accents (replaces AppColors.secondaryColor).
final
titleOne String?
Optional title displayed at the top of the center image.
final
titleTwo String?
Optional title displayed at the bottom of the center image.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _SliderViewState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited