Skip to content

Bottom sheet is at wrong position after orientation change #56

@janoschp

Description

@janoschp

Describe the bug
When using a RubberAnimationController like this one:
_controller = RubberAnimationController( vsync: this, halfBoundValue: AnimationControllerValue(percentage: 0.5), lowerBoundValue: AnimationControllerValue(pixel: 200), duration: Duration(milliseconds: 200) );
and an upper layer like this:

Widget _getUpperLayer() { return Container( height: 200.0, decoration: BoxDecoration( color: Colors.cyan ), ); }
then after starting the app everything looks fine, collapsed state:

image

Expanded state:

image

(note this is only for demonstration purposes, of course 200 pixel tall strip as a upper layer doesn't make a lot of sense)

Now I collapse the bottom sheet again and go into landscape mode:
image

The bottom sheet is not at the right position. A part of it is hidden below the screen.

Expanded in landscape:

image

To Reproduce
Steps to reproduce the behavior:

  1. open the default.dart file in the example app
  2. Write this on line 96:
    height: 200.0,
  3. Start the example App and open the default example. Rotate the screen.

Expected behavior
In the horizontal, as well as in the vertical position the full 200.0 pixel tall strip should be visible in the collapsed state.

Smartphone (please complete the following information):

  • Android Emulator Api 29

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions