File tree Expand file tree Collapse file tree 4 files changed +13
-1
lines changed Expand file tree Collapse file tree 4 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 1+ ## [ 3.3.0] - 2021-11-29
2+ * Added option to manage the log level. Doesn't print failed downloads by default anymore. You can set it like this:
3+ ``` dart
4+ CacheManager.logLevel = CacheManagerLogLevel.verbose;
5+ ```
6+
17## [ 3.2.0] - 2021-11-27
28* [ Bugfix] getSingleFile now downloads a new file before completing as the outdated file might have been deleted.
39
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ void main() {
1212 pubDevURL: 'https://pub.dev/packages/flutter_cache_manager' ,
1313 pages: [CacheManagerPage .createPage ()],
1414 ));
15+ CacheManager .logLevel = CacheManagerLogLevel .verbose;
1516}
1617
1718const url = 'https://blurha.sh/assets/images/img1.jpg' ;
Original file line number Diff line number Diff line change 11import '../flutter_cache_manager.dart' ;
22
3+ /// Instance of the cache manager. Can be set to a custom one if preferred.
34CacheLogger cacheLogger = CacheLogger ();
45
6+ /// Log levels of the cache manager. Debug shows failed downloads and verbose
7+ /// also shows successful downloads and cache retrievals.
58enum CacheManagerLogLevel {
69 none,
710 warning,
811 debug,
912 verbose,
1013}
1114
15+ /// [CacheLogger] which is used by the cache manager to log useful information
1216class CacheLogger {
17+ /// Function to log a message on a certain loglevel
1318 void log (String message, CacheManagerLogLevel level) {
1419 if (CacheManager .logLevel.index >= level.index) {
1520 print (message);
Original file line number Diff line number Diff line change 11name : flutter_cache_manager
22description : Generic cache manager for flutter. Saves web files on the storages of the device and saves the cache info using sqflite.
3- version : 3.2 .0
3+ version : 3.3 .0
44homepage : https://github.com/Baseflow/flutter_cache_manager/tree/master/flutter_cache_manager
55
66environment :
You can’t perform that action at this time.
0 commit comments