Skip to content

Add align support on QuillDeltaEncoder convert, and Fix for Flutter 3.44#1205

Open
rodolfogoulart wants to merge 7 commits into
AppFlowy-IO:mainfrom
rodolfogoulart:main
Open

Add align support on QuillDeltaEncoder convert, and Fix for Flutter 3.44#1205
rodolfogoulart wants to merge 7 commits into
AppFlowy-IO:mainfrom
rodolfogoulart:main

Conversation

@rodolfogoulart

@rodolfogoulart rodolfogoulart commented May 20, 2026

Copy link
Copy Markdown
  • Add align support when convert from quill to appflowy document.

    • Add handling for 'align' attributes and ensure alignment is applied to nodes.
  • Improve multi-line op.text processing by committing intermediate paragraphs, preserving styles and alignment, and starting a new open node for the last segment.

  • Fix for Flutter 3.44 [Bug] Flutter 3.44 not supported #1204

Add handling for 'align' attributes and ensure alignment is applied to nodes. Improve multi-line op.text processing by committing intermediate paragraphs, preserving styles and alignment, and starting a new open node for the last segment. Introduce helpers (_isListItem, _tryInsertNestedListNode, _findNearestParentNode) to robustly insert nested list nodes using the nearest parent and clear nestedLists when leaving list items. Also includes small refactors and formatting cleanups for list/heading/quote node creation.
Implement the new onFocusReceived callback introduced in Flutter 3.44 by returning true in DeltaTextInputService. This satisfies the updated API and prevents missing override/compatibility issues when compiling against the newer Flutter release.

Fix for AppFlowy-IO#1204
/AppData/Local/Pub/Cache/git/appflowy-editor-6fbe7ba442ad942d6f18884f0a0c8278c524fa05/lib/src/editor/editor_component/service/ime/delta_input_service.dart(7,7): error G76B49859: The non-abstract class 'DeltaTextInputService' is missing implementations for these members
Change DeltaTextInputService.onFocusReceived to return the service's 'attached' state instead of always true. Flutter 3.44 added this callback; using 'attached' prevents reporting focus when the input service isn't attached and avoids incorrect focus behavior.
@CLAassistant

CLAassistant commented May 20, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Implement the new onFocusReceived callback introduced in Flutter 3.44 by returning true in DeltaTextInputService. This satisfies the updated API and prevents missing override/compatibility issues when compiling against the newer Flutter release.

Fix for AppFlowy-IO#1204
/AppData/Local/Pub/Cache/git/appflowy-editor-6fbe7ba442ad942d6f18884f0a0c8278c524fa05/lib/src/editor/editor_component/service/ime/delta_input_service.dart(7,7): error G76B49859: The non-abstract class 'DeltaTextInputService' is missing implementations for these members
@rodolfogoulart rodolfogoulart changed the title Add align support on QuillDeltaEncoder convert Add align support on QuillDeltaEncoder convert, and Fix for Flutter 3.44 May 20, 2026
@salihagic

Copy link
Copy Markdown

Thanks for tackling this @rodolfogoulart. One catch: NonDeltaTextInputService (lib/src/editor/editor_component/service/ime/non_delta_input_service.dart:12) also mixes in TextInputClient and so needs the same onFocusReceived override. The compiler stops at the first missing implementation, which is why the second class isn't visible until the first is patched.

Opened #1208 with the fix applied to both classes, scoped to just the Flutter 3.44 compat change (no QuillDeltaEncoder bundling), in case it's easier for maintainers to take that path. Happy to close it if you'd prefer to extend this PR.

@rodolfogoulart

Copy link
Copy Markdown
Author

Thank man.
So, for the other fix, I wait for the merge and create another pull request?

@salihagic

Copy link
Copy Markdown

No need for a second PR — #1208 already includes the NonDeltaTextInputService override alongside the DeltaTextInputService one, so the whole Flutter 3.44 compat side is covered there.

Two ways the maintainers could handle it:

  1. Merge fix: implement TextInputClient.onFocusReceived for Flutter 3.44 compat #1208 for the Flutter 3.44 fix, and you keep this PR scoped to the QuillDeltaEncoder alignment work (which is unrelated and probably easier to review separately).
  2. Or, if you'd rather keep everything in one PR, add the same onFocusReceived override to NonDeltaTextInputService here and I'll close fix: implement TextInputClient.onFocusReceived for Flutter 3.44 compat #1208.

Either works for me — happy to follow whichever path the maintainers prefer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants