Adds todayProvider to memory lane

This commit is contained in:
Marty Fuhry
2023-07-24 10:12:40 -04:00
parent 8db008ef0b
commit 67ae58b513
3 changed files with 24 additions and 3 deletions
@@ -19,9 +19,10 @@ class MemoryService {
MemoryService(this._apiService);
Future<List<Memory>?> getMemoryLane() async {
Future<List<Memory>?> getMemoryLane({DateTime? now}) async {
try {
final now = DateTime.now();
// Use the provided DateTime or default to now
now = now ?? DateTime.now();
final beginningOfDate = DateTime(now.year, now.month, now.day);
final data = await _apiService.assetApi.getMemoryLane(
beginningOfDate,