Birthdate constructor

const Birthdate({
  1. @JsonKey(name: 'day') required int day,
  2. @JsonKey(name: 'month') required int month,
  3. @JsonKey(name: 'year') int? year,
})

Creates a Birthdate object.

Implementation

const factory Birthdate({
  /// Day of the user's birth; 1-31.
  @JsonKey(name: 'day') required int day,

  /// Month of the user's birth; 1-12.
  @JsonKey(name: 'month') required int month,

  /// Optional. Year of the user's birth.
  @JsonKey(name: 'year') int? year,
}) = _Birthdate;