ForegroundNotificationConfig.fromMap constructor
ForegroundNotificationConfig.fromMap(
- Map<String, dynamic> map
)
Implementation
factory ForegroundNotificationConfig.fromMap(Map<String, dynamic> map) {
return ForegroundNotificationConfig(
notificationId: map['notificationId'] ?? defaultNotificationId,
title: map['title'],
text: map['text'],
smallIcon: map['smallIcon'] != null
? AndroidResource.fromMap(map['smallIcon'])
: null,
largeIcon: map['largeIcon'] != null
? AndroidResource.fromMap(map['largeIcon'])
: null,
priority: map['priority']?.toInt() ?? 0,
channelId: map['channelId'] ?? defaultChannelId,
channelName: map['channelName'],
channelDescription: map['channelDescription'],
actions: List<String>.from(map['actions']),
);
}