提交 ccf08ac0 authored 作者: yueweilu's avatar yueweilu

上传图片清晰度保持原画质

上级 14b30a60
...@@ -7,8 +7,8 @@ abstract class AssetsPicker { ...@@ -7,8 +7,8 @@ abstract class AssetsPicker {
static Future<XFile?> image({ static Future<XFile?> image({
required BuildContext context, required BuildContext context,
ImageSource source = ImageSource.gallery, ImageSource source = ImageSource.gallery,
double maxWidth = 512, double maxWidth = 1024,
double maxHeight = 512, double maxHeight = 1024,
}) async { }) async {
if (!(await Access.photos())) { if (!(await Access.photos())) {
if (context.mounted) { if (context.mounted) {
...@@ -22,8 +22,9 @@ abstract class AssetsPicker { ...@@ -22,8 +22,9 @@ abstract class AssetsPicker {
} }
return _imagePicker.pickImage( return _imagePicker.pickImage(
source: source, source: source,
maxWidth: maxWidth, // maxWidth: maxWidth,
maxHeight: maxHeight, // maxHeight: maxHeight,
// imageQuality: 100
); );
} }
/// 拍照 /// 拍照
...@@ -45,8 +46,8 @@ abstract class AssetsPicker { ...@@ -45,8 +46,8 @@ abstract class AssetsPicker {
} }
return _imagePicker.pickImage( return _imagePicker.pickImage(
source: source, source: source,
maxWidth: maxWidth, // maxWidth: maxWidth,
maxHeight: maxHeight, // maxHeight: maxHeight,
); );
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论