Check out the source code!

You can prevent a user from closing a bottom sheet usingpreventClosing!