Fix new flutter analyze problems

Flutter analyze seems to have gotten smarter
This commit is contained in:
Vishesh Handa
2019-07-18 01:13:39 +02:00
parent 74d7bdd763
commit 2bfd05a532
3 changed files with 10 additions and 3 deletions

View File

@ -62,6 +62,8 @@ class GitCloneUrlPageState extends State<GitCloneUrlPage> {
if (!regExp.hasMatch(value)) {
return "Invalid Input";
}
return null;
},
focusNode: inputFormFocus,
textInputAction: TextInputAction.done,
@ -158,6 +160,8 @@ class GitCloneUrlKnownProviderPageState
if (!regExp.hasMatch(value)) {
return "Invalid Input";
}
return null;
},
focusNode: inputFormFocus,
textInputAction: TextInputAction.done,

View File

@ -286,15 +286,16 @@ class GitHostSetupScreenState extends State<GitHostSetupScreen> {
);
return WillPopScope(
onWillPop: () {
onWillPop: () async {
if (_currentPageIndex != 0) {
pageController.previousPage(
duration: Duration(milliseconds: 200),
curve: Curves.easeIn,
);
} else {
Navigator.pop(context);
return false;
}
return true;
},
child: scaffold,
);

View File

@ -52,6 +52,7 @@ class SettingsListState extends State<SettingsList> {
if (value.isEmpty) {
return 'Please enter a name';
}
return null;
},
textInputAction: TextInputAction.done,
onFieldSubmitted: saveGitAuthor,
@ -89,6 +90,7 @@ class SettingsListState extends State<SettingsList> {
if (!emailValid) {
return 'Please enter a valid email';
}
return null;
},
textInputAction: TextInputAction.done,
onFieldSubmitted: saveGitAuthorEmail,