fixing bugs

This commit is contained in:
Christien Rioux 2024-05-31 18:55:44 -04:00
parent fd63a0d5e0
commit f780a60d69
3 changed files with 7 additions and 2 deletions

View file

@ -105,6 +105,9 @@ class TableDBArrayCubit<T> extends Cubit<TableDBArrayBusyState<T>>
) async {
try {
final length = _array.length;
if (length == 0) {
return AsyncValue.data(IList<T>.empty());
}
final end = ((tail - 1) % length) + 1;
final start = (count < end) ? end - count : 0;
final allItems =