It took me 2 days to fix this.
The solution was to download the library locally, place it in a specific folder, and reference the path to the folder where the library is stored and it worked.
Pubspec