refactor: Use image package to resize images

This commit is contained in:
Krille Fear 2021-11-20 16:54:18 +01:00
commit b44f309151
8 changed files with 61 additions and 145 deletions

View file

@ -198,8 +198,6 @@ class EmotesSettingsController extends State<EmotesSettings> {
});
}
static const maxImageWidth = 1600;
void imagePickerAction(
ValueNotifier<ImagePackImageContent> controller) async {
final result =
@ -210,7 +208,7 @@ class EmotesSettingsController extends State<EmotesSettings> {
name: result.fileName,
);
try {
file = await resizeImage(file, max: maxImageWidth);
file = await file.resizeImage(calcBlurhash: false);
} catch (_) {
// do nothing
}