Git Clone: Cleanup code

This commit is contained in:
Vishesh Handa
2019-01-07 13:34:21 +01:00
parent ae6158a0a8
commit 0ba4bf68d1
3 changed files with 34 additions and 55 deletions

View File

@ -45,22 +45,24 @@ Future gitClone() async {
const platform = const MethodChannel('gitjournal.io/git');
print("Going to git clone");
await platform.invokeMethod('gitClone', {
'cloneUrl': "root@bcn.vhanda.in:git/notes",
'filePath': "/",
});
print("FOO");
try {
await platform.invokeMethod('gitClone', {
'cloneUrl': "root@bcn.vhanda.in:git/notes",
'folderName': "journal",
});
print("Done");
} on PlatformException catch (e) {
print("gitClone Failed: '${e.message}'.");
}
}
Future generateSSHKeys() async {
print("generateSSHKeys");
print("generateSSHKeyss");
try {
const platform = const MethodChannel('gitjournal.io/git');
String publicKey = await platform.invokeMethod('generateSSHKeys', {});
print("Public Key " + publicKey);
} on PlatformException catch (e) {
print("Failed to generateSSHKeys: '${e.message}'.");
} catch (e) {
print("EX: '${e.message}'.");
}
}