Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performing setstate of the page will cause the already loaded filters to be reloaded #24

Open
370966584 opened this issue Dec 31, 2019 · 2 comments

Comments

@370966584
Copy link

PhotoFilter is why StatelessWidget rebuilds multiple times?

@Letalus
Copy link

Letalus commented Jun 13, 2020

to be honest, I have currently the same problem that everytime I select one of the thumbnail images and call setState (or in my case notifylistener via the provider package) all the thumbnail images are being rebuild. This of course kills the performance of the app and makes it for around 2 seconds unusable. Im currently experimenting with the possibility to create custom Colorfilters(from the flutter Colorfilter.matrix constructor) to only paint over the thumbnail images (and not manipulate them) and only manipulate the main images with the colorfilters provided in this package. Well if its working, I will properly commit a pull request, so you can also use it.
Screenshot 2020-06-13 at 10 34 49

@An19ik89
Copy link

Can you help me with one thing i don't understand how to do that.Please i am grateful to you if you help me.
PhotoFilter _photoFilter;
Filter _filter = presetFiltersList[23];
_photoFilter = new PhotoFilter(
image: image,
filename: fileName,
filter: _filter,
fit: BoxFit.fill,
);
After doing that I need the filtered image.
Uint32List _uint32list = _photoFilter.image.data;
Uint8List byte_data= _uint32list.buffer.asUint8List(); i did that process to get the filtered image.but could not. wheni try to read the filtered image in Image.memory(byte_data);
showing that "Exception: Invalid image data"
can you help me please ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants