SnapdClient class Null safety

Manages a connection to the snapd server.

Constructors

SnapdClient()

Properties

allowInteraction bool
True if snapd operations are allowed to interact with the user. This affects operations that use polkit authorisation.
read / write
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
userAgent String?
Sets the user agent sent in requests to snapd.
write-only

Methods

apps() Future<List<SnapApp>>
Gets the currently installed apps.
close() → void
Terminates all active connections. If a client remains unclosed, the Dart process may not terminate.
find({String? query, String? name, String? section}) Future<List<Snap>>
Searches for snaps. [...]
getChange(String id) Future<SnapdChange>
Gets the status the change with the given id.
install(List<String> names) Future<String>
Installs the snaps with the given names. Returns the change ID for this operation, use getChange to get the status of this operation.
loadAuthorization() Future<void>
Loads the saved authorization for this user.
login(String email, String password, {String? otp}) Future<SnapdLoginResponse>
Logs into the snap store.
logout() Future
Logs out of the snap store.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
refresh([List<String>? names]) Future<String>
Refreshes the snaps with the given names. If no names provided refreshes all snaps. Returns the change ID for this operation, use getChange to get the status of this operation.
remove(List<String> names) Future<String>
Removes the snaps with the given names. Returns the change ID for this operation, use getChange to get the status of this operation.
setAuthorization(String macaroon, List<String> discharges) → void
Sets the authorization used in the connection to snapd.
snaps() Future<List<Snap>>
Gets the currently installed snaps.
systemInfo() Future<SnapdSystemInfoResponse>
Gets information about the system that snapd is running on.
toString() String
A string representation of this object. [...]
inherited

Operators

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