toMap method

Map toMap()

Used to serialize to the map for persisting data.

Implementation

Map toMap() {
  return {
    'text': text,
    'imagePath': imagePath,
  };
}