User constructor

const User({
  1. required UserID id,
  2. String? name,
  3. String? imageSource,
  4. @EpochDateTimeConverter() DateTime? createdAt,
  5. Map<String, dynamic>? metadata,
})

Creates a User instance.

Implementation

const factory User({
  /// Unique identifier for the user.
  required UserID id,

  /// The user's display name.
  String? name,

  /// URL or source string for the user's avatar image.
  String? imageSource,

  /// Timestamp when the user was created.
  @EpochDateTimeConverter() DateTime? createdAt,

  /// Additional custom metadata associated with the user.
  Map<String, dynamic>? metadata,
}) = _User;