import 'package:flutter/material.dart'; class SubmissionDataViewModel extends ChangeNotifier { int currentStep = 1; int stepAmount = 9; bool _isEmailVerify = false; bool get isEmailVerify => _isEmailVerify; submitEmail() { _isEmailVerify = !_isEmailVerify; notifyListeners(); } onWillPopSubmission(BuildContext context) { if (currentStep != 1) { currentStep--; notifyListeners(); } else { Navigator.of(context).pop(true); } } nextSubmission(BuildContext context) { if (currentStep < stepAmount) { currentStep++; } else { //ToDo : Go To next step after completing the submission } notifyListeners(); } }