Run these commands in your Flutter project root:
flutter clean
flutter pub get
cd android
./gradlew clean
cd ..
flutter pub run build_runner build --delete-conflicting-outputs
flutter run
These steps clean your Flutter and Android builds, refresh dependencies, and regenerate necessary files, which can resolve many common issues related to code generation or build conflicts.