sign in with pocketbase working
This commit is contained in:
@@ -10,8 +10,9 @@ import '../utils/constants.dart';
|
||||
|
||||
/// Talks to Enable Banking via the local ingtrak API (no app-user auth).
|
||||
class IngtrakApi {
|
||||
IngtrakApi({http.Client? client, this.baseUrl = kApiBaseUrl})
|
||||
: _client = client ?? http.Client();
|
||||
IngtrakApi({http.Client? client, String? baseUrl})
|
||||
: _client = client ?? http.Client(),
|
||||
baseUrl = baseUrl ?? kApiBaseUrl;
|
||||
|
||||
final http.Client _client;
|
||||
final String baseUrl;
|
||||
|
||||
@@ -125,6 +125,16 @@ class StorageService {
|
||||
return _prefs.setBool(StorageKeys.useRemoteData, value);
|
||||
}
|
||||
|
||||
String? get pocketBaseAuth => _prefs.getString(StorageKeys.pocketBaseAuth);
|
||||
|
||||
Future<void> setPocketBaseAuth(String value) {
|
||||
return _prefs.setString(StorageKeys.pocketBaseAuth, value);
|
||||
}
|
||||
|
||||
Future<void> clearPocketBaseAuth() {
|
||||
return _prefs.remove(StorageKeys.pocketBaseAuth);
|
||||
}
|
||||
|
||||
BankCache? loadBankCache() {
|
||||
final raw = _prefs.getString(StorageKeys.bankCache);
|
||||
if (raw == null || raw.isEmpty) return null;
|
||||
|
||||
Reference in New Issue
Block a user