Superuser class abstract final

A wrapper class that extract status of superuser as well as username.

By default, Superuser will load instance for specific platform automatically. If mock data is required, please attach MockSuperuser into SuperuserInstance.bindInstance before calling any getters in Superuser. However, attaching mock instance should not be done in kReleaseMode, which causes IllegalInstanceError throw.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

isActivated bool
Determine this program is running with superuser role.
no setter
isSuperuser bool
Determine this program is executed by a user, who is superuser exactly or one of members in superuser group.
no setter
whoAmI String
Obtain username who call current program.
no setter