重构
This commit is contained in:
@@ -161,30 +161,6 @@ class _SpGuidePageState extends State<SpGuidePage>
|
||||
}
|
||||
}
|
||||
|
||||
void _skipToEnd() {
|
||||
if (_currentPage == 1) {
|
||||
if (!_agreementAccepted) {
|
||||
_showNeedAcceptAgreementDialog();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (_currentPage == 2) {
|
||||
if (!_agreementAccepted) {
|
||||
_showNeedAcceptAgreementDialog();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (_pageController.hasClients) {
|
||||
_pageController.animateToPage(
|
||||
_totalPages - 1,
|
||||
duration: const Duration(milliseconds: 500),
|
||||
curve: Curves.easeInOut,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void _showNeedAcceptAgreementDialog() {
|
||||
showDialog(
|
||||
context: context,
|
||||
|
||||
Reference in New Issue
Block a user