GenerateSSHKey with a comment for GitJournal

This commit is contained in:
Vishesh Handa
2019-01-10 17:54:55 +01:00
parent 31d19678e3
commit 7ba58cdf14
2 changed files with 5 additions and 3 deletions

View File

@ -139,7 +139,7 @@ class OnBoardingSshKeyState extends State<OnBoardingSshKey> {
void initState() { void initState() {
super.initState(); super.initState();
generateSSHKeys().then((String _publicKey) { generateSSHKeys(comment: "GitJournal").then((String _publicKey) {
setState(() { setState(() {
print("Changing the state"); print("Changing the state");
publicKey = _publicKey; publicKey = _publicKey;

View File

@ -29,10 +29,12 @@ Future<String> gitClone(String cloneUrl, String folderName) async {
return null; return null;
} }
Future<String> generateSSHKeys() async { Future<String> generateSSHKeys({comment: ""}) async {
print("generateSSHKeyss"); print("generateSSHKeyss");
try { try {
String publicKey = await _platform.invokeMethod('generateSSHKeys', {}); String publicKey = await _platform.invokeMethod('generateSSHKeys', {
comment: comment,
});
print("Public Key " + publicKey); print("Public Key " + publicKey);
return publicKey; return publicKey;
} on PlatformException catch (e) { } on PlatformException catch (e) {