I wanna put a default value on a textfield if _contact is not null. To do this
new TextField( decoration: new InputDecoration(labelText: \"Email\"), ma
Dart comes with ?. and ?? operator for null check.
?.
??
You can do the following :
var result = _contact?.email ?? ""
You can also do
if (t?.creationDate?.millisecond != null) { ... }
Which in JS is equal to :
if (t && t.creationDate && t.creationDate.millisecond) { ... }