Dart - null aware operator, why ! is needed?

后端 未结 0 2002
不思量自难忘°
不思量自难忘° 2021-02-06 19:27

We have:

final Widget? body;

And later in code:

final content = Column(
  children: [
    ...items,
    if (body != null) body!
           


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题