Pubspec.yaml what this file does in Flutter

1,438

Solution 1

version: 1.0.0+1

The version of your application or package.

environment:
  sdk: ">=2.0.0-dev.68.0 <3.0.0"

Your application or package claims to support Dart SDK within this version range

dependencies:
  flutter:
    sdk: flutter

Your application or package depends on the flutter package which can be found in the SDK

  sqflite: any

Your application or package depends on the package sqflite from https://pub.dartlang.org with no specific version constraint.

  path_provider: any
  intl: ^0.15.7

Your application or package depends on the package intl from https://pub.dartlang.org on any version 0.15.7 or later but before 0.16.0.

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.2

The ^ changes the meaning for versions 1.0.0 and later.

^0.15.7 means >=0.15.7 <0.16.0 ^1.15.7 means >=1.15.7 <2.0.0

because for versions < 1.0.0 breaking changes are indicated by incrementing the middle number, while for >= 1.0.0 breaking changes are indicated by incrementing the first part of the version.

Solution 2

It is responsible for handling of importing images/fonts/third party packages which you want to include in your project.

Share:
1,438
Hassan
Author by

Hassan

Flutter App Developer Pakistan

Updated on December 09, 2022

Comments

  • Hassan
    Hassan over 1 year
    version: 1.0.0+1
    
    environment:
      sdk: ">=2.0.0-dev.68.0 <3.0.0"
    
    dependencies:
      flutter:
        sdk: flutter
      sqflite: any
      path_provider: any
      intl: ^0.15.7
      # The following adds the Cupertino Icons font to your application.
      # Use with the CupertinoIcons class for iOS style icons.
      cupertino_icons: ^0.1.2
    
    dev_dependencies:
      flutter_test:
        sdk: flutter
    

    What things are written in it?

  • Hassan
    Hassan about 5 years
    Thanks can You Explain in detail
  • Mustufa Ansari
    Mustufa Ansari about 5 years
    have you used android studio?
  • Mustufa Ansari
    Mustufa Ansari about 5 years
    ok so you must know about android manifest file.. pubspec.yaml is same as android manifest..as sample as that :)