checkFunctionExecuted function

bool checkFunctionExecuted(
  1. WidgetRef ref,
  2. List checkCommands,
  3. List checkImages
)

Implementation

bool checkFunctionExecuted(
  WidgetRef ref,
  List checkCommands,
  List checkImages,
) {
  String stdout = ref.watch(stdoutProvider);

  for (String item in checkCommands) {
    if (!stdout.contains(item)) {
      return false;
    }
  }
  for (String imagePath in checkImages) {
    String image = '$tempDir/$imagePath';
    if (!imageExists(image)) {
      return false;
    }
  }

  return true;
}