Skip to content

Instantly share code, notes, and snippets.

@alperefesahin
Created February 2, 2022 05:51
Show Gist options
  • Save alperefesahin/66ca04a133e03a936d26186d6be36ad2 to your computer and use it in GitHub Desktop.
Save alperefesahin/66ca04a133e03a936d26186d6be36ad2 to your computer and use it in GitHub Desktop.
part of 'login_cubit.dart';
class LoginState extends Equatable {
const LoginState({
this.email = const Email.pure(),
this.password = const Password.pure(),
this.status = FormzStatus.pure,
this.exceptionError = "",
});
final Email email;
final Password password;
final FormzStatus status;
final String exceptionError;
@override
List<Object> get props => [email, password, status, exceptionError];
LoginState copyWith({
Email? email,
Password? password,
FormzStatus? status,
String? exceptionError,
}) {
return LoginState(
email: email ?? this.email,
password: password ?? this.password,
status: status ?? this.status,
exceptionError: exceptionError ?? this.exceptionError,
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment