Thank you for reply. It took me one step closer to solution. Here is my model and serialization code below. it stores the dateofbirth as string.
@JsonSerializable(nullable: false)
class UserProfileModel {
String aboutMe;
@JsonKey(fromJson: _fromJson, toJson: _toJson)
DateTime dateofbirth;
String business;
String gender;
String city;
String pin;
String state;
UserProfileModel(
{this.aboutMe,
this.dateofbirth,
this.business,
this.gender,
this.city,
this.pin,
this.state});
factory UserProfileModel.fromJson(Map<String, dynamic> data) =>
_$UserProfileModelFromJson(data);
Map<String, dynamic> toJson() => _$UserProfileModelToJson(this);
static DateTime _fromJson(String String) => DateTime.tryParse(String);
static String _toJson(DateTime time) => time.toIso8601String();
}