'Integration_test ^1.0.2+3 which depends on vm_service >=4.2.0 <7.0.0, vm_service >=4.2.0 <7.0.0 is required

Why I can't add an integration test in my pubspec.yaml. Can't someone help me how to solve this problem?

enter image description here

enter image description here



Solution 1:[1]

This package has been deprecated and the way you have added it in your pubspec is not the correct way. Please try using it like this along with Flutter 2.x.x

dev_dependencies:
  integration_test:
    sdk: flutter

Reference: https://pub.dev/packages/integration_test

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Saheb Singh