flutter-carousel-slider icon indicating copy to clipboard operation
flutter-carousel-slider copied to clipboard

Widgets are being disposed during animation when using StackTransform

Open dvagala opened this issue 1 year ago • 0 comments

As the title says, the child widgets of the carousel are being disposed. This leads to a problem if you have some async logic when initiating the state of the widget. For example in my scenario, I'm fetching image from database and this leads to flashing.

See the gif

RPReplay_Final1687607983 (1)

CarouselSlider.builder(
    slideTransform: StackTransform(),
    itemCount: viewModel.projects.length,
    slideBuilder: (index) => InspirationDetailView(
      project: viewModel.projects[index],
    ),
  ),

dvagala avatar Jun 24 '23 12:06 dvagala