Flutter Class '_JsonQuerySnapshot' 没有实例 getter 'documents'

时间:2021-07-08 22:59:59

标签: firebase flutter google-cloud-firestore

我最近升级了 pubspec.yaml 中的所有软件包,现在我之前工作的这部分代码返回以下错误

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static unsafe float FastSigmoid(float v)
    {
        const float c1 = 0.03138777F;
        const float c2 = 0.276281267F;
        const float c_log2f = 1.442695022F;
        v *= c_log2f;
        int intPart = (int)v;
        float x = (v - intPart);
        float xx = x * x;
        float v1 = c_log2f + c2 * xx;
        float v2 = x + xx * c1 * x;
        float v3 = (v2 + v1);
        *((int*)&v3) += intPart << 24;
        float v4 = v2 - v1;
        float res = v3 / (v3 - v4); //for tanh change to (v3 + v4)/ (v3 - v4)
        return res;
    }

基本上错误是由一个应该从 firebase 获取项目列表的流构建器引起的

Class '_JsonQuerySnapshot' has no instance getter 'documents'.
Receiver: Instance of '_JsonQuerySnapshot'
Tried calling: documents

知道如何解决这个问题吗?

0 个答案:

没有答案