updateExpiry method

  1. @override
Future<void> updateExpiry (
  1. String key,
  2. DateTime newExpiry
)
override

Implementation

@override
Future<void> updateExpiry(String key, DateTime newExpiry) {
   _responses.entries.forEach((entry) {
    final index = entry.value.indexWhere((x) => x.key == key);
    if(index >= 0) {
      entry.value[index] = entry.value[index].copyWith(expiry: newExpiry);
    }
  });

  return Future.value();
}