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.init({String appname = 'dcli'})
- Used internally be dcli to initialise the settings.
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.
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.
I'm so sorry.
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
- pathToDCli → String
-
The directory where we store all of dcli's
configuration files such as the cache.
This will normally be ~/.dcli
no setter
- pathToDCliBin → String
-
When you run dcli compile -i
no setter
- pathToDCliCache → String
-
Path to the dcli cache directory.
This will normally be ~/.dcli/cache
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
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
selectedFlags
→ List<
Flag> -
the list of global flags selected via the cli when dcli
was started.
no setter
- version ↔ String?
-
The DCli version you are running
getter/setter pair
Methods
-
isFlagSet(
Flag flag) → bool - A method to test with a specific global flag has been set.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent 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 Methods
-
reset(
) → void - Used when unit testing and we are re-using the current process.
Constants
- dcliCacheDir → const String
- The directory name of the DCli cache.
- templateDir → const String
- The directory name of the DCli templates.