There is a syntax in the code "?."
The usage is ..
ClassName objectName;
objectName?.function();
Here the function is in the class. Why is the question mark used ?
what type of syntax is this?
It is a null aware operator. See this post: https://flutterigniter.com/checking-null-aware-operators-dart/
Specifically under the heading 'Safe Navigation Operator'