When I run my Flutter codes, I get an error like this:
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:
- package:firebase_auth
For solutions, see https://dart.dev/go/unsound-null-safety
Restarted application in 922ms.
pubspec.yaml
:
name: simto_todolist
description: A new Flutter project.
publish_to: 'none'
version: 1.0.0+1
androidX: true
environment:
sdk: ">=2.15.1 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
firebase_auth: ^0.6.2+1
dev_dependencies:
flutter_test:
sdk: flutter
global_configuration: ^1.6.0
flutter_lints: ^1.0.0
get_storage: ^2.0.3
carousel_slider: ^4.0.0
cool_alert: ^1.1.0
timer_count_down: ^2.2.1
modal_bottom_sheet: ^2.0.1
persistent_bottom_nav_bar: ^4.0.2
group_button: ^4.6.0
flutter_signin_button: ^2.0.0
google_sign_in: ^5.2.4
firebase_core: ^1.13.1
flutter:
uses-material-design: true
assets:
- splash1.png
- splash2.png
- splash3.png
- splash4.png
- logo.png
fonts:
- family: Roboto
fonts:
- asset: fonts/Roboto-Bold.ttf
- asset: fonts/Roboto-Light.ttf
- asset: fonts/Roboto-Medium.ttf
- asset: fonts/Roboto-Thin.ttf
I think the problem is in the firabase_auth package. I've searched a lot but couldn't find how to fix the problem.
What is the problem? How can I solve it? Thanks in advance for the help.
@MuhammadJunaidKhalid When I upgrade the firebase_auth version to the latest version, I get this output:
Because no versions of global_configuration match >1.6.0 <2.0.0 and global_configuration 1.6.0 depends on http ^0.12.2, global_configuration ^1.6.0 requires http ^0.12.2.
And because no versions of http match >0.12.2 <0.13.0 and http 0.12.2 depends on http_parser >=0.0.1 <4.0.0, global_configuration ^1.6.0 requires http_parser >=0.0.1 <4.0.0.
And because firebase_auth >=3.3.9 depends on firebase_auth_web ^3.3.9 which depends on http_parser ^4.0.0, global_configuration ^1.6.0 is incompatible with firebase_auth >=3.3.9.
So, because simto_todolist depends on both firebase_auth ^3.3.11 and global_configuration ^1.6.0, version solving failed.
pub get failed (1; So, because simto_todolist depends on both firebase_auth ^3.3.11 and global_configuration ^1.6.0, version solving failed.)
exit code 1
The error I got after doing what @Royalindo said:
PS C:\Users\emiry\Desktop\Simto-To-Do-List\simto_todolist> flutter pub get
Because no versions of global_configuration match >1.6.0 <2.0.0 and global_configuration 1.6.0 depends on http ^0.12.2, global_configuration ^1.6.0 requires http ^0.12.2.
And because no versions of http match >0.12.2 <0.13.0 and http 0.12.2 depends on http_parser >=0.0.1 <4.0.0, global_configuration ^1.6.0 requires http_parser >=0.0.1 <4.0.0.
And because firebase_auth >=3.3.9 depends on firebase_auth_web ^3.3.9 which depends on http_parser ^4.0.0, global_configuration ^1.6.0 is incompatible with firebase_auth >=3.3.9.
So, because simto_todolist depends on both firebase_auth ^3.3.11 and global_configuration ^1.6.0, version solving failed.
Running "flutter pub get" in simto_todolist...
pub get failed (1; So, because simto_todolist depends on both firebase_auth ^3.3.11 and global_configuration ^1.6.0, version solving failed.)