FilechangeRotation method

File FilechangeRotation({
  1. File? filebefore,
  2. int? rotate,
})

Implementation

File FilechangeRotation({File? filebefore,int? rotate}){
  ImageLib.Image? contrast = ImageLib.decodeImage(filebefore!.readAsBytesSync());
  contrast = ImageLib.copyRotate(contrast!, angle: rotate ?? 90);
  filebefore.writeAsBytesSync(ImageLib.encodeJpg(contrast));
  return filebefore;
}