How to Trigger a Bottom Sheet on Last Page Swipe in a Dynamic PageView?

Actions & Logic

Hi!, I need some assistance with implementing a feature in my app. I'm trying to make a bottom sheet appear when the user swipes to the last video in my PageView. The collection of videos is dynamic. Here is my current setup:

  1. I have a PageView that displays a list of videos.

  2. I want to trigger a bottom sheet when the user reaches the last video in this PageView.

What have you tried so far?

I've set up a condition that checks if the PageView Current Index is greater than or equal to the total number of items in my dynamic list (numList). Here is a brief overview of my current configuration:

  • I created a variable numList to hold the number of items in the list.

  • I set up a condition to compare PageView Current Index with numList.

  • The expression I used to increment the numList is (numList) => numList + 1.

Despite this setup, I'm encountering an error in the code expression, and the bottom sheet is not appearing as expected. I've attached a screenshot of my current setup for reference.

Could someone please help me identify what I might be doing wrong or suggest a better way to achieve this functionality?

Thank you!

Did you check FlutterFlow's Documentation for this topic?
No
1
1 reply