skip to Main Content

With flutter, is there a way to show or hide widget with this type of animation :

enter image description here

Thanks in advance, 🙂

2

Answers


  1. You Can use the Expandable

    ExpandableNotifier(  // <-- Provides ExpandableController to its children
      child: Column(
        children: [
          Expandable(           // <-- Driven by ExpandableController from ExpandableNotifier
            collapsed: ExpandableButton(  // <-- Expands when tapped on the cover photo
              child: buildCoverPhoto(),
            ),
            expanded: Column(  
              children: [
                buildAllPhotos(),
                ExpandableButton(       // <-- Collapses when tapped on
                  child: Text("Back"),
                ),
              ]
            ),
          ),
        ],
      ),
    );
    
    Login or Signup to reply.
  2. you can achieve this type of animation using Animated Switcher. Create two different widgets. The first widget is the card you click on; the rest are the columns you show on. You can quickly achieve this by using the combination of Value Notifier and Animated Switcher widget

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search