SSHprovider class
This is a Provider class of SSHprovider that extends ChangeNotifier They all have setters and getters We have saveData method to save data into the form using SSHModel init is the function that sets the client with its data when connected execute is used to execute a specefic command when connecting with the client uploadKml is used to upload a file as kml disconnect is used for disconnecting the client reconnectClient for connecting the client again in case the connection is lost while app is running
- Inheritance
-
- Object
- ChangeNotifier
- SSHprovider
Constructors
Properties
- client → SSHClient?
-
Property that gets the SSH client instance.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- host ↔ String?
-
getter/setter pair
- numberOfScreens ↔ int?
-
getter/setter pair
- passwordOrKey ↔ String?
-
getter/setter pair
- port ↔ int?
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sshData → SSHModel
-
no setter
- username ↔ String?
-
getter/setter pair
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
disconnect(
) → Future< SSHClient> - Disconnects from the a machine using the current client.
-
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
inherited
-
execute(
String command) → Future< SSHSession> - Connects to the current client, executes a command into it and then disconnects.
-
init(
BuildContext context) → Future< String?> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
reconnectClient(
SSHModel ssh, BuildContext context) → Future< String?> -
reconnects with the client again every 30 seconds while the app is running with given
ssh
info -
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
saveData(
String host, String username, String passwordOrKey, int port, int screenAmount) → void -
setClient(
SSHModel ssh) → Future< String?> -
Sets a client with the given
ssh
info. -
toString(
) → String -
A string representation of this object.
inherited
-
uploadKml(
File inputFile, String filename) → dynamic - Connects to the current client through SFTP, uploads a file into it and then disconnects. uploading kml file
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited