operator [] method
Eases access to the MimeThread at the specified threadIndex
or null
when it is not yet loaded.
Note that the threadIndex
is expected to be based on full threadData, meaning 0 is the newest thread and length-1 is the oldest thread.
Implementation
MimeThread? operator [](int threadIndex) {
final index = (length - threadIndex - 1);
if (index < 0 || threadIndex < 0) {
return null;
}
return threads[threadIndex];
}