FriendInfoEntity.fromJson constructor
FriendInfoEntity.fromJson(
- dynamic data
Implementation
FriendInfoEntity.fromJson(data) {
Map<String, dynamic> json =
data is Map ? data.cast<String, dynamic>() : jsonDecode(data);
if (json['userID'] != null) userID = json['userID'];
if (json['friendRemark'] != null) friendRemark = json['friendRemark'];
if (json['friendGroups'] != null)
friendGroups = json['friendGroups']?.cast<String>();
if (json['friendCustomInfo'] != null)
friendCustomInfo = json['friendCustomInfo']?.cast<String, String>();
if (json['userProfile'] != null)
userProfile = UserEntity.fromJson(json['userProfile']);
}