使用RiverpodGenerator
或Freezed
有什么意义?据我所知,我们可以使用CRUD operations
来使用模型实现数据.但是,为什么、何时以及如何使用RiverpodGenerator
呢?
使用RiverpodGenerator
或Freezed
有什么意义?据我所知,我们可以使用CRUD operations
来使用模型实现数据.但是,为什么、何时以及如何使用RiverpodGenerator
呢?
RiverpodGenerator和冻结的用途完全不同.
If we are talking about RiverpodGenerator,它解决了一些问题(与classic 定义相比):
If we're talking about Freezed,美元,用于:
hashcode/==
这就是说,它现在非常灵活.修改器@Freezed(...)
允许您几乎完全重新定义生成的结果.
All of this may soon fade into oblivion.到目前为止,DART的开发人员正在积极地研究它.