FlutterChatAppTutorial icon indicating copy to clipboard operation
FlutterChatAppTutorial copied to clipboard

The method 'substring' was called on null. E/flutter ( 2654): Receiver: null E/flutter ( 2654): Tried calling: substring(0, 1)

Open abinvs-2019 opened this issue 4 years ago • 2 comments

Having the issue....

abinvs-2019 avatar Apr 29 '21 10:04 abinvs-2019

child: Text("${userName.substring(0, 1).toUpperCase()}", style: mediumTextStyle(),),

Are you having an issue in this line of code?

Sanchaksh avatar May 15 '21 08:05 Sanchaksh

If yes that is because your chatRoom function is not getting any values and we can not pass null in flutter Widgets. Please share your code for further correction.

Sanchaksh avatar May 15 '21 08:05 Sanchaksh