|
1 | 1 | import 'dart:async';
|
2 | 2 |
|
3 | 3 | import 'package:authentication_repository/authentication_repository.dart';
|
4 |
| -import 'package:authentication_repository/src/crypto.dart'; |
| 4 | +import 'package:authentication_repository/src/crypto_api.dart'; |
5 | 5 | import 'package:cache/cache.dart';
|
6 | 6 | import 'package:firebase_auth/firebase_auth.dart' as firebase_auth;
|
7 | 7 | import 'package:flutter/foundation.dart' show kIsWeb;
|
@@ -32,15 +32,17 @@ class AuthenticationRepository {
|
32 | 32 | AuthenticationRepository({
|
33 | 33 | CacheClient? cache,
|
34 | 34 | firebase_auth.FirebaseAuth? firebaseAuth,
|
35 |
| - GoogleSignIn? googleSignIn |
| 35 | + GoogleSignIn? googleSignIn, |
| 36 | + CryptoApi? cryptoApi |
36 | 37 | }) : _cache = cache ?? CacheClient(),
|
37 | 38 | _firebaseAuth = firebaseAuth ?? firebase_auth.FirebaseAuth.instance,
|
38 |
| - _googleSignIn = googleSignIn ?? GoogleSignIn.standard() |
| 39 | + _googleSignIn = googleSignIn ?? GoogleSignIn.standard(), |
| 40 | + _crypto = cryptoApi ?? CryptoApi() |
39 | 41 |
|
40 | 42 | final CacheClient _cache;
|
41 | 43 | final firebase_auth.FirebaseAuth _firebaseAuth;
|
42 | 44 | final GoogleSignIn _googleSignIn;
|
43 |
| - final Crypto _crypto = Crypto(); |
| 45 | + final Crypto _crypto; |
44 | 46 |
|
45 | 47 | /// Whether or not the current environment is web
|
46 | 48 | /// Should only be overriden for testing purposes. Otherwise,
|
|
0 commit comments