OnBoarding: Trim the gitClone url just in case

This commit is contained in:
Vishesh Handa
2019-01-16 22:54:23 +01:00
parent 3d88ed9c05
commit 0aa2b1f4eb
2 changed files with 3 additions and 2 deletions

View File

@ -41,7 +41,8 @@ class OnBoardingGitUrlState extends State<OnBoardingGitUrl> {
decoration: const InputDecoration( decoration: const InputDecoration(
hintText: 'Eg: git@github.com:GitJournal/GitJournal.git', hintText: 'Eg: git@github.com:GitJournal/GitJournal.git',
), ),
validator: (value) { validator: (String value) {
value = value.trim();
if (value.isEmpty) { if (value.isEmpty) {
return 'Please enter some text'; return 'Please enter some text';
} }

View File

@ -111,7 +111,7 @@ class OnBoardingScreenState extends State<OnBoardingScreen> {
); );
// We aren't calling setState as this isn't being used for rendering // We aren't calling setState as this isn't being used for rendering
_gitCloneUrl = sshUrl; _gitCloneUrl = sshUrl.trim();
this._generateSshKey(); this._generateSshKey();