There are many advantages of the Provider package specially when combined with ChangeNotifiers-
Its very easy to understand and reason about. The documentation is clear and concise and provides guidelines to best practices as well. You can use both reactive and non-reactive ChangeNotifiers in a Widget which means that you can depend on other ChangeNotifiers without being notified about changes. This provides many performance benefits. You can use Provider as a simple dependency injection container as well. The only thing is, you need to have access to the BuildContext attached the widget tree.
GetX is not only a state management library, but instead, it is a microframework combined with route management and dependency injection. It aims to deliver top-of-the-line development experience in an extra lightweight but powerful solution for Flutter. GetX has three basic principles on which it is built:
Performance: focused on minimum consumption of memory and resources
Productivity: intuitive and efficient tool combined with simplicity and straightforward syntax that ultimately saves development time
Organization: decoupling business logic from view and presentation logic cannot get better than this. You do not need context to navigate between routes, nor do you need stateful widgets
发布评论
评论(1)
提供商
包装有很多优势,特别是与changeNotifiers结合使用 -非常容易理解和理由。该文档清晰明确,也为最佳实践提供指南。
您可以在小部件中同时使用反应性和非反应性变频器,这意味着您可以依靠其他changeNotifier,而无需通知更改。这提供了许多性能优势。
您也可以将提供商用作简单的依赖注入容器。唯一的事情是,您需要可以访问附加的小部件树的buildContext。
getx
不仅是状态管理库,而且是一个小框架,结合了路由管理和依赖项注入。它旨在在额外的轻量级但有力的扑朔迷离解决方案中提供顶级的开发体验。 GETX具有构建的三个基本原则:性能:专注于最低记忆和资源
生产率的消耗:直观有效的工具与简单和直接的语法结合在一起,最终节省了开发时间
组织:将业务逻辑从视图和演示逻辑中脱成逻辑无法获得。比这更好。您不需要上下文即可在路线之间导航,也不需要状态的小部件
There are many advantages of the
Provider
package specially when combined with ChangeNotifiers-Its very easy to understand and reason about. The documentation is clear and concise and provides guidelines to best practices as well.
You can use both reactive and non-reactive ChangeNotifiers in a Widget which means that you can depend on other ChangeNotifiers without being notified about changes. This provides many performance benefits.
You can use Provider as a simple dependency injection container as well. The only thing is, you need to have access to the BuildContext attached the widget tree.
GetX
is not only a state management library, but instead, it is a microframework combined with route management and dependency injection. It aims to deliver top-of-the-line development experience in an extra lightweight but powerful solution for Flutter. GetX has three basic principles on which it is built:Performance: focused on minimum consumption of memory and resources
Productivity: intuitive and efficient tool combined with simplicity and straightforward syntax that ultimately saves development time
Organization: decoupling business logic from view and presentation logic cannot get better than this. You do not need context to navigate between routes, nor do you need stateful widgets