init static method

Future<void> init({
  1. int workersCount = 2,
})

Implementation

static Future<void> init({int workersCount = 2}) async {
  if (ImageUtilsIsolate.initiated) {
    return;
  }
  print("ImageUtilsIsolate initialization");
  ImageUtilsIsolate.initiated = true;
  ImageUtilsIsolate.computer = Computer.create(); //Or Computer.shared()
  await ImageUtilsIsolate.computer.turnOn(
    workersCount: workersCount, // optional, default 2
    verbose: false, // optional, default false
  );
}