Settings class

Holds all of the global settings for DCli including dcli paths and any global flags passed on the command line to DCli.

Constructors

Settings()
Returns a singleton providing access to DCli settings.
factory
Settings.forScope()
To use this method create a Scope and inject this as a value into the scope.
factory

Properties

dcliDir ↔ String
The name of the dcli settings directory. This is .dcli.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
installCompletedIndicator → String
returns the path to the file that we use to indicated that the install completed succesfully.
no setter
isInstalled → bool
we consider dcli installed if the ~/.dcli directory exists.
no setter
isLinux → bool
True if you are running on a Linux system.
no setter
isMacOS → bool
True if you are running on a Mac.
no setter
isStackEmpty → bool
Returns true if the directory stack maintained by push and pop has is currently empty.
no setter
isVerbose → bool
returns true if the -v (verbose) flag was set on the dcli command line. e.g. dcli -v clean
no setter
isWindows → bool
True if you are running on a Window system.
no setter
logger → Logger
no setter
pathToDCli → String
The directory where we store all of dcli's configuration files. This will normally be ~/.dcli
no setter
pathToDCliBin → String
When you run dcli compile -i <script> the compiled exe is moved to this path.
no setter
pathToScript → String
The absolute path to the dcli script which is currently running.
no setter
pathToTemplate → String
path to the dcli template directory.
no setter
pathToTemplateProject → String
path to the dcli template directory.
no setter
pathToTemplateProjectCustom → String
Path to the directory where users can store their own custom templates
no setter
pathToTemplateScript → String
path to the dcli template directory.
no setter
pathToTemplateScriptCustom → String
Path to the directory where users can store their own custom templates
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
version ↔ String?
The DCli version you are running
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setVerbose({required bool enabled}) → void
Turns on verbose logging.
toString() → String
A string representation of this object.
inherited
verbose(String? string) → void
Logs a message to the console if the verbose settings are on.

Operators

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

Static Properties

mock ← Settings
Used for unit testing dcli. Please look away.
no getter
scopeKey ↔ ScopeKey<Settings>
getter/setter pair

Constants

dcliAppName → const String
The name of the DCli app. This will always be 'dcli'.
templateDir → const String
The directory name of the DCli templates.