【问题标题】:Failure loading image / flutter加载图像/颤振失败
【发布时间】:2020-09-13 21:58:56
【问题描述】:

在我的应用程序中加载照片后,我收到以下错误消息,我不明白这是什么意思。

W/IInputConnectionWrapper( 6937): finishComposingText on inactive InputConnection
I/ExifInterface_JNI( 6937): Raw image not detected
I/ExifInterface_JNI( 6937): Raw image not detected
D/EGL_emulation( 6937): eglCreateContext: 0xaca058a0: maj 3 min 0 rcv 3
D/EGL_emulation( 6937): eglMakeCurrent: 0xaca058a0: ver 3 0 (tinfo 0xaca03410)
E/eglCodecCommon( 6937): glUtilsParamSize: unknow param 0x00008cdf
E/eglCodecCommon( 6937): glUtilsParamSize: unknow param 0x00008824
E/eglCodecCommon( 6937): glUtilsParamSize: unknow param 0x000087fe
D/EGL_emulation( 6937): eglMakeCurrent: 0xa837d360: ver 3 0 (tinfo 0xa8351530)
D/EGL_emulation( 6937): eglMakeCurrent: 0xaca058a0: ver 3 0 (tinfo 0xaca03410)

我没有看到与保存图像相关的不同输入失败之间的联系。 我的应用程序通过显示图像来工作。

           SizedBox(height: 16),
            _imageFile == null && _imageUrl == null
                ? ButtonTheme(
                    child: RaisedButton(
                      onPressed: () {
                        _getLocalImage();
                        loading = true;
                        },
                        child: Text(
                        'Add Image',
                        style: TextStyle(color: Colors.white),
                      ),
                    ),
                  )

  _getLocalImage() async {
    File imageFile =
        // ignore: deprecated_member_use
        await ImagePicker.pickImage(source: ImageSource.gallery, imageQuality: 50, maxWidth: 400);

    if (imageFile != null) {
      setState(() {
        _imageFile = imageFile;
      });
    }
  }

【问题讨论】:

  • 需要更多源来使用 '_imageFile' 显示图像。

标签: image flutter


【解决方案1】:

问题来自“loading = true;”我正在替换为 Loading Builder 以指示照片的加载视图。

【讨论】:

    猜你喜欢
    • 2021-02-19
    • 2021-03-06
    • 2018-03-05
    • 1970-01-01
    • 1970-01-01
    • 2021-06-06
    • 2018-08-09
    • 1970-01-01
    相关资源
    最近更新 更多