Theys two scripts have helped a lot when debugging:
Clean up with this:
#!/bin/bash
echo "Cleaning via flutter.."
flutter clean
echo "Cleaning pub cache via flutter.."
flutter pub cache clean
echo "Getting stuff..."
flutter pub get
echo "Fixing stuff..."
dart fix --apply
And rebuild cache etc. with this:
#!/bin/bash
echo "Getting stuff via flutter.."
flutter pub get
echo "Fixing stuff..."
dart fix --apply