Prepare class

A class that prepares a package for installation.

Constructors

Prepare(Repo repo, Package package, {ArgResults? args})
Creates a new instance of the Prepare class.

Properties

args → ArgResults?
final
baseScript ↔ File
latefinal
booted ↔ bool
getter/setter pair
cacheRepoDir ↔ Future<Directory>
latefinal
channelChosen ↔ String
latefinal
forceMethod ↔ bool
latefinal
hashCode → int
The hash code for this object.
no setterinherited
package → Package
final
packageDir ↔ Future<Directory>
latefinal
packageName ↔ String
latefinal
packageScript ↔ BashScript
latefinal
preferredMethod ↔ String
latefinal
repo → Repo
final
repoSlug ↔ String
latefinal
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
skipMethods ↔ List<String>
getter/setter pair

Methods

baseScriptContents() → Future<String>
Returns the contents of the base script, if it exists.
best({String to = 'install'}) → Future<String>
Determines the best installation method based on the user's preferences and the operating system.
bestForAndroid({String to = 'install'}) → Future<String>
Determines the best installation method for Android.
bestForAny({String to = 'install'}) → Future<String>
Determines the best installation method for any operating system.
bestForAppImage({String to = 'install'}) → Future<String>
Determines the best installation method for package managers that work on any operating system.
bestForApt({String to = 'install'}) → Future<String>
Determines the best installation method for Debian-based Linux distributions.
bestForArch({String to = 'install'}) → Future<String>
Determines the best installation method for Arch Linux.
bestForClearLinux({String to = 'install'}) → Future<String>
Determines the best installation method for Clear Linux OS.
bestForFedora({String to = 'install'}) → Future<String>
Determines the best installation method for Fedora.
bestForFlatpak({String to = 'install'}) → Future<String>
Determines the best installation method for Flatpak.
bestForMacOS({String to = 'install'}) → Future<String>
Determines the best installation method for macOS.
bestForOpenSUSE({String to = 'install'}) → Future<String>
Determines the best installation method for OpenSUSE.
bestForSnap({String to = 'install'}) → Future<String>
Determines the best installation method for package managers that work on any operating system.
bestForWindows({String to = 'install'}) → Future<String>
Determines the best installation method for Windows.
boot() → Future<void>
Initializes the class by setting some properties and loading the package script.
dynamicCode() → Future<String>
Generates the dynamic code that will be added to the script.
findBest(String to) → Future<String>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
stopIfForcedMethodNotFound() → void
toInstall() → Future<String>
Generates a script to install the package.
toRemove() → Future<String>
Generates a script to remove the package.
toString() → String
A string representation of this object.
inherited
toValidate({bool removing = false}) → Future<String>
Generates a script to validate the package installation.
useMethod(String to) → Future<String>
writeThisBeast(String script) → Future<File>
Writes the given script to a file in the cache directory.

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

distro → String
final
distroLike → List<String>
final
errorOnUpdate → String
final