title: Flutter: How to create smooth dropdown?
body: <p>I am new to flutter and trying to make a list of dropdown where upon click the element smoothly toggle showing the inner list of the element.</p>
  
  <p>Please ref the image attached for better understanding.</p>
  
  <p><a href="https://i.stack.imgur.com/U4X6R.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/U4X6R.png" alt="enter image description here"></a></p>
  
  <p>Following is my staring code.</p>
  
  <pre><code>import 'package:flutter/material.dart';
  import 'package:lpa_exam/src/api/api_manager.dart';
  
  class Practicetest extends StatefulWidget {
    final examId;
    Practicetest({Key key, this.examId});
    @override
    _PracticetestComp createState() =&gt; _PracticetestComp();
  }
  
  class _PracticetestComp extends State&lt;Practicetest&gt; {
    List listofpracticetest;
    void initState() {
      super.initState();
      APIManager.getpracticetestlist(widget.examId).then((resultpracticelist) {
        setpracticetest(resultpracticelist);
      });
    }
  
    void setpracticetest(value) {
      setState(() {
        listofpracticetest = value;
      });
    }
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
          backgroundColor: Color(0xffF8FDF7),
          appBar: AppBar(
            backgroundColor: Color(0xffF8FDF7), // status bar color
            brightness: Brightness.light,
            elevation: 0.0,
            leading: Container(
              margin: EdgeInsets.only(left: 17),
              child: RawMaterialButton(
                onPressed: () {
                  Navigator.pushNamed(context, '/');
                },
                child: new Icon(
                  Icons.keyboard_backspace,
                  color: Colors.red[900],
                  size: 25.0,
                ),
                shape: new CircleBorder(),
                elevation: 4.0,
                fillColor: Colors.white,
                padding: const EdgeInsets.all(5.0),
              ),
            ),
          ),
          body: Container(
            // height: 200,
            margin: EdgeInsets.only(top: 40, left: 30, right: 30),
            child: ListView(
              shrinkWrap: true,
              scrollDirection: Axis.vertical,
              children: [
                Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: &lt;Widget&gt;[
                    ListTile(
                        dense: true,
                        contentPadding: EdgeInsets.all(0),
                        title: Text(
                          'Quick set of',
                          style: TextStyle(
                            fontWeight: FontWeight.w500,
                            fontSize: 18,
                          ),
                        ),
                        subtitle: Text(
                          'Practice Tests',
                          style: TextStyle(
                              fontWeight: FontWeight.w700,
                              fontSize: 22,
                              color: Colors.black),
                        )),
                    Container(
                        decoration: BoxDecoration(
                            border: Border(
                          bottom: BorderSide(
                            color: Colors.grey[300],
                            width: 1.0,
                          ),
                        )),
                        margin: EdgeInsets.only(top: 30),
                        child: Container(
                          child: ListTile(
                            contentPadding: EdgeInsets.all(0),
                            leading: Text(
                              'Alegbra',
                              style: TextStyle(
                                  color: Colors.black,
                                  fontWeight: FontWeight.w500),
                            ),
                            trailing: Text('1 Submitted ',
                                style: TextStyle(color: Colors.grey)),
                          ),
                        )),
                  ],
                )
              ],
            ),
          ));
    }
  }
  </code></pre>
  
  <p>P.S</p>
  
  <p>So, the list I will be getting from api, currently trying to hard code for mock.
  any reference or code will surely help me.</p>
  
  <p>Thanks</p>