Settings class Null safety
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
- appname → String
-
The name of the DCli app. This will
always be 'dcli'.
final
- dcliDir ↔ String
-
The name of the dcli settings directory.
This is .dcli.
read / write
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- installCompletedIndicator → String
-
returns the path to the file that we use to indicated
that the install completed succesfully.
read-only
- isInstalled → bool
-
we consider dcli installed if the ~/.dcli directory
exists.
read-only
- isLinux → bool
-
True if you are running on a Linux system.
read-only
- isMacOS → bool
-
True if you are running on a Mac.
read-only
- isStackEmpty → bool
-
Returns true if the directory stack
maintained by push and pop has
is currently empty. [...]
@Deprecated('use join'), read-only
- isVerbose → bool
-
returns true if the -v (verbose) flag was set on the
dcli command line.
e.g.
dcli -v clean
read-only
- isWindows → bool
-
True if you are running on a Window system.
read-only
- logger → Logger
-
read-only
- pathToDCli → String
-
The directory where we store all of dcli's
configuration files.
This will normally be ~/.dcli
read-only
- pathToDCliBin → String
-
When you run dcli compile -i
<script>
the compiled exe is moved to this path. [...]read-only - pathToScript → String
-
The absolute path to the dcli script which
is currently running.
@Deprecated('Use Script.current.pathToScript'), read-only
- pathToTemplate → String
-
path to the dcli template directory.
@Deprecated('Use pathToTemplateScript or pathToTemplateProject'), read-only
- pathToTemplateProject → String
-
path to the dcli template directory.
read-only
- pathToTemplateProjectCustom → String
-
Path to the directory where users can store their own custom templates
read-only
- pathToTemplateScript → String
-
path to the dcli template directory.
read-only
- pathToTemplateScriptCustom → String
-
Path to the directory where users can store their own custom templates
read-only
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
-
selectedFlags
→ List<
Flag> -
the list of global flags selected via the cli when dcli
was started.
read-only
- version ↔ String?
-
The DCli version you are running
read / write
Methods
-
isFlagSet(
Flag flag) → bool - A method to test with a specific global flag has been set. [...]
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
setFlag(
Flag flag) → void - A method to set a global flag.
-
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
Constants
- templateDir → const String
-
The directory name of the DCli templates.
'template'