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() {
super.initState();
generateSSHKeys().then((String _publicKey) {
generateSSHKeys(comment: "GitJournal").then((String _publicKey) {
setState(() {
print("Changing the state");
publicKey = _publicKey;

View File

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