I believe the error might be coming from this line:
debugType: kDebugMode ? '${runtimeType.toString()}' : '',
.
You could try simplifying it to:
debugType: kDebugMode ? runtimeType.toString() : '',
or
debugType: kDebugMode ? '${runtimeType.toString() ?? ''}' : '',
.
Let me know if this helps! 😊