Skip to content

Commit bbc922c

Browse files
committed
feat: add new method
1 parent ec66f63 commit bbc922c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/pillar-core/example/lib/repositories/example_repository.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import 'package:pillar_core/pillar_core.dart';
44
abstract interface class ExampleRepository implements BaseRepository {
55
/// Repository name
66
Future<String> getData();
7+
/// Clear cached data
8+
Future<void> clearCache();
79
}
810

911
/// Implementation of ExampleRepository
@@ -17,4 +19,9 @@ class ExampleRepositoryImpl implements ExampleRepository {
1719
await Future<void>.delayed(const Duration(milliseconds: 500));
1820
return 'Sample data from repository';
1921
}
22+
23+
@override
24+
Future<void> clearCache() {
25+
return Future<void>.delayed(const Duration(milliseconds: 200));
26+
}
2027
}

0 commit comments

Comments
 (0)