mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-11-13 17:07:40 +00:00
[flutter]: quill editor events flow
This commit is contained in:
parent
5c0abd915c
commit
8e5cbfb84e
@ -31,3 +31,45 @@
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
// ┌────────────────────────┐ ┌──────────────────┐
|
||||||
|
// │ RawGestureDetector │─▶│ RenderEditor │──┐
|
||||||
|
// └────────────────────────┘ └──────────────────┘ │
|
||||||
|
// │
|
||||||
|
// 1. pass the gesture event │
|
||||||
|
// │
|
||||||
|
// │
|
||||||
|
// ┌───────────────────────────────────┐ │ ┌────────────────┐ ┌──────────────────┐ ┌──────────────────────────────┐
|
||||||
|
// │RawEditorStateTextInputClientMixin │──┼──▶│QuillController │◀──listen────│ RenderState │──▶│ _didChangeTextEditingValue │
|
||||||
|
// └───────────────────────────────────┘ │ └────────────────┘ └──────────────────┘ └──────────────────────────────┘
|
||||||
|
// │ │ ▲ │
|
||||||
|
// 1. pass the text input event │ │ │ ▼
|
||||||
|
// │ └─────2. notify change──────────┘ ┌─────────────────────────────────┐
|
||||||
|
// │ │ _onChangeTextEditingValue │
|
||||||
|
// ┌─────────────────────────────┐ │ └─────────────────────────────────┘
|
||||||
|
// │ RawEditorStateKeyboardMixin │───┘ │
|
||||||
|
// └─────────────────────────────┘ ▼
|
||||||
|
// ┌──────────────────────┐ Update the ScrollController's pos after
|
||||||
|
// 1. pass the keyboard cur/ delete/ shortcut event │ _showCaretOnScreen │ post frame
|
||||||
|
// └──────────────────────┘
|
||||||
|
// │
|
||||||
|
// ▼
|
||||||
|
// ┌──────────────────────┐
|
||||||
|
// │ Config cursor timer │
|
||||||
|
// └──────────────────────┘
|
||||||
|
// │
|
||||||
|
// ▼
|
||||||
|
// ┌───────────────────────┐ ┌───────────────────────────────────┐
|
||||||
|
// │ addPostFrameCallback │─▶│_updateOrDisposeSelectionOverlayIfN│
|
||||||
|
// └───────────────────────┘ └───────────────────────────────────┘
|
||||||
|
// │
|
||||||
|
// │
|
||||||
|
// ▼
|
||||||
|
// ┌────────────┐
|
||||||
|
// │ setState │ make the RenderState to rebuild
|
||||||
|
// └────────────┘
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
Loading…
x
Reference in New Issue
Block a user