completed group batch feature
This commit is contained in:
@@ -1,37 +1,50 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_sign_in/google_sign_in.dart';
|
||||
import 'package:qpay/http/http.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
class OnboardingModel {
|
||||
class RegistrationModel {
|
||||
String? email;
|
||||
String? firstName;
|
||||
String? lastName;
|
||||
String? phone;
|
||||
String? password;
|
||||
String? workflowId;
|
||||
String? username;
|
||||
GoogleSignInAccount? googleUser;
|
||||
bool isLoading = false;
|
||||
}
|
||||
|
||||
class OnboardingController extends ChangeNotifier {
|
||||
OnboardingModel model = OnboardingModel();
|
||||
RegistrationModel model = RegistrationModel();
|
||||
|
||||
void resetState() {
|
||||
model = OnboardingModel();
|
||||
model = RegistrationModel();
|
||||
}
|
||||
|
||||
void updateModel(Map mapModel) {
|
||||
model.workflowId = mapModel['workflowId'];
|
||||
model.phone = mapModel['phone'];
|
||||
model.username = mapModel['username'];
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
updatePhone(String phone) {
|
||||
void updateEmail(String email) {
|
||||
model.email = email;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void updateFirstName(String firstName) {
|
||||
model.firstName = firstName;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void updateLastName(String lastName) {
|
||||
model.lastName = lastName;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void updatePhone(String phone) {
|
||||
model.phone = phone;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
updateGoogleUser(GoogleSignInAccount googleUser) {
|
||||
model.googleUser = googleUser;
|
||||
void updatePassword(String password) {
|
||||
model.password = password;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user