I want to know the meaning of ?. operator in dart , if any one can explain it ? , thank you .
for example :
final length=names?.length;
>Solution :
That means that you are accessing a property that may be null. When you declare a variable but never set it, you do this:
String? testString; // the ? operator means that the variable can be null
This was added to prevent your program from crashing by null pointer exceptions.
I suggest you read Michael Horns comment which includes the documentation for null safety in Dart.