Contact constructor

const Contact({
  1. @JsonKey(name: 'phone_number') required String phoneNumber,
  2. @JsonKey(name: 'first_name') required String firstName,
  3. @JsonKey(name: 'last_name') String? lastName,
  4. @JsonKey(name: 'user_id') int? userId,
  5. @JsonKey(name: 'vcard') String? vcard,
})

Constructs a Contact object.

Implementation

const factory Contact({
  /// Contact's phone number
  @JsonKey(name: 'phone_number') required String phoneNumber,

  /// Contact's first name
  @JsonKey(name: 'first_name') required String firstName,

  /// Optional. Contact's last name
  @JsonKey(name: 'last_name') String? lastName,

  /// Optional. Contact's user identifier in Telegram
  @JsonKey(name: 'user_id') int? userId,

  /// Optional. Additional data about the contact in the form of a
  /// [vCard](https://en.wikipedia.org/wiki/VCard)
  @JsonKey(name: 'vcard') String? vcard,
}) = _Contact;