Check out example codes for "dart ?? operator". It will help you in understanding the concepts better.

Code Example 1

int val1;
final int val2 = 20;

console.log(val1 ?? val2); //result => 20 because val1 is null

----------------------------------

final int val1 = 30;
final int val2 = 20;

console.log(val1 ?? val2); //result => 30 because val1 is not null

Code Example 2

expr1 ?? expr2

Learn ReactJs, React Native from akashmittal.com