mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 02:07:39 +08:00
Fix new flutter analyze problems
Flutter analyze seems to have gotten smarter
This commit is contained in:
@ -62,6 +62,8 @@ class GitCloneUrlPageState extends State<GitCloneUrlPage> {
|
|||||||
if (!regExp.hasMatch(value)) {
|
if (!regExp.hasMatch(value)) {
|
||||||
return "Invalid Input";
|
return "Invalid Input";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
},
|
},
|
||||||
focusNode: inputFormFocus,
|
focusNode: inputFormFocus,
|
||||||
textInputAction: TextInputAction.done,
|
textInputAction: TextInputAction.done,
|
||||||
@ -158,6 +160,8 @@ class GitCloneUrlKnownProviderPageState
|
|||||||
if (!regExp.hasMatch(value)) {
|
if (!regExp.hasMatch(value)) {
|
||||||
return "Invalid Input";
|
return "Invalid Input";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
},
|
},
|
||||||
focusNode: inputFormFocus,
|
focusNode: inputFormFocus,
|
||||||
textInputAction: TextInputAction.done,
|
textInputAction: TextInputAction.done,
|
||||||
|
@ -286,15 +286,16 @@ class GitHostSetupScreenState extends State<GitHostSetupScreen> {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return WillPopScope(
|
return WillPopScope(
|
||||||
onWillPop: () {
|
onWillPop: () async {
|
||||||
if (_currentPageIndex != 0) {
|
if (_currentPageIndex != 0) {
|
||||||
pageController.previousPage(
|
pageController.previousPage(
|
||||||
duration: Duration(milliseconds: 200),
|
duration: Duration(milliseconds: 200),
|
||||||
curve: Curves.easeIn,
|
curve: Curves.easeIn,
|
||||||
);
|
);
|
||||||
} else {
|
return false;
|
||||||
Navigator.pop(context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
child: scaffold,
|
child: scaffold,
|
||||||
);
|
);
|
||||||
|
@ -52,6 +52,7 @@ class SettingsListState extends State<SettingsList> {
|
|||||||
if (value.isEmpty) {
|
if (value.isEmpty) {
|
||||||
return 'Please enter a name';
|
return 'Please enter a name';
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
},
|
},
|
||||||
textInputAction: TextInputAction.done,
|
textInputAction: TextInputAction.done,
|
||||||
onFieldSubmitted: saveGitAuthor,
|
onFieldSubmitted: saveGitAuthor,
|
||||||
@ -89,6 +90,7 @@ class SettingsListState extends State<SettingsList> {
|
|||||||
if (!emailValid) {
|
if (!emailValid) {
|
||||||
return 'Please enter a valid email';
|
return 'Please enter a valid email';
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
},
|
},
|
||||||
textInputAction: TextInputAction.done,
|
textInputAction: TextInputAction.done,
|
||||||
onFieldSubmitted: saveGitAuthorEmail,
|
onFieldSubmitted: saveGitAuthorEmail,
|
||||||
|
Reference in New Issue
Block a user