小编Alf*_*ulo的帖子

如何修复错误:错误签名 0x00000000 索引文件损坏

我无法更新我的存储库,因为当我提交项目时出现以下错误。

我被告知删除index file并运行这些命令del .git\index, 但是我的项目文件中git reset没有(请参阅下面的项目文件)index file

知道如何修复此错误吗?

错误

9:44 AM Commit failed with error
                0 files committed, 13 files failed to commit: Jobly Version 1.0
                Jobly Version 1.1
                Jobly Version 2.0
                Jobly Version 2.1
                bad signature 0x00000000
                index file corrupt
Run Code Online (Sandbox Code Playgroud)

我的项目文件夹 我看不到index.file

在此输入图像描述

在此输入图像描述

git

11
推荐指数
2
解决办法
1万
查看次数

错误:入口点不包含主函数 Flutter

我收到错误 Error: Entrypoint does not contains a main function Flutter, 我尝试重新启动 android studio 但没有成功

flutter

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

在 Flutter 中使用 streamBuilder 时条件不起作用

我正在尝试实现一个显示来自 Firebase 的数据的屏幕,但我想streambuilder检查数据库是否为空,如果为空,我希望它显示一个文本,上面写着“无数据”,但如果不是,我希望它显示来自 firebase 的数据。

这是我拥有的代码,但它没有按预期工作,它只是在没有数据时向我显示一个空白屏幕(当我在数据库中有数据时它工作正常,我只是不希望用户看到一个空白没有数据时的屏幕)。你能告诉我这段代码有什么问题吗?实现这一点的最佳方法是什么?

@override
  Widget build(BuildContext context) {
    double height = responsive.height(context);
    double width = responsive.width(context);
    var stream = Firestore.instance
        .collection('favoritePost')
        .document(widget.currentUserId)
        .collection('favoritePost')
        .orderBy('timestamp', descending: true)
        .snapshots();
    return Scaffold(
      backgroundColor: kBackgroundColorForAllScreens,
      appBar: PreferredSize(
        preferredSize: Size.fromHeight(responsive.height(context) / 20),
        child: SimpleAppBar(
          label: 'Tus Favoritos',
          witdh: responsive.width(context) / 4.7,
          onPressed: () {
            Navigator.pop(context);
          },
        ),
      ),
      body: Column(
        children: <Widget>[
          Expanded(
            child: Container(
              child: StreamBuilder(
                stream: stream,
                builder: (context, snapshotPost) {
                  if (snapshotPost.hasData) {
                    return ListView.builder(
                      itemExtent: height …
Run Code Online (Sandbox Code Playgroud)

dart firebase flutter stream-builder

3
推荐指数
1
解决办法
1452
查看次数

标签 统计

flutter ×2

dart ×1

firebase ×1

git ×1

stream-builder ×1