mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 08:15:16 +00:00
Force square account image
This commit is contained in:
@ -8,6 +8,7 @@ import 'package:file_picker/file_picker.dart';
|
||||
import 'package:filesize/filesize.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:image_cropper/image_cropper.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:mime/mime.dart';
|
||||
|
||||
@ -91,6 +92,7 @@ Future<BytesFile> showPickFileDialog({
|
||||
List<String> allowedMimeTypes,
|
||||
int imageMaxWidth,
|
||||
int imageMaxHeight,
|
||||
CropAspectRatio aspectRatio,
|
||||
}) async {
|
||||
assert(allowedMimeTypes != null);
|
||||
|
||||
@ -133,7 +135,7 @@ Future<BytesFile> showPickFileDialog({
|
||||
|
||||
file = BytesFile(image.path.split("/").last, await image.readAsBytes());
|
||||
|
||||
file = await showImageCropper(context, file);
|
||||
file = await showImageCropper(context, file, aspectRatio: aspectRatio);
|
||||
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user