37 lines
825 B
Dart
37 lines
825 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:google_sign_in/google_sign_in.dart';
|
|
import 'package:qpay/http/http.dart';
|
|
|
|
class OnboardingModel {
|
|
String? phone;
|
|
String? workflowId;
|
|
String? username;
|
|
GoogleSignInAccount? googleUser;
|
|
bool isLoading = false;
|
|
}
|
|
|
|
class OnboardingController extends ChangeNotifier {
|
|
OnboardingModel model = OnboardingModel();
|
|
|
|
void resetState() {
|
|
model = OnboardingModel();
|
|
}
|
|
|
|
void updateModel(Map mapModel) {
|
|
model.workflowId = mapModel['workflowId'];
|
|
model.phone = mapModel['phone'];
|
|
model.username = mapModel['username'];
|
|
notifyListeners();
|
|
}
|
|
|
|
updatePhone(String phone) {
|
|
model.phone = phone;
|
|
notifyListeners();
|
|
}
|
|
|
|
updateGoogleUser(GoogleSignInAccount googleUser) {
|
|
model.googleUser = googleUser;
|
|
notifyListeners();
|
|
}
|
|
|
|
} |