switchEffect method

Future switchEffect(
  1. CameraMode mode,
  2. String path
)

Implementation

Future switchEffect(CameraMode mode, String path) async {
  // late File loadFile;
  late String filePath;

  if (!path.contains("none")) {
    String fileName = path.split("/").last;
    File loadFile = await createFileFromAsset(path, fileName);
    filePath = loadFile.path;
  }
  return _channel.invokeMethod('switchEffect', <String, dynamic>{
    'mode': describeEnum(mode),
    'path': path.contains("none") ? "none" : filePath,
  });
}