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.
Hey Wessel, this draft PR is almost done!
So I feel the need to pontificate that I'm not 100% sure this is the most elegant solution. This is my first foray into Dart.
So, for the lazy loading mechanism I did some reading on the Dart concept of streams and I basically setup a
StreamController
to manage adding the stream result manually, while I use theStreamSubscription
to pause and resume the stream when the user scrolls far enough into view.I didn't see any overlapping comments, oddly. Maybe there's a flutter SDK version issue here, but I did add a small amount of margin to all the comments in order to even out the spaces. Let me know what you think?
Note: I still need to edit some bits of this, for example, it will continue to try and load comments even when you scroll to the end, but I'll do that one evening next week. I just wanted to show you what I have so far just so you can either tell me that it looks good or that I need to start all over again lol.