#!/usr/bin/env bash
set -euo pipefail

echo "==> Formatting check"
if command -v dart >/dev/null 2>&1; then
  dart format --output=none --set-exit-if-changed .
else
  echo "dart not found in PATH" >&2
  exit 1
fi

echo "==> Static analysis"
flutter analyze

echo "==> Tests"
flutter test

echo "\nAll checks passed."

