我正在使用 image_picker 从画廊和相机获取图像,但尺寸太小
I am using image_picker to get image from gallery and camera but size is to small
这里图片清晰:(https://i.stack.imgur.com/EpLaN.jpg)
这里不是很清楚吗?(https://i.stack.imgur.com/SZVOw.jpg)
问题是:
第一张图片是直接从firebase Storage中获取的图片。
通过第二张图片,我从 Firestore 获取 link(firebase 存储)并使用网络图像显示它:
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
image: DecorationImage(
image: NetworkImage(
pic,
scale: 1,
),
fit: BoxFit.cover)
)),
然后图像质量很差。
我该如何解决这个问题?
这是因为 MediaQuery.size 没有使用与图像选择器中的照片相同的度量。尝试删除 maxWidth 和 maxHeight 参数。
这里图片清晰:(https://i.stack.imgur.com/EpLaN.jpg)
这里不是很清楚吗?(https://i.stack.imgur.com/SZVOw.jpg)
问题是:
第一张图片是直接从firebase Storage中获取的图片。
通过第二张图片,我从 Firestore 获取 link(firebase 存储)并使用网络图像显示它:
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
image: DecorationImage(
image: NetworkImage(
pic,
scale: 1,
),
fit: BoxFit.cover)
)),
然后图像质量很差。 我该如何解决这个问题?
这是因为 MediaQuery.size 没有使用与图像选择器中的照片相同的度量。尝试删除 maxWidth 和 maxHeight 参数。