Sponsor class

Represents a sponsor (kafeel) in the Saudi Arabian sponsorship system.

For residents and visitors in Saudi Arabia, a sponsor is required. This model contains the sponsor's personal information and details.

Example:

final sponsors = await twk.getUserSponsors();
for (var sponsor in sponsors) {
  print('Sponsor: ${sponsor.nameEn} (${sponsor.nameAr})');
  print('ID expires: ${sponsor.idExpiryDateGregorian}');
}

Constructors

Sponsor({required int nationalId, required String idExpiryDateHijri, required DateTime idExpiryDateGregorian, required String nameAr, required String nameEn, required Gender gender, required UserDetails details})
Creates a new Sponsor instance.
const
Sponsor.fromJson(Map<String, dynamic> json)
factory

Properties

details → UserDetails
Additional details about the sponsor
final
gender → Gender
Sponsor's gender
final
hashCode → int
The hash code for this object.
no setterinherited
idExpiryDateGregorian → DateTime
ID expiry date in Gregorian calendar format
final
idExpiryDateHijri → String
ID expiry date in Hijri calendar format
final
nameAr → String
Sponsor's name in Arabic
final
nameEn → String
Sponsor's name in English
final
nationalId → int
The sponsor's national ID number
final
props → List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stringify → bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited