init method
Implementation
Future<String?> init(BuildContext context) async {
String? result = await setClient(SSHModel(
username: LgConnectionSharedPref.getUserName() ?? '',
host: LgConnectionSharedPref.getIP() ?? '',
passwordOrKey: LgConnectionSharedPref.getPassword() ?? '',
port: int.parse(LgConnectionSharedPref.getPort() ?? '22'),
));
_username = LgConnectionSharedPref.getUserName() ?? '';
_host = LgConnectionSharedPref.getIP() ?? '';
_passwordOrKey = LgConnectionSharedPref.getPassword() ?? '';
_port = int.parse(LgConnectionSharedPref.getPort() ?? '22');
_numberOfScreens = LgConnectionSharedPref.getScreenAmount() ?? 3;
notifyListeners();
return result;
}