style(authentication): Merge 'origin/master' into authentication/feature/google_signin

This commit is contained in:
2022-12-13 16:42:50 -05:00
68 changed files with 180 additions and 243 deletions
@@ -20,6 +20,7 @@ part 'exceptions_firebase.dart';
abstract class AuthenticationFailureInterface extends AppException
implements Exception {
AuthenticationFailureInterface(this.code, this.msg);
AuthenticationFailureInterface.fromCode(this.code)
: msg = 'An unknown error occurred.';
@@ -20,8 +20,8 @@ import 'package:wyatt_type_utils/wyatt_type_utils.dart';
class AuthenticationCacheDataSourceImpl<T extends Object>
extends AuthenticationCacheDataSource<T> {
AuthenticationCacheDataSourceImpl();
AuthenticationCacheDataSourceImpl();
Account? _account;
T? _data;
@@ -21,11 +21,11 @@ import 'package:wyatt_authentication_bloc/wyatt_authentication_bloc.dart';
import 'package:wyatt_type_utils/wyatt_type_utils.dart';
class AuthenticationMockDataSourceImpl extends AuthenticationRemoteDataSource {
AuthenticationMockDataSourceImpl({
this.idToken = 'fake-id-token',
this.registeredAccounts,
});
Pair<Account, String>? _connectedMock;
Pair<Account, String>? _registeredMock;
DateTime _lastSignInTime = DateTime.now();
@@ -93,7 +93,6 @@ class AuthenticationRepositoryImpl<T extends Object>
),
);
}
final AuthenticationCacheDataSource<T> _authenticationLocalDataSource;
final AuthenticationRemoteDataSource _authenticationRemoteDataSource;
@@ -26,6 +26,7 @@ import 'package:wyatt_type_utils/wyatt_type_utils.dart';
part 'authentication_state.dart';
class AuthenticationCubit<Extra> extends Cubit<AuthenticationState<Extra>> {
AuthenticationCubit({
required AuthenticationRepository<Extra> authenticationRepository,
}) : _authenticationRepository = authenticationRepository,
@@ -17,6 +17,7 @@
part of 'authentication_cubit.dart';
class AuthenticationState<Extra> extends Equatable {
const AuthenticationState.unauthenticated()
: this._(status: AuthenticationStatus.unauthenticated);
@@ -22,7 +22,6 @@ class SignInState extends FormDataState {
super.status = FormStatus.pure,
super.errorMessage,
});
FormInputValidator<String?, ValidationError> get email =>
form.validatorOf(AuthFormField.email);
FormInputValidator<String?, ValidationError> get password =>
@@ -17,6 +17,7 @@
part of 'sign_up_cubit.dart';
class SignUpState extends FormDataState {
const SignUpState({
required super.form,
super.status = FormStatus.pure,