Skip to content

Custom Image Builder? #199

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

Open
bizz84 opened this issue Feb 12, 2025 · 1 comment
Open

Custom Image Builder? #199

bizz84 opened this issue Feb 12, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@bizz84
Copy link

bizz84 commented Feb 12, 2025

Is your feature request related to a problem? Please describe.
I'd like to customize the behaviour of the image renderer, rather than using the defaults.

Describe the solution you'd like
It would be nice to have some kind of imageBuilder so I can plug in my own custom hero transitions. Example:

Image.Hero.mp4

The (soon discontinued) https://pub.dev/packages/flutter_markdown package offers this:

                imageBuilder: (Uri uri, String? title, String? alt) {
                  final tag = heroTag(uri, alt);
                  return GestureDetector(
                    // Open zoomable preview
                    onTap: () => onImageTap(uri, tag),
                    child: Hero(
                      tag: tag,
                      child: CustomCachedNetworkImage(
                        imageUrl: uri.toString(),
                      ),
                    ),
                  );
                },

This approach offers more control over caching behavior and image transitions.

@bizz84 bizz84 added the enhancement New feature or request label Feb 12, 2025
@asjqkkkk
Copy link
Owner

Hi @bizz84 , there is a ImgConfig to implement your custom image widget

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

No branches or pull requests

2 participants