小编Nef*_*ous的帖子

在对话框中使用 BLoC:找不到正确的提供程序

我正在尝试使用块来管理对话框的内容。我对扑动相当陌生。

该页面定义为:

@override
Widget build(BuildContext context) {
  return Scaffold(
    appBar: AppBar(
      title: Text("Business Region Manager"),
    ),
    body: MultiBlocProvider(
      providers: [
        BlocProvider(
          create: (context) =>
              EntityModifyBloc(repository: widget.repository),
        ),
        BlocProvider(
          create: (context) => EntityBloc(
              repository: widget.repository,
              modifyBloc: BlocProvider.of<EntityModifyBloc>(context)),
        ),
        BlocProvider(
          create: (context) => BusinessRegionBloc(repository: widget.repository),
        ),
      ],
      child: Center(
        child: BusinessRegionPage(widget.business),
      ),
    ));
}
Run Code Online (Sandbox Code Playgroud)

在 BusinessRegionPage 内部,我使用了 EntityBloc 和 EntityModifyBloc,并且,我至少认为我的做法是正确的。该页面有一个回调,当触发时会调用一个方法:

void onAddBusinessRegion(){
  showDialog(context: context,
    barrierDismissible: false,
    builder: (BuildContext context){
      return BusinessRegionDialog(
        positiveText: "Ok",
        onPositive: onPositive,
        negativeText: 'Cancel',
        onNegative: onNegative,
        businessId: widget.business.id,
      ); …
Run Code Online (Sandbox Code Playgroud)

dialog flutter bloc

9
推荐指数
2
解决办法
6024
查看次数

Google Cloud Repository推送致命:远程错误:禁止

我刚刚注册尝试使用Google Cloud存储库,但正在尝试入门列表,但在

git remote add google https://source.developers.google.com/p/*name-xxxxxx*/r/default

git push google master
fatal: remote error: Forbidden
Run Code Online (Sandbox Code Playgroud)

我无法判断他们是否认为我没有许可,我是组织项目的所有者

我在Source Tools Console中创建了一个存储库

然后,我尝试按照他们的指示创建本地存储库,但失败了:

gcloud source repos clone source --project=project-xxxxxx
Cloning into 'xxx\\source'...
ERROR: (gcloud.auth.git-helper) Invalid input line format: [path=].
fatal: remote error:


Invalid authentication credentials.

Please generate a new identifier:
  https://source.developers.google.com/auth/start?scopes=https://www.googleapis.com/auth/cloud-platform

ERROR: (gcloud.source.repos.clone) Command '['git', 'clone', 'https://source.developers.google.com/p/project-xxxxxx/r/source', 'xxx\\source', '--config', 'credential.helper=!gcloud.cmd auth git-helper --account=aaa@bbb.com --ignore-unknown $@']' returned non-zero exit status 128
Run Code Online (Sandbox Code Playgroud)

git google-cloud-repository

6
推荐指数
1
解决办法
4872
查看次数

标签 统计

bloc ×1

dialog ×1

flutter ×1

git ×1

google-cloud-repository ×1