mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-28 18:03:14 +08:00
GenerateSSHKey with a comment for GitJournal
This commit is contained in:
@ -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;
|
||||||
|
@ -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) {
|
||||||
|
Reference in New Issue
Block a user