I had the same problem earlier, and I solved it by adding the dependency that caused the error under dependency_overrides in pubspec.yaml.
dependency_overrides:
intl: ^0.18.0
Yes, it is a way to solve it, but you have to be careful; since forcing a certain version can cause compatibility problems. But if you have tried it and everything works well for you, perfect.