refactor: Magic numbers
This commit is contained in:
parent
49c83a6e58
commit
f114d545f7
8 changed files with 63 additions and 54 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue