7mada123 / disposable_cached_images Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
On mobile browsers, the pictures in the ListView may fail to load, and the pictures that have been loaded successfully, when they slide out of the screen and then return to the screen, they also fail to load,
Hi,I am sorry to contact you use this issue. But I can't find your email.
And I noticed that you have met the problem when upgraded to flutter3 the app will flickering in this issue: flutter/flutter#111085.
I also have the problem, so I wonder if you have solved the problem. Really appreciate if you can help. Thanks a lot and sorry about this issue.
I was using cached_network_image and I need to switch for my project, because it is constantly crashing on iOS. The problem with that library was that network requests are never cancelled which is a problem if the user scrolls through a long list of images.
So I started to compare implementations of Image caching libraries. The pros of this library is that it uses isolates and it cancels network requests. Compared to other libraries it comes with one great disadvantage: It does not provide ImageProviders which seems to be the flutter standard when handling images. ImageProviders also use the flutter ImageCache as a in-memory-cache which already works well. It would be really great to get the best of both worlds.
I am thinking about writing a proof of concept.
I am getting the follow error when running on Android, it's works fine on IOS and web
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/disposable_cached_images-1.0.9/lib/cache/cache.dart:65:10: Error: Type 'Uint8List' not found.
Future<Uint8List?> getBytes(final String key) async {
^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/disposable_cached_images-1.0.9/lib/cache/cache.dart:74:10: Error: Type 'Uint8List' not found.
Future getLocalBytes(final String imagePath) async {
^^^^^^^^^
3
FAILURE: Build failed with an exception.
- Where:
Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1156- What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command 'C:\flutter\bin\flutter.bat'' finished with non-zero exit value 1
Did this feature introduced in Flutter 3.7 https://medium.com/flutter/whats-new-in-flutter-3-7-38cbea71133c#2507 make this package unnecessary?
None of the images were loaded when the app was first initialized on the iPhone
It would be nice to have a maximum cache size and when there are too many images in memory because of keepAlive=true it should remove them. Otherwise we run into out of memory exceptions.
This package is great but could you add a progress indicator option when loading an image?
It will be nice to have a parameter to set a delay to delete file from.
For example when the file is not use for 24 hours, it would be remove from cache.
Also the package need ProviderScoop to build.
hi I was using old version ^1.1.2 and after upgrade flutter to latest I updated the library to ^1.2.1 I got follow error for users having caches from old version
await DisposableImages.init(); failed with follow error on console
"ConstraintError: Failed to execute 'createObjectStore' on 'IDBDatabase': An object store with the specified name already exists."
the library working fine for new users or on private session but crash for old users with caches from old version which lead to fail loading images duo
[Log] DisposableCachedImage : unhandled error (main.dart.js, line 42968)
[Log] LateInitializationError: Field 'fileContent' has not been initialized. (main.dart.js, line 42968)
is there quick solution for this problem ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.