Connecting IOS firebase app to my flutter app

Viewed 27

I am trying to connect a IOS Firebase app to my flutter and the packages I am importing come up with the error "The library 'package:firebase_auth_web/firebase_auth_web.dart' is legacy, and should not be imported into a null safe library. Try migrating the imported library".

1 Answers

There is more than one problem as per your description and comments. The easiest solution is to upgrade the dart, flutter, and all the dependencies you are using because it seems that you are using all the things which are older.

First, in your command prompt (terminal), run:

> flutter upgrade

This will upgrade your flutter and dart both. Secondly, run:

> flutter pub upgrade

This will upgrade all the dependencies. Finally, run:

> flutter pub upgrade --major-version

This will also upgrade all the dependencies.

Doing these will make your application up to date with the dependencies. Now, try to run the app again. Most probably it will work, if it doesn't then it might tell you to upgrade your compileSdkVersion in build.gradle to something larger number. If so, upgrade that number in your app>build.gradle file.

Related