简体   繁体   English

在 Flutter Native Android 代码中实现 MVVM 架构

[英]Implement MVVM architecture in Flutter Native Android code

I am trying to create MVVM architecture in flutter native platform code.我正在尝试在颤振本机平台代码中创建 MVVM 架构。 so that i can use viewmodel and livedata in either FLutter android plugins or android platform side.这样我就可以在 FLutter android 插件或 android 平台端使用 viewmodel 和 livedata。

Can anyone give a correct solution for this implementation?任何人都可以为此实现提供正确的解决方案吗?

Stacked package in flutter is nearby the MVVM architecture, But in MVVM, ViewModel can be shared with more than one View but in Stacked state management, we View and ViewModel intact to each other Flutter 中的 Stacked 包靠近 MVVM 架构,但是在 MVVM 中,ViewModel 可以与多个 View 共享,但是在 Stacked 状态管理中,我们 View 和 ViewModel 彼此完好无损

Here is the Stacked package.这是 Stacked 包。 https://pub.dev/packages/stacked https://pub.dev/packages/stacked

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM