The name of the given podspec `FlutterToast` doesn't match the expected one `fluttertoast` flutter

Viewed 742

I imported the fluttertoast package in my flutter project.

I added dependencies in .yaml file and within my project with import 'package:fluttertoast/fluttertoast.dart'; but when I run the code on Simulator this is the output :

   -> Fetching podspec for `fluttertoast` from `.symlinks/plugins/fluttertoast/ios`
[!] The name of the given podspec `FlutterToast` doesn't match the expected one `fluttertoast`

I tried to change the name from FlutterToast to fluttertoastto match the name but it didn't work.

I also cleaned the workspace and deleted the .pub-cache...I tried a lots of stuffs but nothing worked.

Ideas?

1 Answers

I was facing same issue. Problem was in pubspec.yml I had plugin dependency added like this (Without any version number):

fluttertoast: 

Seems latest version is (5.0.1) is causing this issue. So changing the dependency to following, fixed the issue for me:

fluttertoast: 4.0.1
Related