hhstore / blog

My Tech Blog: about Mojo / Rust / Golang / Python / Kotlin / Flutter / VueJS / Blockchain etc.
https://github.com/hhstore/blog/issues
278 stars 22 forks source link

Flutter: state management #227

Open hhstore opened 3 years ago

hhstore commented 3 years ago

related:

hhstore commented 3 years ago

flutter 状态管理:

目前个人第一推荐: GetX

强烈不推荐 provider ! 请使用 GetX ! 强烈不推荐 provider ! 请使用 GetX ! 强烈不推荐 provider ! 请使用 GetX !

状态管理方案列表:

Provider: (过气方案/虽然官方推荐)

一些讨论:

diff:

ref:

原理:

state-management-explainer-5495afe6c3d6162f145107fe45794583bc4f2b55be377c76a92ab210be74c033

image

image

示例代码:

hhstore commented 3 years ago

Provider 方案:

ref:

优缺点:

lib:

示例:

官方示例:

过去式: ScopedModel

hhstore commented 3 years ago

其他过气方案:

Provider 高阶用法:

MobX 方案:

示例:

Fish Redux:

ref:

Redux:

BLoC:

RxDart:

hhstore commented 3 years ago

1

hhstore commented 3 years ago

xxxxxx:

xxxxxxxxxxxxxx xxxxxxxxxxxxxx xxxx
xxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxx
xxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxx
xxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxx
xxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxx
xxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxx
xxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxx
xxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxx
cvilia commented 3 years ago

Getx也介绍一下呗,这个适不适合用啊,真怕跟fish-redux一样到最后半年不更新

hhstore commented 3 years ago

Getx也介绍一下呗,这个适不适合用啊,真怕跟fish-redux一样到最后半年不更新

@Cvilia

update: 关于 GetX 的介绍.