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.yaml is in root.

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's assets/, 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 for platform (one of ReleaseBuild.platforms), read from build/ and checked (ReleaseBuild.check) against rules, by default this game's releaseRules.
devOnlyPlugins(String platform) → Set<String>

Available on JustProject, provided by the ProjectGame extension

The native plugins for platform that only dev dependencies bring, from .flutter-plugins-dependencies (ReleaseBuild.devOnlyPluginsIn).
dir(String relative) → Directory
relative as a folder.
editorIsOpen({DateTime? now}) → bool

Available on JustProject, provided by the ProjectGame extension

Whether the editor has this project open, as of now: 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 from entry (relative to the project), as entry -> uri -> uri trails; empty when none is.
file(String relative) → File
relative as 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; else absolute.
readProjectFile() → JustProjectFile
The project's just.json, or the defaults when it has none. Throws JsonFormatException (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?
absolute relative 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 its just.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 items just_store.lock.json lists (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 file as the project's just.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 a pubspec.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 clean deletes it.