We have:
final Widget? body;
And later in code:
final content = Column(
children: [
...items,
if (body != null) body!
],
);
Why I have to add !
sign, after body?
Without !
I receive:
The element type 'Widget?' can't be assigned to the list type 'Widget'.
In pubspec.yaml
environment:
sdk: '>=2.12.0-0 <3.0.0'