create static method
Notification
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "notification",
- String special_return_type = "notification",
- num? id,
- num? date,
- bool? is_silent,
- NotificationType? type,
override
Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual
Implementation
static Notification create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "notification",
String special_return_type = "notification",
num? id,
num? date,
bool? is_silent,
NotificationType? type,
}) {
// Notification notification = Notification({
final Map notification_data_create_json = {
"@type": special_type,
"@return_type": special_return_type,
"id": id,
"date": date,
"is_silent": is_silent,
"type": (type != null) ? type.toJson() : null,
};
notification_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (notification_data_create_json.containsKey(key) == false) {
notification_data_create_json[key] = value;
}
});
}
return Notification(notification_data_create_json);
}