isConnected method
Checks to see if the SSH client is currently connected.
await client.isConnected();
Implementation
Future<bool> isConnected() async {
bool connected = false; // default to false
var result = await _channel.invokeMethod('flutterIsConnected', {
"id": id,
});
if (result == "true") {
// results returns a string, therefore we need to check the string 'true'
connected = true;
}
return connected;
}