add animation

This commit is contained in:
Salvatore Giordano
2020-11-09 15:15:15 +01:00
parent 815b0120bf
commit ae0316fe4f
+4 -3
View File
@@ -207,7 +207,7 @@ class MessageInputState extends State<MessageInput> {
padding: const EdgeInsets.symmetric(horizontal: 8.0), padding: const EdgeInsets.symmetric(horizontal: 8.0),
child: _buildDmCheckbox(), child: _buildDmCheckbox(),
), ),
if (_openFilePickerSection) _buildFilePickerSection(), _buildFilePickerSection(),
], ],
), ),
), ),
@@ -612,8 +612,9 @@ class MessageInputState extends State<MessageInput> {
} }
Widget _buildFilePickerSection() { Widget _buildFilePickerSection() {
return Container( return AnimatedContainer(
height: _filePickerSize, duration: Duration(milliseconds: 300),
height: _openFilePickerSection ? _filePickerSize : 0,
child: Material( child: Material(
color: Color(0xFFF2F2F2), color: Color(0xFFF2F2F2),
child: Column( child: Column(