Skip to content

查日志发现异常: type 'Null' is not a subtype of type 'RenderBox' in type cast #253

Closed
@lsslu

Description

@lsslu

版本信息

  • Flutter版本:v3.24.4
  • flutter_smart_dialog版本:v4.9.6

描述bug/需求

type 'Null' is not a subtype of type 'RenderBox' in type cast

Image

Image

嗯……看起来是因为上图中138行 widget.targetContext!.findRenderObject() 为null 引起的,没有稳定复现,这里如果把判断改为:
if (widget.targetContext != null && widget.targetContext!.findRenderObject() != null) { .... }
会有什么问题吗?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions