FlutterChatAppTutorial
FlutterChatAppTutorial copied to clipboard
The method 'substring' was called on null. E/flutter ( 2654): Receiver: null E/flutter ( 2654): Tried calling: substring(0, 1)
Having the issue....
child: Text("${userName.substring(0, 1).toUpperCase()}", style: mediumTextStyle(),),
Are you having an issue in this line of code?
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.