refactor: Use image package to resize images
This commit is contained in:
parent
c5f084db87
commit
b44f309151
8 changed files with 61 additions and 145 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue