what we are going to do is to install the cocopods with arch arm compatible version in your project terminal
flutter pub get
then navigate to iOS folder using
cd ios
then
sudo arch -x86_64 gem install ffi
and last thing
arch -x86_64 pod install
Alternatively you could remove pod file then
pod init
the last option you may delete the whole IOS folder then the below command will recreate the IOS folder again
flutter create --platforms=iOS .