'Flutter can't install firebase onto macOS

I tried to install the firebase package for flutter. After running

flutter pub add firebase_core

It states "successfully installed". When I then try to import it to my main.dart file using the following code, it throws an error.

import 'package:firebase_core/firebase_core.dart';

Target of URI doesn't exist: 'package:firebase_core/firebase_core.dart'. Try creating the file referenced by the URI, or Try using a URI for a file that does exist.

Thank you for your help!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source