English 中文(简体)
多克比特人能否在卢伯特听到同样的国家档案?
原标题:Can multiple Cubits listen to the same state file in Flutter Cubit?

我正在利用Cubit州管理图书馆,开发一个复杂的彩票应用。 我在申请时有多个分界线,我很想知道,他们是否能够听到同一国家档案。 基本上,我想在多个联邦实体中分享一个国家档案。

如果我的做法失败,我就没有试图具体执行。 然而,我想探讨是否有可能有多个公司加入同一国家档案,因为这将简化我的申请结构,减少法典重复。

问题回答

您是否试图界定国家类别,以便将其转交贵方

void main() {
 YourState instance = YourState();
 runApp(RootApp(state: instance));
}

穿过公立学校:

class RootApp extends StatelessWidget {
  const RootApp({super.key, required this.state});
  final YourState state;
  @override
  Widget build(BuildContext context) {
    return MultiBlocProvider(providers: [
      BlocProvider<ExampleCubit>(
          create: (context) => ExampleCubit(state)),
      BlocProvider<ExampleTwoCubit>(
          create: (context) => ExampleTwoCubit(state)),




相关问题
Best Practices for Storing JSON in URL Hash / Fragment

I m building a single-page AJAX application, and would like to under certain circumstances store state in JSON after the URL hash (#). I ve seen a couple other sites do this, but I m hoping to get ...

WPF - MVVM Screen Management

Imagine you have a complex data object. It was complex enough that to edit the various properties of the object, it would be best for the user to have multiple screens. It s essentially a shopping ...

State Management of javascript conent in MVC

I am using asp.net MVC2. i am facing a problem in state management of javascript contents. i have got a image map in which on click on various part of image i am showing same page (redirect with ...

热门标签