fromMap static method

AppwinCommunityUser fromMap(
  1. Map map
)

Rebuilt from a method channel map.

Tolerant: a missing field or an unexpected type falls back to a neutral value rather than failing the call. A native binary newer than the Dart must not break the host app.

Implementation

static AppwinCommunityUser fromMap(Map<dynamic, dynamic> map) {
  return AppwinCommunityUser(
    id: map['id'] as String? ?? '',
    nickname: map['nickname'] as String? ?? '',
    isAnonymous: map['isAnonymous'] as bool? ?? true,
    postCount: map['postCount'] as int? ?? 0,
    commentCount: map['commentCount'] as int? ?? 0,
    avatarUrl: map['avatarUrl'] as String?,
    bio: map['bio'] as String?,
  );
}