stopPreview method Null safety

void stopPreview()
override

Implementation

static void stopPreview() {
  keepRunning = false;

  Future.delayed(const Duration(seconds: 1), () => client.close());
}