51 lines
1005 B
Dart
51 lines
1005 B
Dart
import 'package:flutter/foundation.dart';
|
|
|
|
class RegistrationModel {
|
|
String? email;
|
|
String? firstName;
|
|
String? lastName;
|
|
String? phone;
|
|
String? password;
|
|
String? workflowId;
|
|
bool isLoading = false;
|
|
}
|
|
|
|
class OnboardingController extends ChangeNotifier {
|
|
RegistrationModel model = RegistrationModel();
|
|
|
|
void resetState() {
|
|
model = RegistrationModel();
|
|
}
|
|
|
|
void updateModel(Map mapModel) {
|
|
model.workflowId = mapModel['workflowId'];
|
|
model.phone = mapModel['phone'];
|
|
notifyListeners();
|
|
}
|
|
|
|
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();
|
|
}
|
|
|
|
void updatePassword(String password) {
|
|
model.password = password;
|
|
notifyListeners();
|
|
}
|
|
}
|