thechinkysight / paginable

A Flutter package which makes pagination easier.
https://pub.dev/packages/paginable
BSD 3-Clause "New" or "Revised" License
7 stars 1 forks source link

enhancement: use ListView.separated instead of builder #13

Closed harkairt closed 2 years ago

harkairt commented 2 years ago

By changing from builder to separated the properties semanticChildCount and itemExtent would be lost in favor of separatorBuilder. (Although, I do not really see why these props are missing from the separated ctor..)

Thanks

thechinkysight commented 2 years ago

By changing from builder to separated the properties semanticChildCount and itemExtent would be lost in favor of separatorBuilder. (Although, I do not really see why these props are missing from the separated ctor..)

Thanks

Can you please elaborate? I am not getting it clearly 😉

harkairt commented 2 years ago

So I'd like to use PaginableListViewBuilder instead of a ListView.separated docs. This ctor of ListView lets us add a separatorBuilder which is put inbetween list items (it is much more convenient than adding a bottom border to every item for eg.)

I'd like to be able to pass a separatorBuilder to PaginableListViewBuilder, but I cannot. Under the hood it uses the simple ListView.builder ctor.

By changing from builder to separated the properties semanticChildCount and itemExtent would be lost in favor of separatorBuilder. (Although, I do not really see why these props are missing from the separated ctor..)

image

note: I think I'd expect PaginableListViewBuilder not to show the Widget built by separatorBuilder between the last item and the progressIndicatorWidget

thechinkysight commented 2 years ago

Great Idea, will add support for ListView.separate()

thechinkysight commented 2 years ago

@harkairt Sorry for the delay, I have added support for ListView.separated() and will be publishing an update on pub soon, till then you can fetch the paginable supporting ListView.separated() via:

  paginable:
    git:
      url: git://github.com/chinkysight/paginable.git
      ref: dev

In your pubspec.yaml

thechinkysight commented 2 years ago

@harkairt paginable v2.0.0 is on pub, you can use it as you desired.