我正在尝试将多行支持放在应用程序的评论部分之一中,但它不接受。
我输入的输入是
Hi
Hello
Hello
Run Code Online (Sandbox Code Playgroud)
它显示这个错误
这是我为输入字段编写的代码
ListTile(
leading: CircleAvatar(
backgroundImage: AssetImage(UIData.pkImage),
),
title: Container(
constraints: BoxConstraints(
maxHeight: double.infinity,
minHeight: 20,
),
child: TextField(
keyboardType: TextInputType.multiline,
minLines: 1,//Normal textInputField will be displayed
maxLines: 10,// when user presses enter it will adapt to it
decoration: InputDecoration(
suffix: IconButton(
color: Colors.grey,
icon: Icon(Icons.send),
onPressed: () {
createComment();
},
),
hintText: 'Leave a Comment....',
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(20.0),
borderSide: BorderSide(color: Colors.teal))),
controller: commentController,
),
),
),
Run Code Online (Sandbox Code Playgroud)
问题在于更新 graphQL 查询并使用 String 块对其进行初始化
String createComments(String …Run Code Online (Sandbox Code Playgroud)