refactor: Magic numbers

This commit is contained in:
Krille Fear 2021-10-26 18:47:05 +02:00
commit f114d545f7
8 changed files with 63 additions and 54 deletions

View file

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