Skip to content

How to override modal sheet closing animation? #415

@reyhaan

Description

@reyhaan

I have given it a custom animation curve that is very close to what iOS has natively, but the problem is, by default, when I close the modal sheet, it just runs the animation from 1.0 to 0.0 with same animation curve and its not ideal, I want it close the modal sheet with same animation curve as if it was run from 0.0 to 1.0.

this curve is basically fast -> slow and when it runs in reverse, it behaves like slow -> fast because of the reverse thingy, I would like to have it behave fast -> slow when closing.

showMaterialModalBottomSheet<Object>(
    useRootNavigator: true,
    expand: expand,
    context: context,
    builder: (context) => widget,
    animationCurve: const Cubic(0.1, 1, 0.2, 1),
 );

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