Code Monkey home page Code Monkey logo

Comments (5)

JiangJuHong avatar JiangJuHong commented on July 20, 2024

不是很明白您的意思,能否提供具体描述信息,并提供截图、Debug日志等内容

from fluttertencentimplugin.

wilson0506 avatar wilson0506 commented on July 20, 2024

Simulator Screen Shot - iPhone 11 Pro Max - 2020-06-20 at 21 03 39
Simulator Screen Shot - iPhone 11 Pro Max - 2020-06-20 at 21 03 47

from fluttertencentimplugin.

JiangJuHong avatar JiangJuHong commented on July 20, 2024

您好,第一幅图可能是Flutter 内部代码报错(布局、错误的方法调用 等),可以通过查看控制台日志获得更加详细的信息

from fluttertencentimplugin.

shenjingfs avatar shenjingfs commented on July 20, 2024

This error may happened after sending the image in the example

Error log:

The following NoSuchMethodError was thrown building:
The getter 'url' was called on null.
Receiver: null
Tried calling: url

im.dart (line 289):
return MessageImage(url: value.imageData[ImageType.Original].url);

This cause by value.node.imageData[ImageType.Original] passed by MessageEntity is null when UploadProgress update

To solve it:
change
return MessageImage(url: value.imageData[ImageType.Original].url);
to
return MessageImage(url: value.imageData[ImageType.Original]?.url, path: value.path);

The build method in MessageImage also needs to be modified, because path or url may be '' (empty string):

@override
Widget build(BuildContext context) {
  return Container(
    height: 100,
    width: 100,
    child: path != null && path.isNotEmpty
        ? Image.file(
      File(path),
      fit: BoxFit.cover,
    )
        : url != null && url.isNotEmpty
        ? Image.network(
      url,
      fit: BoxFit.cover,
    )
        : Container(),
  );
}

from fluttertencentimplugin.

JiangJuHong avatar JiangJuHong commented on July 20, 2024

感谢您的帮助,我会在下个版本修复它

from fluttertencentimplugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.