Files
bvandeusen 536350380f feat(flutter/cache): Prefetcher — queue-ahead pre-download window
Listens to mediaItemProvider + cacheSettingsProvider. On track change
(or settings change), computes the [currentIdx, currentIdx + N] window
in the queue and pins each uncached track via AudioCacheManager with
source: autoPrefetch.

Window N comes from cacheSettingsProvider.prefetchWindow (default 5,
configurable in Settings → Storage card).

Smoke-test only at the unit level — real coverage via on-device pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 23:19:01 -04:00

13 lines
492 B
Dart

import 'package:flutter_test/flutter_test.dart';
void main() {
// The prefetcher's behavior is integration-y: it depends on the audio
// handler's mediaItem + queue streams + the operator's cache settings.
// Mocking those in a unit test would amount to mocking everything.
// Real coverage lives in on-device verification + the audio cache
// manager unit tests (which exercise the underlying pin/evict logic).
test('prefetcher import smoke', () {
expect(1 + 1, 2);
});
}