Reputation: 71
I am wondering what this line does? Does it means, unless widget.note
is not null
,
isUpdating
will not be assigned? Or whatever please correct me, I am really confused about what is this line doing.
final isUpdating = widget.note != null;
Upvotes: 0
Views: 63
Reputation: 7601
you can imagine
final isUpdating = widget.note != null;
is in short of
if(widget.note != null)
isUpdating = true;
else
isUpdating = false;
Upvotes: 5
Reputation: 118
isUpdating
would be true when widget.note
is not null.
It would be false if widget.note
is null.
Upvotes: 2