Wrap your parent Widget With Stack and Use Align widget to place your textBox always bottom.return Stack(children: <Widget>[ yourMainContent(), Align( alignment: Alignment.bottomCenter, ///Your TextBox Container child: Container( height: 20.0, padding: EdgeInsets.symmetric(vertical: 2.0), alignment: Alignment.bottomCenter, child: Row( mainAxisAlignment: MainAxisAlignment.end, children: [ // First child is enter comment text input TextFormField( controller: commentController, autocorrect: false, decoration: new InputDecoration( labelText: "Some Text", labelStyle: TextStyle(fontSize: 20.0, color: Colors.white), fillColor: Colors.blue, border: OutlineInputBorder( // borderRadius: // BorderRadius.all(Radius.zero(5.0)), borderSide: BorderSide(color: Colors.purpleAccent)), ), ), // Second child is button IconButton( icon: Icon(Icons.send), iconSize: 20.0, onPressed: _onPressedSend(), ) ] ) ), ) ],) 这篇关于创建文本输入栏始终固定在底部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-10 19:42