Skip to content
This repository was archived by the owner on Nov 24, 2022. It is now read-only.
This repository was archived by the owner on Nov 24, 2022. It is now read-only.

Dynamic grabbingHeight causes snapping to not complete the entire path. (buggy) #79

Description

@shantaly

First off amazing package!

I am running into this issue where dynamic values seem to confuse the sheets snapping positions.

My grabbing widget changes in height. Hence why I need to change the grabbingHeight property dynamically in my build function.

It seems like the SnappingSheet widget doesn't refresh the new values while snapping is in motion. After snapping is done (and off by a few pixels), I can drag and release the sheet slightly just to find it snap in the right place.

On onSnapStart -> set expanded bool to true/false

onSnapStart: (sheetPosition, snappingPosition) {
  if (snappingPosition.grabbingContentOffset == -1) {
    setState(() {
      _isExpanded = true;
    });
  } else {
    setState(() {
      _isExpanded = false;
    });
  }
},

In build function

var grabbingHeight = _isExpanded ? 150  : 105 ;

Any workarounds?

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