import 'package:fintracker_api/fintracker_api.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import '../../core/api/api_client.dart'; import '../../core/cache/cached.dart'; /// The last 24 months, oldest first (as the API returns them). See `docs/ai/offline-cache.md`. final cashflowMonthly24Provider = FutureProvider.autoDispose>>((ref) async { final r = await ref .watch(apiProvider) .getCashflowApi() .cashflowMonthly(months: 24); return Cached( r.data ?? const [], fetchedAt: r.extra['fetchedAt'] as DateTime?, ); });