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

How to clip/crop image? #136

Closed
wiradikusuma opened this issue Feb 28, 2019 · 1 comment
Closed

How to clip/crop image? #136

wiradikusuma opened this issue Feb 28, 2019 · 1 comment

Comments

@wiradikusuma
Copy link

Assuming the image is not already square, the following does NOT clip the image:

ClipRect(
	child: CachedNetworkImage(
		fit: BoxFit.fill, // "cover" does NOT work as well
		imageUrl: 'bla,
	),
)

I've tried using Align in-between, doesn't work as well.

@renefloor
Copy link
Contributor

renefloor commented Feb 28, 2019

Currently you need to set height and or width, for example to double.INFINITY, otherwise the image just takes it own size in the stack widget. Duplicate of #134 and #135

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

1 participant