fix: stepper submission data
This commit is contained in:
parent
5e97154100
commit
d672a23564
|
@ -1,6 +1,7 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<application
|
||||
android:label="cims_apps"
|
||||
android:label="cims investment"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:enableOnBackInvokedCallback="true"
|
||||
|
|
|
@ -175,7 +175,9 @@ class DisplayPictureScreen extends StatelessWidget {
|
|||
marginVertical: 8.0,
|
||||
name: 'Next',
|
||||
onPressed: () {
|
||||
routePush(context, page: SubmissionParent());
|
||||
provider.nextSubmission(context);
|
||||
routePush(context,
|
||||
page: const SubmissionParent());
|
||||
},
|
||||
),
|
||||
),
|
||||
|
|
|
@ -101,7 +101,7 @@ class _SubmissionParentState extends State<SubmissionParent> {
|
|||
provider.stepAmount,
|
||||
(index) => _stepItem(
|
||||
isCurrentStep:
|
||||
provider.currentStep == index + 1,
|
||||
provider.getCurrentStep == index + 1,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -110,10 +110,10 @@ class _SubmissionParentState extends State<SubmissionParent> {
|
|||
child: Container(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
child: _content(provider.currentStep),
|
||||
child: _content(provider.getCurrentStep),
|
||||
),
|
||||
),
|
||||
provider.currentStep == 3
|
||||
provider.getCurrentStep == 3
|
||||
? const SizedBox()
|
||||
: Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
|
|
|
@ -2,7 +2,8 @@ import 'package:camera/camera.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class SubmissionDataViewModel extends ChangeNotifier {
|
||||
int currentStep = 1;
|
||||
static int _currentStep = 1;
|
||||
int get getCurrentStep => _currentStep;
|
||||
int stepAmount = 9;
|
||||
bool _isEmailVerify = false;
|
||||
bool get isEmailVerify => _isEmailVerify;
|
||||
|
@ -19,8 +20,8 @@ class SubmissionDataViewModel extends ChangeNotifier {
|
|||
}
|
||||
|
||||
onWillPopSubmission(BuildContext context) {
|
||||
if (currentStep != 1) {
|
||||
currentStep--;
|
||||
if (getCurrentStep != 1) {
|
||||
_currentStep--;
|
||||
notifyListeners();
|
||||
} else {
|
||||
Navigator.of(context).pop(true);
|
||||
|
@ -28,8 +29,8 @@ class SubmissionDataViewModel extends ChangeNotifier {
|
|||
}
|
||||
|
||||
nextSubmission(BuildContext context) {
|
||||
if (currentStep < stepAmount) {
|
||||
currentStep++;
|
||||
if (getCurrentStep < stepAmount) {
|
||||
_currentStep++;
|
||||
} else {
|
||||
//ToDo : Go To next step after completing the submission
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user