Entitlement.fromMap constructor
Implementation
factory Entitlement.fromMap(Map<String, dynamic> map) {
return Entitlement(
id: map['id'] as String,
productId: map['productId'] as String,
source: EntitlementSource.fromRawValue(map['source'] as String),
isActive: map['isActive'] as bool,
expiresAt: map['expiresAt'] != null
? DateTime.parse(map['expiresAt'] as String)
: null,
purchasedAt: DateTime.parse(map['purchasedAt'] as String),
);
}