update method

Future<void> update(
  1. String folder,
  2. String newFile,
  3. bool puzzle,
  4. bool popup,
)

Обновление изображения

Implementation

Future<void> update(
  String folder,
  String newFile,
  bool puzzle,
  bool popup,
) async {
  if (popup) {
    this.popup = await FileManager.update(folder, this.popup, newFile);
  } else {
    file = await FileManager.updateTiles(folder, file, newFile, puzzle);
    // Получаем реальные размеры изображения
    final size = await ImageProcessor.getImageSize(newFile);
    width = size.width;
    height = size.height;
  }
}