Bottom Overflow in Expansion Panel. I checked out your code and the reason of the error was Column part within the FlatButton and Dividers.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | new SingleChildScrollView( child: new Card( margin: EdgeInsets.all(0.0), elevation: 2.0, child: new Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ new ListTile( title: new Text( "FB", style: new TextStyle( fontWeight: FontWeight.bold, ), ), subtitle: new Text("Facebook, Inc."), onTap: () { setState(() { if (this._bodyHeight == 200.0) { this._bodyHeight = 0.0; } else { this._bodyHeight = 200.0; } }); }, trailing: new FlatButton( shape: new RoundedRectangleBorder( borderRadius: new BorderRadius.all(new Radius.circular(20.0)), ), onPressed: () { setState(() { mode++; if (mode == 1) { text = "+0.80%"; } else if (mode == 2) { text = "+1.41"; } else { text = "513.3B"; mode = 0; } }); }, child: new Text( "+1.41", style: new TextStyle( color: Colors.white, ), ), color: Colors.green, )), new Container( child: new AnimatedContainer( child: Align( alignment: Alignment.bottomRight, child: new SingleChildScrollView( child: new Column( mainAxisAlignment: MainAxisAlignment.end, children: <Widget>[ new Divider(), new Row( mainAxisAlignment: MainAxisAlignment.end, children: <Widget>[ new FlatButton( onPressed: () { setState(() { if (this._bodyHeight == 200.0) { this._bodyHeight = 0.0; } else { this._bodyHeight = 200.0; } }); }, child: new Text( "CANCEL", style: new TextStyle( color: Colors.grey, ), ), ), new FlatButton( onPressed: null, child: new Text( "SAVE", ), ), ], ), ], ), )), width: 400.0, curve: Curves.easeInOut, duration: const Duration(milliseconds: 500), height: _bodyHeight, ), ), ], ), ), ), |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.