在颤振中用地图中的空替换空值?

Replace null value by empty in map in flutter?

我是 flutter 的初学者,在我的第一个项目中,我尝试检索应用程序个人资料中文本字段的值。这是我的代码行,它从名为 Info_user_list 的 public 列表中获取值,该列表有效但放置了空值,我如何删除空值并将其替换为这些行中的 ' '?还有其他方法吗?

 name_profile_controller.text=(info_user_list.map((e) => e.name).toList().join(""));


email_profile_controller.text=info_user_list.map((e) => e!=null ? e.username : ' ').toList().join("");

此行针对空值放置的空值(作为单词)和非空值放置的正确值,问题仅属于空值。

    name_profile_controller.text = info_user_list.map((e) => e.name ?? "").toList().join(" ");
    email_profile_controller.text = info_user_list.map((e) => e.username ?? "").toList().join(" ");