copywith y nickname
This commit is contained in:
@@ -4,8 +4,6 @@ import 'package:injector/injector.dart';
|
||||
import 'package:prosappco/blocs/authentication_bloc/authentication_bloc.dart';
|
||||
import 'package:prosappco/blocs/my_user_bloc/my_user_bloc.dart';
|
||||
import 'package:prosappco/blocs/profile_bloc/profile_bloc.dart';
|
||||
import 'package:prosappco/blocs/sign_up_bloc/sign_up_bloc.dart';
|
||||
import 'package:prosappco/blocs/sing_in_bloc/sign_in_bloc.dart';
|
||||
|
||||
import 'app_view.dart';
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class SignUpBloc extends Bloc<SignUpEvent, SignUpState> {
|
||||
SignUpRequired event, Emitter<SignUpState> emit) async {
|
||||
emit(SignUpProcess());
|
||||
try {
|
||||
MyUser user = await _userRepository.signUp(event.email, event.password);
|
||||
MyUser user = await _userRepository.signUp(event.user, event.password);
|
||||
await _userRepository.setUserData(user);
|
||||
emit(SignUpSuccess());
|
||||
} catch (e) {
|
||||
|
||||
@@ -8,9 +8,8 @@ abstract class SignUpEvent extends Equatable {
|
||||
}
|
||||
|
||||
class SignUpRequired extends SignUpEvent {
|
||||
final String email;
|
||||
final MyUser user;
|
||||
final String password;
|
||||
|
||||
const SignUpRequired({required this.email, required this.password});
|
||||
// const SignUpRequired(this.email, this.password);
|
||||
const SignUpRequired(this.user, this.password);
|
||||
}
|
||||
|
||||
@@ -227,9 +227,7 @@ class _SignUpScreenState extends State<SignUpScreen> {
|
||||
|
||||
setState(() {
|
||||
context.read<SignUpBloc>().add(SignUpRequired(
|
||||
email: emailController.text,
|
||||
password: passwordController.text,
|
||||
));
|
||||
myUser, passwordController.text));
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user