don't assume list isn't null

This commit is contained in:
sneurlax 2023-07-27 14:47:16 -05:00
parent 44aab53c9f
commit c584cb862d

View file

@ -44,7 +44,10 @@ class LitescribeAPI {
// Check if the number of returned inscriptions equals the limit
final list = response.data['result']['list'];
final int total = response.data['result']['total'] as int;
final int currentSize = list.length as int;
int currentSize = 0;
if (list != null) {
currentSize = list.length as int;
}
if (currentSize == size && currentSize < total) {
// If the number of returned inscriptions equals the limit and there are more inscriptions available,