Giter VIP home page Giter VIP logo

iconnect's Issues

判断model是否相等

如果model重写了相等逻辑,则:
即使dispatch,若model没有改变,也不需要重新build
这里亦可考虑,监听部分内容,但我们既然用于处理了不同model,对监听者就无法进一步细化。

这样的好处是进一步提高性能

实现基于id的持久化

通过fromjson和tojson处理,注意null问题
暂时考虑使用sqflite?或者drift?或者hype?实际上服务端也是一种方式。

将model改为bloc

不再使用内置的asyncSnapshot,而是使用futureBuilder和streamBuilder
这需要修改model和counter实例
这里是手工bloc的教程,包括窗体验证、登录、比较密码、购物车等场景,比较老的。
https://juejin.cn/post/6844903812063297544
注意我们不要引入实践概念,ui到bloc只是dispatch即可。

https://www.raywenderlich.com/31973428-getting-started-with-the-bloc-pattern
这里也是手工处理,其中提到了每次刷新bloc重新载入一遍的问题,它使用rxdart解决。
它是简单的文章列表。

监听改用bloc的方式

目前是简单的使用provider.of
可考虑使用bloc方式监听?
作为核心功能的listen和dispatch,需要仔细的权衡。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.