fetchThreadsNextPage method Null safety

Future<List<MimeMessage>> fetchThreadsNextPage(
  1. ThreadResult threadResult
)

Retrieves the next page for the given threadResult and returns the loaded messsages.

The given threadResult will be updated to contain the loaded messages. Compare fetchThreads.

Implementation

Future<List<MimeMessage>> fetchThreadsNextPage(
    ThreadResult threadResult) async {
  final messages = await fetchMessagesNextPage(threadResult.threadSequence,
      fetchPreference: threadResult.fetchPreference);
  threadResult.addAll(messages);
  return messages;
}