toMap method

Future<Map<String, dynamic>> toMap()

Implementation

Future<Map<String, dynamic>> toMap() async {
  return {
    "title": title,
    "content": content,
    "channelId": channelId,
    "channelName": channelName,
    "iconData": (await rootBundle.load(iconPath)).buffer.asUint8List(),
    "priority": priorityMap[priority],
  };
}