Update example

pull/13/head
singerdmx 4 years ago
parent c4d6edc60e
commit e34e0c7660
  1. 5
      example/main.dart
  2. 6
      lib/widgets/editor.dart

@ -23,7 +23,10 @@ class _HomePageState extends State<HomePage> {
controller: _controller, uploadFileCallback: _uploadImageCallBack),
Expanded(
child: Container(
child: QuillEditor.basic(_controller),
child: QuillEditor.basic(
controller: _controller,
readOnly: false, // change to true to be view only mode
),
),
)
],

@ -137,15 +137,15 @@ class QuillEditor extends StatefulWidget {
assert(readOnly != null),
assert(embedBuilder != null);
factory QuillEditor.basic(QuillController controller) {
factory QuillEditor.basic(
{@required QuillController controller, bool readOnly}) {
return QuillEditor(
controller: controller,
scrollController: ScrollController(),
scrollable: true,
focusNode: FocusNode(),
autoFocus: true,
readOnly: false,
// change to true to be view only mode
readOnly: readOnly,
enableInteractiveSelection: true,
expands: false,
padding: EdgeInsets.zero);

Loading…
Cancel
Save