singerdmx / flutter-quill

Rich text editor for Flutter
https://pub.dev/packages/flutter_quill
MIT License
2.58k stars 832 forks source link

Not show list-mark on empty editor #2209

Closed hjkim-mango closed 1 month ago

hjkim-mango commented 1 month ago

Is there an existing issue for this?

Flutter Quill version

10.5.13

Steps to reproduce

  1. Set/unset numbered-list on empty editor.
  2. Set/unset bulleted-list on empty editor.
  3. Set numbered-list on empty editor and then input any characters.(delete them)
  4. Input any characters(just return-key on movie) and then set numbered-list.

Expected results

The list mark(number or bullet) is shown whenever setting numbered-list or bulleted-list.

Actual results

Any mark is not shown when setting numbered-list or bulleted-list on cases of empty editor.

Code sample

Code sample ```dart import 'package:flutter/material.dart'; import 'package:flutter_quill/flutter_quill.dart' as quill; class FlutterQuillWidget extends StatefulWidget { const FlutterQuillWidget({super.key}); @override State createState() => _FlutterQuillWidgetState(); } class _FlutterQuillWidgetState extends State { late quill.QuillController _controller; @override void initState() { super.initState(); _controller = quill.QuillController( document: quill.Document(), selection: const TextSelection.collapsed(offset: 0)); } @override void dispose() { _controller.dispose(); super.dispose(); } @override Widget build(BuildContext context) { return Scaffold( resizeToAvoidBottomInset: false, appBar: AppBar( title: const Text('Flutter Quill'), ), body: Column(children: [ quill.QuillToolbar.simple(controller: _controller), quill.QuillEditor( controller: _controller, scrollController: ScrollController(), focusNode: FocusNode(), configurations: const quill.QuillEditorConfigurations( scrollable: true, autoFocus: false, expands: false, placeholder: "Add your data here..."), ), ])); } } ```

Additional Context

Screenshots / Video demonstration https://github.com/user-attachments/assets/7b4b6d62-e9e2-4db8-a48f-de036f424f13
Logs ```console [Paste your logs here] ```
CatHood0 commented 1 month ago

I'll fix it.

hjkim-mango commented 1 month ago

Thanks to fast fix. I've confirmed it on the latest version.