WindowsMixin mixin Null safety

Common code for Windows shells.

Mixin Applications

Properties

isPrivilegedPasswordRequired bool
Returns true if running a privileged action woulduser cause a password to be requested. [...]
read-only
loggedInUser String?
read-only
loggedInUsersHome String
Attempts to retrive the logged in user's home directory.
read-only
isSudo bool
On Windows this is always false.
read-only
installInstructions String
Returns the instructions to install DCli.
read-only
isPrivilegedUser bool
Returns true if the current process is running with elevated privileges e.g. Is running as an Administrator.
read-only
isPrivilegedProcess bool
Returns true if the current process is running with elevated privileges e.g. Is running as an Administrator.
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

checkInstallPreconditions() String?
Check if the shell has any notes re: pre-isntallation conditions.
inDeveloperMode() bool
Windows 10+ has a developer mode that needs to be enabled to create symlinks without escalated prividedges. For details on enabling dev mode on windows see: https://bsutton.gitbook.io/dcli/getting-started/installing-on-windows
install({bool installDart = true, bool activate = true}) bool
Called to install the windows specific dart/dcli components.
privilegesRequiredMessage(String app) String
addToPATH(String path) bool
Adds a path to the start script returns true if adding the path was successful
@Deprecated('Use appendToPATH')
appendToPATH(String path) bool
Appends path to the end of the PATH by updating the Windows Registry. We update the user's PATH (HKEY_CURRENT_USER) rather than the system path so this change will only affect the logged in user. [...]
prependToPATH(String path) bool
Prepend path to the end of the PATH by updating the Windows Registry. We update the user's PATH (HKEY_CURRENT_USER) rather than the system path so this change will only affect the logged in user. [...]
releasePrivileges() → void
NO OP under windows
restorePrivileges() → void
NO OP under windows
withPrivileges(RunPrivileged action, {bool allowUnprivileged = false}) → void
Run action with root UID and gid
addFileAssociation(String dcliPath) → void
Add a file association so that typing the name of a dart script on the cli launches dcli which in turn launches the script. [...]
addFileAssociationv2() → void
Add a file association so that typing the name of a dart script on the cli launches dcli which in turn launches the script. [...]
toString() String
A string representation of this object. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited