Input$InsertCalendarListInput.fromJson constructor
Input$InsertCalendarListInput.fromJson(
- Map<String, dynamic> data
)
Implementation
factory Input$InsertCalendarListInput.fromJson(Map<String, dynamic> data) {
final result$data = <String, dynamic>{};
final l$id = data['id'];
result$data['id'] = (l$id as String);
if (data.containsKey('backgroundColor')) {
final l$backgroundColor = data['backgroundColor'];
result$data['backgroundColor'] = (l$backgroundColor as String?);
}
if (data.containsKey('colorId')) {
final l$colorId = data['colorId'];
result$data['colorId'] = (l$colorId as String?);
}
if (data.containsKey('defaultReminders')) {
final l$defaultReminders = data['defaultReminders'];
result$data['defaultReminders'] = (l$defaultReminders as List<dynamic>?)
?.map((e) => Input$InsertCalendarDefaultReminderInput.fromJson(
(e as Map<String, dynamic>)))
.toList();
}
if (data.containsKey('foregroundColor')) {
final l$foregroundColor = data['foregroundColor'];
result$data['foregroundColor'] = (l$foregroundColor as String?);
}
if (data.containsKey('hidden')) {
final l$hidden = data['hidden'];
result$data['hidden'] = (l$hidden as bool?);
}
if (data.containsKey('notificationSettings')) {
final l$notificationSettings = data['notificationSettings'];
result$data['notificationSettings'] = l$notificationSettings == null
? null
: Input$InsertCalendarNotificationSettingsNotifInput.fromJson(
(l$notificationSettings as Map<String, dynamic>));
}
return Input$InsertCalendarListInput._(result$data);
}