I am new to dart and flutter, when i am using Stream, i found this function
StreamSubscription<T> listen(void onData(T event)?,
{Function? onError, void onDone()?, bool? cancelOnError});
Can someone tell me what does the '?' mean here?
I am new to dart and flutter, when i am using Stream, i found this function
StreamSubscription<T> listen(void onData(T event)?,
{Function? onError, void onDone()?, bool? cancelOnError});
Can someone tell me what does the '?' mean here?
As of Dart 2.12, the language supports null safety. Here, ? explicitly states that a variable/parameter may be null.