'Flutter Quill Editor Follow Typing Text
We have created a notes app, and have implemented Flutter Quill as our Text Editor.
The issue we are facing is that as the user types, the screen doesn't follow the new lines. The user has to manually scroll down to see their text.
Any help would be great!
Flutter Quill - https://pub.dev/packages/flutter_quill
SliverToBoxAdapter(
child: Padding(
padding: EdgeInsets.fromLTRB(
0,
0.0,
0,
0,
),
child: Container(
constraints:
BoxConstraints(minHeight: 400.0),
height: 10000,
child: CustomShowcaseWidget(
globalKey: keyFour,
description:
"Type in text here!",
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: 16),
child: Quill.QuillEditor.basic(
controller:
this.contentController!,
readOnly:
false, // true for view only mode
),
)),
),
),
),
Solution 1:[1]
There is "padding" and "scrollBottomInset" property in QuillEditor.
QuillEditor(
controller: _controller!,
scrollController: ScrollController(),
scrollable: true,
focusNode: _focusNode,
autoFocus: false,
readOnly: false,
placeholder: 'Add content',
expands: false,
padding: EdgeInsets.only(
bottom: 10),
scrollBottomInset: 150,
customStyles: DefaultStyles(
link: TextStyle().copyWith(color: Colors.blue),
paragraph: DefaultTextBlockStyle(
const TextStyle().copyWith(
fontSize: 17,
color: Color(0xFF292929),
height: 1.3,
),
const Tuple2(0, 0),
const Tuple2(0, 0),
null)))
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Ketan Vaddoriya |