I'm trying to do something like this (code below) but the IDE flags it. Is there any possible way to do this? Thanks.
final Map userInfo;
UserProfile({this.userInfo = {} });
I'm trying to do something like this (code below) but the IDE flags it. Is there any possible way to do this? Thanks.
final Map userInfo;
UserProfile({this.userInfo = {} });
Should be:
class UserProfile {
final Map userInfo;
const UserProfile({this.userInfo = const {}});
}