Custom bottom content offset for BottomSheet #159
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.
Change
I made a rather tiny change for convenience in a project where I use your awesome bottomsheet implementation. That is, normally the content offset when the bottomsheet is dragged to the bottom of the screen is tied to the safe area of the device. As we have a TabBar and optional sticky content at the bottom of the screen, we want the bottomsheet to align above this content when dragged all the way down. Hence we added an additional argument to the bottomsheet initializer to set this offset on top of the safe area for a bit more control over the alignment process. This is just our change, I hope this can be in the one or other way be integrated as a feature. Changes to the adaptations to better match the coding style of the project are appreciated. I also added a screenshot to illustrate the change below.
Screenshot