-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from fga-eps-mds/feat#58/implementa_onboarding
fix(#58) Melhora Front e arruma responsividade
- Loading branch information
Showing
7 changed files
with
153 additions
and
170 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,26 @@ | ||
// lib/view_model/onboarding_view_model.dart | ||
import 'package:aranduapp/ui/login/view/LoginView.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
class OnboardingViewModel extends ChangeNotifier { | ||
int _currentStep = 0; | ||
final PageController pageController = PageController(); | ||
int currentPage = 0; | ||
|
||
// Dados do onboarding removidos | ||
|
||
int get currentStep => _currentStep; | ||
int get totalSteps => 3; // Definindo um número fixo de etapas | ||
|
||
void nextStep() { | ||
if (_currentStep < totalSteps - 1) { | ||
_currentStep++; | ||
notifyListeners(); | ||
} | ||
void goToNextPage() { | ||
pageController.nextPage( | ||
duration: const Duration(milliseconds: 300), | ||
curve: Curves.easeIn, | ||
); | ||
} | ||
|
||
void previousStep() { | ||
if (_currentStep > 0) { | ||
_currentStep--; | ||
notifyListeners(); | ||
} | ||
void updateCurrentPage(int page) { | ||
currentPage = page; | ||
notifyListeners(); | ||
} | ||
|
||
void completeOnboarding() { | ||
// Aqui você pode armazenar o estado para indicar que o onboarding foi concluído. | ||
// Por exemplo, usando SharedPreferences ou outro armazenamento local. | ||
print("Onboarding concluído!"); | ||
void navigateToNextPage(BuildContext context) { | ||
Navigator.pushReplacement( | ||
context, | ||
MaterialPageRoute(builder: (context) => const Login()), | ||
); | ||
} | ||
} |
Oops, something went wrong.