form done

This commit is contained in:
RafayAhmad7548 2025-07-22 14:35:22 +05:00
parent 02dc3e5757
commit bd8884787d
10 changed files with 200 additions and 28 deletions

36
lib/user.dart Normal file
View file

@ -0,0 +1,36 @@
import 'dart:convert';
class Connection {
String? host;
int? port;
String? username;
String? privateKeyFilePath;
String? password;
Connection();
Connection.fromJson(Map<String, dynamic> json) {
host = json['host'];
port = json['port'];
username = json['username'];
privateKeyFilePath = json['privateKeyFilePath)'];
password = json['password'];
}
String get toJson => jsonEncode({
'host': host,
'port': port,
'username': username,
'privateKeyFilePath': privateKeyFilePath,
'password': password
});
bool assertComplete() {
assert(host != null);
assert(port != null);
assert(username != null);
assert(privateKeyFilePath != null || password != null);
return true;
}
}