Discussion: Delta model #569
Replies: 1 comment 1 reply
-
have the same exception with default realisation |
Beta Was this translation helpful? Give feedback.
-
have the same exception with default realisation |
Beta Was this translation helpful? Give feedback.
-
I'm trying to create some custom embeds and running into issues...
In the current flutter-quill examples, all embeds get resolved down to a string, like a URL... but my embeds have multiple properties for each instance. There are a few places in the framework where there's a hard-cast on the embed data to be a String. This one is particularly odd, since the method declares
Map<String, dynamic>
, but then there's a hard cast toMap<String, String>
in the method body.Secondly, I started bumping up against the Compose Failed error from
document.dart:170
This is happening because the _root.toDelta() appears to be converting Embeddable instances into a
Map<String, dynamic>
where as_delta
containsEmbeddable
instances. But I can't pass aMap<String, dynamic>
as thedata
when callingdocument.replaceText
(it requires either aString
orMap<String, dynamic>
).Overall (and this may be a personal preference)... I would like to see more type-hints when working with quill model in real-time, with a separate serialization/deserialization routine that only happens on the boundaries (when data is imported or exported).
But, I may be missing something. Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions