Skip to content

Can't fling sheet closed using header. #31

@dickermoshe

Description

@dickermoshe

This function returns the widget that handles the header and footer gestures.
https://github.com/What-the-Flutter/wtf_sliding_sheet/blob/bcce0088049570efea5b6dd483869711a76ece0a/lib/src/sheet.dart#L1179

When the user finishes a drag, if there is sufficient velocity, the sheet will snap to the next / previous snapping point.
This function is on the gesture handler handles that.
https://github.com/What-the-Flutter/wtf_sliding_sheet/blob/bcce0088049570efea5b6dd483869711a76ece0a/lib/src/sheet.dart#L1219

BUG
When SetState runs at the end of this function, the sheet snaps back open. This only happens when closing a sheet.
This is only happening when using a customBuilder
It seems that the extent value is not being updated properly, calling set state therefore rebuilds the sheet in an open state
https://github.com/What-the-Flutter/wtf_sliding_sheet/blob/bcce0088049570efea5b6dd483869711a76ece0a/lib/src/sheet.dart#L1228

untitlssssssssssed.webm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions