mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
Transfer repository from Gitlab
This commit is contained in:
parent
af2efbdbbd
commit
568cc243f0
177 changed files with 13300 additions and 0 deletions
18
mobile/lib/shared/services/local_storage.service.dart
Normal file
18
mobile/lib/shared/services/local_storage.service.dart
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import 'package:hive/hive.dart';
|
||||
import 'package:immich_mobile/constants/hive_box.dart';
|
||||
|
||||
class LocalStorageService {
|
||||
late Box _box;
|
||||
|
||||
LocalStorageService() {
|
||||
_box = Hive.box(userInfoBox);
|
||||
}
|
||||
|
||||
T get<T>(String key) {
|
||||
return _box.get(key);
|
||||
}
|
||||
|
||||
put<T>(String key, T value) {
|
||||
return _box.put(key, value);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue