User constructor Null safety

User(
  1. {required String userId,
  2. required String nickname,
  3. String? profileUrl,
  4. UserConnectionStatus connectionStatus = UserConnectionStatus.notAvailable,
  5. int? lastSeenAt,
  6. bool? isActive = true,
  7. List<String>? preferredLanguages,
  8. String? friendDiscoveryKey,
  9. String? friendName,
  10. List<String>? discoveryKeys,
  11. Map<String, String> metaData = const {},
  12. bool requireAuth = false,
  13. String? sessionToken}
)

Implementation

User({
  required this.userId,
  required this.nickname,
  this.profileUrl,
  this.connectionStatus = UserConnectionStatus.notAvailable,
  this.lastSeenAt,
  this.isActive = true,
  this.preferredLanguages,
  this.friendDiscoveryKey,
  this.friendName,
  this.discoveryKeys,
  this.metaData = const {},
  this.requireAuth = false,
  this.sessionToken,
});