User.fromMap constructor

User.fromMap(
  1. Map<String, dynamic> map
)

Construct from a map.

Implementation

factory User.fromMap(Map<String, dynamic> map) {
  final user = User(
    map['identity'],
    map['attributes'] != null
        ? Attributes.fromMap(map['attributes'].cast<String, dynamic>())
        : Attributes(AttributesType.NULL, null),
    map['friendlyName'],
    map['isNotifiable'] ?? false,
    map['isOnline'] ?? false,
    map['isSubscribed'] ?? false,
  );
  return user;
}