简体   繁体   English

我应该在 flutter 中使用 bloc 进行 firebase 身份验证吗?

[英]Should I use bloc for the firebase authentication in flutter?

I am working on a flutter mobile app and I am wondering if I will need the bloc state management for the authentication.我正在开发一个 flutter 移动应用程序,我想知道我是否需要 bloc state 管理来进行身份验证。 So this is the scenario of the app.这就是应用程序的场景。 The initial screen is login and registration form when the user login the home page will appear when the user logout, the login and registration form will appear and so on.初始屏幕是用户登录时的登录和注册表单,当用户注销时会出现主页,然后会出现登录和注册表单等。

I need to know if the bloc is needed.我需要知道是否需要该集团。

You don't need to use BLoC.您不需要使用 BLoC。

BLoC is one of many possibilities for state management in Flutter. BLoC 是 Flutter 中 state 管理的众多可能性之一。 The decision, which state management to choose, is independent of you use Firebase Authentication or not.选择哪个 state 管理的决定与您是否使用 Firebase 身份验证无关。

There is also还有

and many others.和许多其他人。

Firebase authentication works with all of them. Firebase 身份验证适用于所有这些。 Also, you don't need any additional library to use Firebase Authentication.此外,您不需要任何额外的库来使用 Firebase 身份验证。

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

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