timetable icon indicating copy to clipboard operation
timetable copied to clipboard

Events duplicates when using EventProvider.stream

Open repsajanboy opened this issue 3 years ago • 0 comments

Hi i am using EventProvider.stream(eventGetter (range) => Stream.fromFuture(loadEvents(range.start))). My logic is to provide a event dates from api which i call in loadEvents() method Im using range.start to get the currently visible start date then im using it as a parameter to my api. For example today is Oct. 5 and it is set as my initial date and it is start on currentlyVisibleDates my visible range is set to weekly so I pass Oct 5 to my api to get the events, then when I scroll horizontally the start now must be Oct. 12 and the value must pass to the api was Oct. 12 my problem was when I am scrolling to the next week Im getting all other dates in between ling Oct. 6, 7, 8, 9, 10, 11, and the only thing I needed was Oct. 12. and then it became a problem for building the events see screenshot

Screenshots Screenshot_20201004_003509_com justlearn

repsajanboy avatar Oct 04 '20 18:10 repsajanboy