Null-aware operator with Lists

There is no null-aware operator for the indexing operator ([])

You can use elementAt() instead:

list?.elementAt(index)?.elementAt(index)?.elementAt(index) ?? 0

UPDATE – 2021/05/24

If you are using null-safety, you can now use this:

list?[index]?[index]?[index] ?? 0

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)