I have this list
List? mcq;
Now, when after adding values in it, when I try to print the values on the app screen using the Text widget it gives a null error.
child: TextButton(
child: Text(mcq?[0]),
onPressed: () => {}),
It says type 'Null' is not a subtype of type 'String'.
If I remove the ? it says [] cannot be unconditionally invoked because the receiver can be null.
Then how do I print the values of a list using Text widget?