OnBoarding:: Do not show 'clone' button untill the key is generated

This commit is contained in:
Vishesh Handa
2019-01-17 14:37:49 +01:00
parent 49e775203f
commit 708c3785a2

View File

@ -447,9 +447,16 @@ class OnBoardingSshKey extends StatelessWidget {
FocusScope.of(context).requestFocus(new FocusNode()); FocusScope.of(context).requestFocus(new FocusNode());
Widget copyAndDepoyWidget; Widget copyAndDepoyWidget;
Widget cloneButton;
if (this.publicKey.isEmpty) { if (this.publicKey.isEmpty) {
copyAndDepoyWidget = Container(); copyAndDepoyWidget = Container();
cloneButton = Container();
} else { } else {
cloneButton = OnBoardingButton(
text: "Clone Repo",
onPressed: this.doneFunction,
);
if (canOpenDeployKeyPage) { if (canOpenDeployKeyPage) {
copyAndDepoyWidget = Row( copyAndDepoyWidget = Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -525,10 +532,7 @@ class OnBoardingSshKey extends StatelessWidget {
publicKeyWidget, publicKeyWidget,
SizedBox(height: 8.0), SizedBox(height: 8.0),
copyAndDepoyWidget, copyAndDepoyWidget,
OnBoardingButton( cloneButton,
text: "Clone Repo",
onPressed: this.doneFunction,
),
], ],
); );
} }