Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #17
Type of Change
New feature addition
Technicalities of change
I have fixed the previous back swipe gesture by adding platform and changing the threshold for gesture detection. The flow is same as that of GMAIL app. When u swipe slightly to the left on IOS , you will be redirected back to list of notices. Also , while swiping in between notices , you will be navigating between notices. Have fixed the error log I received whilst in lab the other day. (Basically, just added a null check before assertion).
How it works in brief:
I have passed the listnoticesbloc from list to notice detail. Reason -> Need to have same member params. I couldn't make it static because we need to have instances of the entire thing. So, I just get the entire list of notices in each noticeDetail screen and get the current index of the notice detail using id (Simple for loop). Then, I use gesture detector for detecting swipe gestures and do the reqd. In init state of notice detail, I also check if currentIndex is the last in the list. Then I fetch more notices and continue on. Additionally , if the user is already on the first notice and does a left swipe, a snackbar is shown saying the user is already on the first notice.
Demo
VIDEO-2024-03-07-15-20-14.mp4