Run the below three command which will resolve the above issue: 1. flutter pub upgrade 2. flutter clean 3. flutter pub get