JustProject class base
A Dart or Flutter project: the folder holding its pubspec.yaml.
Paths are relative to root and use / between parts, as lockfiles and
pubspecs write them.
- Available extensions
Constructors
- JustProject(String root)
-
The project whose
pubspec.yamlis inroot.
Properties
- exists → bool
-
Whether this folder holds a pubspec.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- root → String
-
The project folder, absolute, with
/between parts and no.or..parts.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
checkFormats(
) → List< FormatFinding> -
Available on JustProject, provided by the ProjectGame extension
Every versioned file in the project'sassets/, checked (FormatsCheck.check) and sorted by path. A file that can't be read is a finding too (FormatsCheck.unreadable). -
checkReleaseBuild(
String platform, {ReleaseRules? rules}) → ReleaseReport -
Available on JustProject, provided by the ProjectGame extension
The release build forplatform(one of ReleaseBuild.platforms), read frombuild/and checked (ReleaseBuild.check) againstrules, by default this game's releaseRules. -
devOnlyPlugins(
String platform) → Set< String> -
Available on JustProject, provided by the ProjectGame extension
The native plugins forplatformthat only dev dependencies bring, from.flutter-plugins-dependencies(ReleaseBuild.devOnlyPluginsIn). -
dir(
String relative) → Directory -
relativeas a folder. -
editorIsOpen(
{DateTime? now}) → bool -
Available on JustProject, provided by the ProjectGame extension
Whether the editor has this project open, as ofnow: its heartbeat file (EditorHeartbeat.path) is there and not stale (EditorHeartbeat.isStale). -
editorReachableFrom(
String entry, {ReleaseRules? rules}) → List< String> -
Available on JustProject, provided by the ProjectGame extension
Every way editor code is reachable fromentry(relative to the project), asentry -> uri -> uritrails; empty when none is. -
file(
String relative) → File -
relativeas a file. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
path(
String relative) → String -
The absolute path of
relative. -
pathTo(
String absolute) → String -
The path from root to
absolute: relative — with..when it is outside the project — whenever both are on the same drive (or share), so a project and what it points at can move together; elseabsolute. -
readProjectFile(
) → JustProjectFile -
The project's
just.json, or the defaults when it has none. ThrowsJsonFormatException(naming the file) when it exists but is not valid. -
readText(
String relative) → String? -
The text of
relative, or null when it doesn't exist. -
relativeOf(
String absolute) → String? -
absoluterelative to root, or null when it is outside it. -
releaseRules(
) → ReleaseRules -
Available on JustProject, provided by the ProjectGame extension
This game's release rules (ReleaseRules.forGame): from itsjust.json, its pubspec, its entry point (GameEntries.game) and what each installed store item declares (storeManifests). -
storeManifests(
) → Map< String, Map< String, Object?> > -
Available on JustProject, provided by the ProjectGame extension
Every installed store item's manifest (just_store.json), by id: the itemsjust_store.lock.jsonlists (ReleaseRules.storeItemsIn), each found at its recorded path or, when it has none, where pub put it. An item without a readable manifest is left out. -
toString(
) → String -
A string representation of this object.
inherited
-
writeProjectFile(
JustProjectFile file) → void -
Saves
fileas the project'sjust.json.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
find(
String start) → JustProject? -
The project holding
start— the nearest folder at or above it with apubspec.yaml— or null when there is none.
Constants
- changesDir → const String
-
Where changes in progress keep journals, backups, staging and the
project lock (
ProjectPaths.changesDir). - overrides → const String
-
The overrides file pub reads instead of the pubspec's overrides
(
ProjectPaths.overrides). - packagesDir → const String
-
The folder installed packages go into (
ProjectPaths.packagesDir). - projectFile → const String
-
The project's
just.json(ProjectPaths.projectFile): its title, tool set and entry points. - pubspec → const String
-
The project's pubspec (
ProjectPaths.pubspec). - workDir → const String
-
The tools' scratch folder (
ProjectPaths.workDir), for what may be lost:flutter cleandeletes it.