Project class
Represents a Flutter project.
This class provides methods and properties related to a Flutter project, such as retrieving the project name, the active flavor, caching paths, and pubspec-related operations.
- Mixed in types
- Annotations
-
- @MappableClass(includeCustomMappers: [PubspecMapper()])
Constructors
- Project({required ProjectConfig? config, required String path, required PubSpec? pubspec})
-
Creates a new instance of Project.
const
Properties
- activeFlavor → String?
-
Retrieves the active configured flavor of the project.
no setter
- config → ProjectConfig?
-
The configuration of the project, if available.
final
- configPath → String
-
Returns the path of the FVM config file.
no setter
-
copyWith
→ ProjectCopyWith<
Project, Project, Project> -
no setterinherited
- dartToolGeneratorVersion → String?
-
Retrieves the dart tool package config.
no setter
- dartToolVersion → String?
-
Retrieves the dart tool version from file.
no setter
-
flavors
→ Map<
String, String> -
Retrieves the flavors defined in the project's
fvm.yaml
file.no setter - gitIgnoreFile → File
-
Indicates whether the project has
.gitignore
file.no setter - gitIgnorePath → String
-
no setter
- hasConfig → bool
-
Indicates whether the project has an FVM config file.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasPubspec → bool
-
Indicates whether the project has a pubspec.yaml file.
no setter
- isFlutter → bool
-
Indicates whether the project is a Flutter project.
no setter
- legacyConfigPath → String
-
Returns legacy path of the FVM config file.
no setter
- localFvmPath → String
-
Retrieves the local FVM path of the project.
no setter
- localVersionsCachePath → String
-
Retrieves the local FVM cache path of the project.
no setter
- localVersionSymlinkPath → String
-
Returns the path of the Flutter SDK symlink within the project.
no setter
- name → String
-
Retrieves the name of the project.
no setter
- path → String
-
The directory path of the project.
final
- pinnedVersion → FlutterVersion?
-
Retrieves the pinned Flutter SDK version within the project.
no setter
- pubspec → PubSpec?
-
final
- pubspecPath → String
-
Returns the path of the pubspec.yaml file.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sdkConstraint → VersionConstraint?
-
Retrieves the Flutter SDK constraint from the pubspec.yaml file.
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → String -
inherited
-
toMap(
) → Map< String, dynamic> -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
Static Methods
-
loadFromPath(
String path) → Project -
Loads the Flutter project from the given
path
.