Skip to content

Instantly share code, notes, and snippets.

@VB10
Created June 6, 2021 01:39
Show Gist options
  • Save VB10/9ec90229b0aec7d6a2aaafd5dce26468 to your computer and use it in GitHub Desktop.
Save VB10/9ec90229b0aec7d6a2aaafd5dce26468 to your computer and use it in GitHub Desktop.
abstract class ItemCache {
final String _localPath = 'vb10';
final ItemModel item;
ItemCache(this.item);
Future<void> cacheIt();
Future<Directory> createDirectory();
Future<File> createDirectoryWithPath();
Future<ItemModel?> takeItemWithCache(int id);
Future<List<ItemModel>> getAllDatas();
Future<void> clearAllDatas();
Future<void> clearAllDatasWithExpiry();
int get _expiryValue => 7;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment