ionicfirebaseapp / getwidget

Most popular and easy to use open source UI library with 1000+ Widgets to build flutter app.
https://www.getwidget.dev
MIT License
4.55k stars 606 forks source link

GFItemsCarousel rowcount bigger than images.length #336

Open ririlya94 opened 1 year ago

ririlya94 commented 1 year ago

Describe the bug Currently there is a bug if the row count is bigger than the children itself. The ui is fine but when you start to drag, the ui will flashing faster (it's going left and right very fast) and the it eventually will stop and it will make the offset very weird.

To Reproduce Steps to reproduce the behavior:

final List<String> imageList = [
  "https://cdn.pixabay.com/photo/2017/12/03/18/04/christmas-balls-2995437_960_720.jpg",
  "https://cdn.pixabay.com/photo/2017/12/13/00/23/christmas-3015776_960_720.jpg",
  "https://cdn.pixabay.com/photo/2019/12/19/10/55/christmas-market-4705877_960_720.jpg",
];

 GFItemsCarousel(
   rowCount: 5,
   children: imageList.map(
     (url) {
      return Container(
        margin: EdgeInsets.all(5.0),
        child: ClipRRect(
        borderRadius: BorderRadius.all(Radius.circular(5.0)),
        child:
          Image.network(url, fit: BoxFit.cover, width: 1000.0),
         ),
      );
     },
   ).toList(),
),

Screenshot_20230520_003750

  1. As per code block above, the row must be higher than the number of children
  2. Based on the screenshot above, the green color box will be initial display. When the user scroll or drag the carousel, the red color box highlighted the bug happened

Expected behavior Is either disabling the animation or physic scrolling.