WoltModalSheetPaginationAnimationStyle class

Defines the animation styles for pagination transitions within Wolt Modal Sheet.

This class provides customization for animations triggered during page changes in a multi-page modal sheet. It allows detailed customization of animation aspects for modal sheet height adjustments, slide positions of the main content, and opacity transitions for various components such as the navigation toolbar, sticky action button (SAB), and top bar. By utilizing customizable animation curves, users can precisely control the timing and behavior of these animations to customize transitions between pages within the modal sheet.

Animations defined in this class are triggered during pagination, which occurs when the modal sheet changes from one page to another. These animations include:

  • Modal sheet height transitions: Adjusts the height of the modal sheet to fit the content of the incoming page so that during the transition both incoming and outgoing pages have the same height.
  • Main content slide transitions: Moves the main content horizontally or vertically, creating a seamless transition effect during the transition.
  • Opacity transitions for components: Fades in or out specific components (navigation toolbar, SAB, top bar).

By adjusting the provided animation curves, developers can create custom animations that align with the overall design language of their application.

Constructors

WoltModalSheetPaginationAnimationStyle.new({Duration paginationDuration = const Duration(milliseconds: 350), Offset? incomingMainContentSlideBeginOffset, Offset incomingMainContentSlideEndOffset = Offset.zero, Offset outgoingMainContentSlideBeginOffset = Offset.zero, Offset? outgoingMainContentSlideEndOffset, Curve modalSheetHeightTransitionCurve = const Interval(0 / 350, 300 / 350, curve: Curves.fastOutSlowIn), Curve mainContentIncomingSlidePositionCurve = const Interval(50 / 350, 350 / 350, curve: Curves.fastOutSlowIn), Curve mainContentOutgoingSlidePositionCurve = const Interval(50 / 350, 350 / 350, curve: Curves.fastOutSlowIn), Curve mainContentIncomingOpacityCurve = const Interval(150 / 350, 350 / 350, curve: Curves.linear), Curve mainContentOutgoingOpacityCurve = const Interval(50 / 350, 150 / 350, curve: Curves.linear), Curve incomingNavigationToolbarOpacityCurve = const Interval(100 / 350, 300 / 350, curve: Curves.linear), Curve outgoingNavigationToolbarOpacityInterval = const Interval(0, 100 / 350, curve: Curves.linear), Curve incomingSabOpacityCurve = const Interval(100 / 350, 300 / 350, curve: Curves.linear), Curve outgoingSabOpacityCurve = const Interval(0, 100 / 350, curve: Curves.linear), Curve incomingTopBarOpacityCurve = const Interval(150 / 350, 350 / 350, curve: Curves.linear), Curve outgoingTopBarOpacityCurve = const Interval(0, 150 / 350, curve: Curves.linear)})
Constructs a WoltModalSheetPaginationAnimationStyle with customizable animation curves and offsets for different components during page transitions. Allows for detailed control over the appearance and behavior of modal sheet pagination animations, enabling developers to create smooth, visually appealing transitions.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
incomingMainContentSlideBeginOffset Offset?
The beginning offset for the slide animation of the main content when it is incoming. Allows specifying a custom start position, impacting how the content enters the view.
final
incomingMainContentSlideEndOffset Offset
The ending offset for the slide animation of the main content when it is incoming. Determines the final position of the entering content.
final
incomingNavigationToolbarOpacityCurve Curve
Curve for animating the opacity of the navigation toolbar when incoming. This curve controls how the toolbar fades in as the page transitions in.
final
incomingSabOpacityCurve Curve
Curve for the opacity animation of the sticky action button (SAB) when incoming. Defines how the SAB fades in during the page transition.
final
incomingTopBarOpacityCurve Curve
Curve for the opacity animation of the top bar when incoming. Controls the fade-in effect of the top bar as the page transitions in.
final
mainContentIncomingOpacityCurve Curve
Curve for the opacity animation of the main content when incoming. Controls how the opacity of entering main content changes, making it appear smoothly.
final
mainContentIncomingSlidePositionCurve Curve
Curve for the slide position animation of the main content when it is incoming. Defines the motion trajectory for entering content.
final
mainContentOutgoingOpacityCurve Curve
Curve for the opacity animation of the main content when outgoing. Controls how the opacity of exiting main content changes, making it disappear smoothly.
final
mainContentOutgoingSlidePositionCurve Curve
Curve for the slide position animation of the main content when it is outgoing. Defines the motion trajectory for exiting content.
final
modalSheetHeightTransitionCurve Curve
Curve for animating the height transition of the modal sheet height during pagination. The height of the modal sheet is always equal to the height of the main content, and this curve controls how the height of the main content's of both the incoming and outgoing pages changes. During the transition, the height of the both incoming and outgoing pages are equal.
final
outgoingMainContentSlideBeginOffset Offset
The beginning offset for the slide animation of the main content when it is outgoing. Specifies the start position of the content as it begins to exit the view.
final
outgoingMainContentSlideEndOffset Offset?
The ending offset for the slide animation of the main content when it is outgoing. Determines the final off-screen position of the exiting content, controlling its exit trajectory.
final
outgoingNavigationToolbarOpacityInterval Curve
Curve for animating the opacity of the navigation toolbar when outgoing. Controls the fade-out effect of the toolbar as the page transitions out.
final
outgoingSabOpacityCurve Curve
Curve for the opacity animation of the sticky action button (SAB) when outgoing. Defines how the SAB fades out during the page transition.
final
outgoingTopBarOpacityCurve Curve
Curve for the opacity animation of the top bar when outgoing. Controls the fade-out effect of the top bar as the page transitions out.
final
paginationDuration Duration
The duration of the pagination transition.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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