factory Credentials.fromMap(Map<String, dynamic> map) { return Credentials( map['username'], map['password'], map['realm'], map['ha1']); }