mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-03 11:07:10 -05:00 
			
		
		
		
	* optimize android side gradle settings * android minsdk back to 21 * remove unused package, update linter and fix lint error * clean code of 'shared module' with offical dart style guide * restore uploadProfileImage method in UserService * add service provider * fix searchFocusNode init error
		
			
				
	
	
		
			22 lines
		
	
	
		
			458 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			458 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
import 'package:hive/hive.dart';
 | 
						|
import 'package:hooks_riverpod/hooks_riverpod.dart';
 | 
						|
import 'package:immich_mobile/constants/hive_box.dart';
 | 
						|
 | 
						|
final localStorageServiceProvider = Provider((_) => LocalStorageService());
 | 
						|
 | 
						|
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);
 | 
						|
  }
 | 
						|
}
 |