Map<String, dynamic> toMap() { return { 'text': text, 'pageNumber': pageNumber, if (location != null) 'location': location, }; }