To ensure that the app doesn’t break when a
package is updated,
specify a version range using one of the
following formats:

Range constraints: Specify a minimum and maximum version. For example:

    
dependencies:
  url_launcher: '>=5.4.0 <6.0.0'

Range constraints with caret syntax
are similar to regular range constraints:

    
dependencies:
  collection: '^5.4.0'

For additional details,
see the package versioning guide.

Updating package dependencies

When running flutter pub get 
for the first time after adding a package,
Flutter saves the concrete package version found in the pubspec.lock
lockfile. This ensures that you get the same version again
if you, or another developer on your team, run flutter pub get.