flipImage method

Future<File> flipImage(
  1. Uint8List imageBytes, {
  2. bool horizontal = true,
})

Implementation

Future<File> flipImage(Uint8List imageBytes, {bool horizontal = true}) async {
  File flippedFile;
  Directory downloadsDir = await getApplicationDocumentsDirectory();
  String newPath = "${downloadsDir.path}/${widget.imagePath.split("/").last}";
  flippedFile = File(newPath)..writeAsBytesSync(imageBytes);
  return flippedFile;
}