NotificationAction.fromMap constructor
Creates a notification action from a map.
Implementation
factory NotificationAction.fromMap(Map<String, dynamic> map) {
return NotificationAction(
id: map.parseDefault<String>('id', ''),
title: map.parseDefault<String>('title', ''),
titleColor: map.parse<String>('titleColor'),
icon: map.parse<String>('icon'),
inputs: map
.parseDefault<List<Map<String, dynamic>>>(
'inputs',
<Map<String, dynamic>>[],
)
.map(NotificationActionInput.fromMap)
.toList(),
contextual: map.parseDefault<bool>('contextual', false),
authenticationRequired: map.parseDefault<bool>(
'authenticationRequired',
false,
),
destructive: map.parseDefault<bool>('destructive', false),
showsUserInterface: map.parseDefault<bool>('showsUserInterface', false),
allowInBackground: map.parseDefault<bool>('allowInBackground', true),
payload: map.parse<String>('payload'),
);
}