Not able to import the intl package for dart
Faced the same issue, if you are importing
import "package:intl/intl_browser.dart";
then you will get that error, it seems like the dart SDK bundled with flutter does not have the required dependencies.
So use only
import 'package:intl/intl.dart';
and it should work just fine.
Here are some steps that I offten see as problems with dependencies in flutter.
The thing with
pubspec.yaml
is that you have to save it CRTL/CMD + S before pub get will work. Running pub get from IDE doesn't save the file automatically.Try running
flutter clean
and then runflutter pub get
. Sometimes when you remove dependencies like plugins,.build
folder doesnt get cleaned up properly so you have to do it manually.You can try to repair pub cache by running
flutter pub cache repair
Sometimes just restarting your IDE might solve the problem as well.