Giter Club home page Giter Club logo

Comments (4)

aryzhov avatar aryzhov commented on July 3, 2024

I will take a look, thank you.

from flutter-expandable.

Viper-Bit avatar Viper-Bit commented on July 3, 2024

@aryzhov i think it comes from line 458

        return builder(context, collapsed, buildBody(expanded));

and line 461

          collapsed: collapsed,

maybe u missed buildBody for collapsed object, i can make a pull if u will

return builder(context, collapsed, buildBody(expanded));

collapsed: collapsed,

from flutter-expandable.

aryzhov avatar aryzhov commented on July 3, 2024

The current behavior is by design. The parameter tapBodyToCollapse works only for collapsing, not for expanding. ExpandablePanel has an icon that is supposed to be used for expansion. Optionally, you may use tapHeaderToExpand to extend the expansion trigger to the header. Extending this to the body would not yield better usability as the user would not know that clicking on the body would expand it. In addition, if your collapsed body is long enough, it might impact scrolling where the user accidentally expands the body by clicking on it.

The reason tapBodyOnCollapse exists is for cases when the expanded body occupies the entire screen and there's no desire to add a button that collapses it.

If you still wish to implement this behavior, simply wrap your expanded body into ExpandableButton.

from flutter-expandable.

aryzhov avatar aryzhov commented on July 3, 2024

I added this feature to version 4.1.0 that has been released. You can specify tabBodyToExpand: true in the theme.

from flutter-expandable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.