I have the below 2 line code . I do say the controllers can be null in initialisation. And if it is null, take empty string. So why would it throw this error ?
final List<String>? controllers;
_nameController.text = widget.controllers[widget.index] ?? '';
Try declaring like this:
final List<String?> controllers;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With