nord vpnnord vpn
Ad

Untitled

mail@pastecode.io avatar
unknown
dart
a year ago
790 B
1
Indexable
Never
  Future<File?> cropImage(File file) async {
    File? newFile;

    CroppedFile? cropped = await ImageCropper().cropImage(
      sourcePath: file.path,
      compressQuality: 10,
      cropStyle: CropStyle.rectangle,
      compressFormat: ImageCompressFormat.jpg,
      aspectRatio: const CropAspectRatio(ratioX: 1, ratioY: 1),
      uiSettings: [
        AndroidUiSettings(
          toolbarColor: Get.theme.primaryColor,
          toolbarTitle: 'Crop Image',
          statusBarColor: AppColors.white,
          backgroundColor: AppColors.white,
          activeControlsWidgetColor: Get.theme.focusColor,
        ),
        IOSUiSettings(
          title: 'Cropper',
        ),
      ],
    );
    if (cropped != null) {
      newFile = File(cropped.path);
    }

    return newFile;
  }

nord vpnnord vpn
Ad