copyWith method
Implementation
UserLoginState copyWith({
Object? userName = _sentinal,
Object? password = _sentinal,
bool? isLoading,
String? errorMessage,
bool? isSuccess,
}) {
return UserLoginState(
userName: userName == _sentinal ? this.userName : userName as String?,
password: password == _sentinal ? this.password : password as String?,
isLoading: isLoading ?? this.isLoading,
errorMessage: errorMessage,
isSuccess: isSuccess ?? this.isSuccess,
);
}