【发布时间】:2020-08-02 07:57:42
【问题描述】:
如何更改容器的高度并自动将光标移到下一行填充一行(类似于我们输入消息的 WhatsApp)? 这是我的代码: 定位( 底部: MediaQuery.of(context).size.height*0.03 , 孩子:容器( 宽度:MediaQuery.of(context).size.width,
),
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 8.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
CircleAvatar(
backgroundColor: Colors.white,
child: IconButton(
onPressed: (){
},
icon: Icon(Icons.add),
),
),
EditableText(
expands: true,
maxLines: null,
minLines: null,
style: kTextStyle.copyWith(fontSize: 18.0),
cursorColor: Colors.white,
scrollPhysics: AlwaysScrollableScrollPhysics(),
enableSuggestions: true,
controller: _chattextcontroller,
backgroundCursorColor: Colors.grey,
focusNode: FocusNode(),
),
Expanded(
child: IconButton(
onPressed: (){
},
icon: Icon(Icons.send,
),
),
)
],
),
),
),
)
【问题讨论】:
标签: flutter