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