oke coba lagi
This commit is contained in:
parent
6298e52974
commit
8cc89199c7
|
|
@ -10,11 +10,11 @@ class SignUpBloc extends Bloc<SignUpEvent, SignUpState> {
|
|||
|
||||
SignUpBloc(this._userRepository) : super(SignUpInitial()) {
|
||||
on<SignUpRequired>((event, emit) async {
|
||||
emit(SignUpProccess());
|
||||
emit(SignUpProcess());
|
||||
try {
|
||||
MyUser myUser = await _userRepository.signUp(event.user, event.password);
|
||||
await _userRepository.setUserData(myUser);
|
||||
emit(SignUpProccess());
|
||||
emit(SignUpProcess());
|
||||
} catch (e) {
|
||||
emit(SignUpFailure());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,4 +11,4 @@ final class SignUpInitial extends SignUpState {}
|
|||
|
||||
final class SignUpSuccess extends SignUpState {}
|
||||
final class SignUpFailure extends SignUpState {}
|
||||
final class SignUpProccess extends SignUpState {}
|
||||
final class SignUpProcess extends SignUpState {}
|
||||
|
|
@ -35,7 +35,7 @@ class _SignUpScreenState extends State<SignUpScreen> {
|
|||
setState(() {
|
||||
signUpRequired = false;
|
||||
});
|
||||
} else if(state is SignUpProccess) {
|
||||
} else if(state is SignUpProcess) {
|
||||
setState(() {
|
||||
signUpRequired = true;
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue