blackmann / story_view

Story view for apps with stories.
BSD 3-Clause "New" or "Revised" License
417 stars 342 forks source link

Had to double tap the slide to go to previous slide #150

Open imsujan276 opened 2 years ago

imsujan276 commented 2 years ago

I have a story view that has many slides.

Going to the next slide on tap on the image works fine. but when I try to go to the previous slide, it just resets the sliding duration of the current slider. And I tap it again, and it goes to the previous slide.

Is anyone else facing this issue?

My code:

        StoryViewer(
              key: UniqueKey(),
              viewerController: controller,
              customValues: Customizer(
                sendIcon: Icons.send,
                closeIcon: Icons.close,
                replyPlaceholder: "Message",
              ),
              hasReply: false,
              trusted: true,
              loop: false,
              progressBorderRadius:
                  const BorderRadius.all(Radius.circular(12)),
              progressRowPadding: const EdgeInsets.all(10),
              progressHeight: 6,
              backgroundColor: kGreyColor,
              mediaAlignment: Alignment.center,
              // auto go back if the aspect ratio is StoryRatio.r9_16
              // ratio: StoryRatio.r4_3,
              stories: storyItems,
              userModel: UserModel(
                username: widget.story.name,
                profilePicture: NetworkImage(widget.story.profileImage),
              ),
              onEachStoryLoadComplated: ({String? storyID}) {
                print(storyID);
              },
            ),