mcrovero / rubber

An elastic material bottom sheet implementation for Flutter.
BSD 2-Clause "Simplified" License
562 stars 88 forks source link

implement RubberBottomSheet.of(context) #43

Closed The-Redhat closed 5 years ago

The-Redhat commented 5 years ago

Added RubberBottomSheet.of(context). Fixes #42 .

I implemented this feature similar to Scaffold.of(context). Moreover I made the RubberAnimationController public in order to allow expanding the bottom sheet. In addition to protect the screenHeight I made it private.

I am looking forward to an answer from you. Thanks in advance!

mcrovero commented 5 years ago

Thanks for the contribution, it's a cleaner solution than this inherited widget. We can try to join them together somehow to avoid duplication. What do you suggest?

The-Redhat commented 5 years ago

Thanks for your answer. I didn't see that there is already a InheritedWidget😅. Since this package is relatively new and pre 1.0, I think we should make a breaking change and do it the "normal" way (RubberBottomSheet.of(context) like Navigator, Scaffold, ..). This would make it convenient for new people using this package.

mcrovero commented 5 years ago

Yes, I agree with that! There will be a breaking change in the next release with your edit and all the new features. Many thanks for the contribution :)