I made a flutter app and named it gsheets to test gsheets package and when I tried to download the package it said "Because gsheets depends on gsheets, version solving failed". After wasting about tow hours searching I tried to do it with an other project with another name and it worked. I think packages won't work if the project has the same name, I hope this way help you and save your precious time.
I don't know why is this happening, If anyone knows why, please give us an idea.
Here is my terminal code:
PS G:\Flutter Apps\gsheets> flutter pub add gsheets
Because gsheets depends on gsheets, version solving failed.
pub finished with exit code 65
This happens because the project name is the same as the library name. So if you have the same Error as this just try to change the project name.