'Flutter Quill Delta format display into widget?

I am currently using Quill as my WYSIWYG Editor which uses delta format to save data. I have successfully extracted the delta format to JSON but how should I display it on the screen as a readable format?



Solution 1:[1]

You could use Quill to display the JSON to.


class ExampleView extends StatelessWidget {
  const ExampleView({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    QuillController _controller = QuillController(
        document: Document.fromJson(YOUR_JSON),
        selection: const TextSelection.collapsed(offset: 0));
    return QuillEditor.basic(
      controller: _controller,
      readOnly: true, // true for view only mode
    );
  }
}

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 Erlend