I had an existing application which i want to modify, I am using following dependencies:
path_provider: ^2.0.8
http: ^0.13.4
html: ^0.15.0
custom_pop_up_menu: ^1.2.2
share: ^2.0.4
connectivity: ^3.0.6
flutter_swiper: ^1.1.6
Following error, i have even created a new empty project and added the dart files to that project but it is not working now.
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:
- package:flutter_swiper
- package:plugin_platform_interface
- package:flutter_page_indicator
- package:transformer_page_view
CodePudding user response:
This is because some of the dependencies
that you are using not supports null-safety and to solve this you can upgrade
your dependencies
or use below command
to run your application without null-safety
.
flutter run --no-sound-null-safety
CodePudding user response:
First upgrade your flutter and packages upto date,
- Run
flutter pub outdated --mode=null-safety
to print all outdated packages. Than, - Run this,
flutter pub upgrade --null-safety
to upgrade all packages automatically