NotificationConfig.fromMap constructor
NotificationConfig.fromMap( - JsonMap map
)
Implementation
factory NotificationConfig.fromMap(JsonMap map) {
JsonMap? asJsonMap(dynamic value) {
if (value is Map) {
return Map<String, dynamic>.from(value);
}
return null;
}
return NotificationConfig(
title: map['title'] as String?,
text: map['text'] as String?,
smallIcon: map['smallIcon'] as String?,
largeIcon: map['largeIcon'] as String?,
layout: map['layout'] as String?,
actions: (map['actions'] as List?)?.cast<String>(),
strings: asJsonMap(map['strings']),
importance: map['importance'] as int?,
);
}