User constructor Null safety

User(
  1. {required String id,
  2. required String username,
  3. required String name,
  4. required String type,
  5. String? imagePath,
  6. String? email,
  7. DateTime? birth,
  8. String? phoneNumber,
  9. String? notificationToken,
  10. String? isAgreeTerms,
  11. String? isAgreePrivacy,
  12. String? isAgreeMarketing,
  13. String? awsAccessKey,
  14. String? awsSecretKey,
  15. String? awsSessionToken,
  16. String? createdAt}
)

Implementation

User({
  required this.id,
  required this.username,
  required this.name,
  required this.type,
  this.imagePath,
  this.email,
  this.birth,
  this.phoneNumber,
  this.notificationToken,
  this.isAgreeTerms,
  this.isAgreePrivacy,
  this.isAgreeMarketing,
  this.awsAccessKey,
  this.awsSecretKey,
  this.awsSessionToken,
  this.createdAt,
});