Page View

The Page View widget displays a scrollable list of pages. It is commonly used for onboarding screens, carousels, or any UI that requires full-page swiping.

Properties

Property
Description

dataSource

A list of data that can be used to dynamically generate pages.

controller

An expression to control the currently displayed page.

initialPage

The index of the page to show when the widget is first displayed.

viewportFraction

The fraction of the viewport that each page should occupy.

keepPage

If true, the state of each page is preserved as it scrolls off-screen.

allowScroll

If true, the user can scroll between pages.

reverse

If true, the order of the pages is reversed.

padEnds

If true, padding is added to the ends of the list of pages.

pageSnapping

If true, the scroll view will snap to the nearest page.

scrollDirection

The direction of scrolling (horizontal or vertical).

onPageChanged

An action to trigger when the currently displayed page changes.


Default Properties

The Page View widget supports the following section of Default Properties:

Layout

  • width

  • height

  • padding

  • margin

  • align

Last updated