gpt4 book ai didi

flutter - 有什么方法可以在flf中的zefyrEditor中使用验证属性和onChanged属性?

转载 作者:行者123 更新时间:2023-12-03 04:35:12 33 4
gpt4 key购买 nike

我试图实现此文本编辑工具栏的功能,并遇到了zefyr。我用了它,而这正是我所需要的。但是,我有在我的自定义文本字段中使用的验证和onChanged属性。因此,任何人都可以建议我在flf中使用zefyrEditor或zefyrField内部的验证属性和onChanged属性。
谢谢...

最佳答案

当然,您可以将下一个属性添加到ZefyrController中,以将属性onChange添加:

@override
void initState() {
super.initState();
final document = _loadDocument();
_controller = ZefyrController(document);

//With this you can manage the text of your ZefyrEditor
_controller.document.changes.listen((event) {
print(_controller.document.toString());
});
_focusNode = FocusNode();
}
在这种情况下,我只打印文档,每次键入内容时都会触发此操作。

关于flutter - 有什么方法可以在flf中的zefyrEditor中使用验证属性和onChanged属性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64259229/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com