【发布时间】:2021-09-21 20:37:20
【问题描述】:
我想将我的QuillEditor 放在我的表单中,而不是在我的应用程序的专用页面上。
我尝试在SingleChildScrollView 中使用Column 和ListView 小部件,但结果是一样的:
- 由于没有文本,编辑器很小,我希望它被“扩展”(我知道它不能在卷轴内,但你明白了);
- 文本溢出不会使页面相应滚动,因此用户看不到他们正在输入的内容。
这里有一些代码:
return Scaffold(
appBar: AppBar(
title: Text("Reply form"),
actions: [
IconButton(
onPressed: () {},
icon: Icon(Icons.send),
tooltip: "Send",
)
],
),
body: SafeArea(
child: Form(
child: ListView(
children: [
Text("From: test@my.org"),
SizedBox(height: 8),
chipInputField(
label: "To",
onChanged: (List<Object?> o) {},
initialValue: ["first@email.it"],
),
chipInputField(
label: "Cc",
onChanged: (List<Object?> o) {},
initialValue: ["second@email.it"],
),
chipInputField(
label: "Bcc",
onChanged: (List<Object?> o) {},
initialValue: ["third@email.it"],
),
QuillEditor(
controller: quillController,
scrollable: true,
scrollController: ScrollController(),
focusNode: FocusNode(),
padding: EdgeInsets.all(5),
autoFocus: true,
readOnly: false,
expands: false,
placeholder: "compose_email",
),
QuillToolbar.basic(
controller: quillController,
showUnderLineButton: false,
showStrikeThrough: false,
showColorButton: false,
showBackgroundColorButton: false,
showListCheck: false,
showIndent: false,
),
],
),
),
),
);
第一个问题:撰写邮件部分没有在应用页面内展开
第二个问题:只要我写一些文字,小部件就不会滚动
编辑:我使用的是 Flutter 2.2.3 和 flutter_quill: 1.3.3
【问题讨论】:
-
请指定您尝试实现此目的的 Flutter 和 Quill 版本?
-
嗨@RaguSwaminathan 我已经更新了问题
-
@niccord 你还在寻找答案吗?
-
是的,我是。任何帮助将不胜感激。
标签: flutter flutter-layout flutter-dependencies