toMap method
Converts the BaseDataModel
object to a Map representation.
Returns a Map containing the key-value pairs of the object's properties.
Implementation
@override
Map<String, dynamic> toMap() {
return <String, dynamic>{
'id': id,
'title': title,
'titleColor': titleColor,
'icon': icon,
'inputs': inputs
.map((NotificationActionInput input) => input.toMap())
.toList(),
'contextual': contextual,
'authenticationRequired': authenticationRequired,
'destructive': destructive,
'showsUserInterface': showsUserInterface,
'allowInBackground': allowInBackground,
'payload': payload,
};
}